mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-11-03 20:19:31 +00:00 
			
		
		
		
	added frequently joined tables and columns tests (#1104)
* added frequently joined tables and columns tests * addressing reviewdog findings
This commit is contained in:
		
							parent
							
								
									d438be99ac
								
							
						
					
					
						commit
						ebc0c320c0
					
				@ -562,7 +562,9 @@ const EntityTable = ({
 | 
			
		||||
                            ) : null}
 | 
			
		||||
                          </div>
 | 
			
		||||
                          {checkIfJoinsAvailable(row.original.name) && (
 | 
			
		||||
                            <div className="tw-mt-3">
 | 
			
		||||
                            <div
 | 
			
		||||
                              className="tw-mt-3"
 | 
			
		||||
                              data-testid="frequently-joined-columns">
 | 
			
		||||
                              <span className="tw-text-grey-muted tw-mr-1">
 | 
			
		||||
                                Frequently joined columns:
 | 
			
		||||
                              </span>
 | 
			
		||||
 | 
			
		||||
@ -73,6 +73,7 @@ const FrequentlyJoinedTables: FunctionComponent<Props> = ({
 | 
			
		||||
            key={index}>
 | 
			
		||||
            <span
 | 
			
		||||
              className="link-text"
 | 
			
		||||
              data-testid="more-related-tables-data"
 | 
			
		||||
              onClick={() =>
 | 
			
		||||
                handleTableClick(table.fullyQualifiedName as string)
 | 
			
		||||
              }>
 | 
			
		||||
 | 
			
		||||
@ -242,6 +242,38 @@ public class TableDetailsPageTest {
 | 
			
		||||
        Events.click(webDriver, By.cssSelector("[data-testid='closeDrawer']"));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Test
 | 
			
		||||
    @Order(13)
 | 
			
		||||
    public void checkFrequentlyJoinedTables() throws InterruptedException {
 | 
			
		||||
        openExplorePage();
 | 
			
		||||
        webDriver.findElement(By.cssSelector("[data-testid='searchBox']")).sendKeys("fact_sale");
 | 
			
		||||
        Events.click(webDriver, By.cssSelector("[data-testid='data-name']"));
 | 
			
		||||
        for (int i = 1; i<=3; i++) {
 | 
			
		||||
            Events.click(webDriver, By.xpath("(//div[@data-testid='related-tables-data']//a)" + "[" + i + "]"));
 | 
			
		||||
            webDriver.navigate().back();
 | 
			
		||||
            Thread.sleep(waitTime);
 | 
			
		||||
        }
 | 
			
		||||
        for (int i = 1; i<=3; i++) {
 | 
			
		||||
            Events.click(webDriver, By.xpath("(//div[@data-testid='related-tables-data']//div//span)"));
 | 
			
		||||
            Events.click(webDriver, By.xpath("(//span[@data-testid='more-related-tables-data'])" + "[" + i + "]"));
 | 
			
		||||
            webDriver.navigate().back();
 | 
			
		||||
            Thread.sleep(waitTime);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Test
 | 
			
		||||
    @Order(14)
 | 
			
		||||
    public void checkFrequentlyJoinedColumns() throws InterruptedException {
 | 
			
		||||
        openExplorePage();
 | 
			
		||||
        webDriver.findElement(By.cssSelector("[data-testid='searchBox']")).sendKeys("fact_sale");
 | 
			
		||||
        Events.click(webDriver, By.cssSelector("[data-testid='data-name']"));
 | 
			
		||||
        for (int i = 1; i<=3; i++) {
 | 
			
		||||
            Events.click(webDriver, By.xpath(
 | 
			
		||||
                    "(//div[@data-testid='frequently-joined-columns']//span//a)" + "[" + i + "]"));
 | 
			
		||||
            webDriver.navigate().back();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @AfterEach
 | 
			
		||||
    public void closeTabs() {
 | 
			
		||||
        ArrayList<String> tabs = new ArrayList<>(webDriver.getWindowHandles());
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user