changing tests for new ui (#1671)

* changing tests for new ui

* minor changes

* xpath change

* adding wait time

* added new mydata page tests and removed repeating failed tests
This commit is contained in:
parthp2107 2021-12-14 17:30:44 +05:30 committed by GitHub
parent 6825a8c54a
commit 8ae1c1747f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 311 additions and 287 deletions

View File

@ -432,7 +432,9 @@ const DashboardDetails = ({
handleChartTagSelection(tags);
}}>
{chart.tags?.length ? (
<button className="tw-opacity-0 tw-ml-1 group-hover:tw-opacity-100 focus:tw-outline-none">
<button
className="tw-opacity-0 tw-ml-1 group-hover:tw-opacity-100 focus:tw-outline-none"
data-testid="edit-tags">
<SVGIcons
alt="edit"
icon="icon-edit"

View File

@ -13,11 +13,11 @@
package org.openmetadata.catalog.selenium.pages.common;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.openmetadata.catalog.selenium.events.Events;
import org.openmetadata.catalog.selenium.properties.Property;
@ -60,7 +60,7 @@ public class PaginationAndFilterTest {
webDriver.get(url);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(1)
public void checkFlikerInFilter() throws Exception {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -81,7 +81,7 @@ public class PaginationAndFilterTest {
}
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(2)
public void noDataPresentWithFilter() throws Exception {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -99,7 +99,7 @@ public class PaginationAndFilterTest {
}
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(3)
public void dataPresentWithFilter() throws Exception {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new

View File

@ -14,10 +14,10 @@
package org.openmetadata.catalog.selenium.pages.dashboardDetails;
import com.github.javafaker.Faker;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.junit.jupiter.api.MethodOrderer;
import org.openmetadata.catalog.selenium.events.Events;
@ -58,7 +58,7 @@ public class DashboardDetailsPageTest {
webDriver.get(url);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(1)
public void openExplorePage() throws InterruptedException {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -67,7 +67,7 @@ public class DashboardDetailsPageTest {
Thread.sleep(waitTime);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(2)
public void editDescription() throws InterruptedException {
openExplorePage();
@ -79,7 +79,7 @@ public class DashboardDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(3)
public void addTag() throws InterruptedException {
openExplorePage();
@ -98,7 +98,7 @@ public class DashboardDetailsPageTest {
webDriver.navigate().refresh();
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(4)
public void removeTag() throws InterruptedException {
openExplorePage();
@ -111,7 +111,7 @@ public class DashboardDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(5)
public void editChartDescription() throws InterruptedException {
openExplorePage();
@ -125,7 +125,7 @@ public class DashboardDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(6)
public void addChartTags() throws InterruptedException {
openExplorePage();
@ -144,25 +144,24 @@ public class DashboardDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(7)
public void removeChartTag() throws InterruptedException {
openExplorePage();
Events.sendKeys(webDriver, By.cssSelector("[data-testid='searchBox']"), dashboardName);
Events.click(webDriver, By.cssSelector("[data-testid='data-name']"));
Thread.sleep(waitTime);
wait.until(ExpectedConditions.elementToBeClickable(
By.xpath("//table[@data-testid='schema-table']//div[@data-testid='tag-conatiner']//span")));
actions.moveToElement(webDriver.findElement(
By.xpath("//table[@data-testid='schema-table']//div[@data-testid='tag-conatiner']//span"))).perform();
Events.click(
webDriver, By.xpath("//table[@data-testid='schema-table']//div[@data-testid='tag-conatiner']//span"));
actions.moveToElement(webDriver.findElement(By.cssSelector("[data-testid='edit-tags']"))).perform();
Events.click(webDriver, By.cssSelector("[data-testid='edit-tags']"));
Thread.sleep(waitTime);
Events.click(webDriver, By.cssSelector("[data-testid='remove']"));
Thread.sleep(waitTime);
Events.click(webDriver, By.cssSelector("[data-testid='remove']"));
Thread.sleep(waitTime);
Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(8)
public void checkManage() throws InterruptedException {
openExplorePage();
@ -179,7 +178,7 @@ public class DashboardDetailsPageTest {
webDriver.navigate().refresh();
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(9)
public void checkBreadCrumb() throws InterruptedException {
openExplorePage();

View File

@ -14,7 +14,7 @@
package org.openmetadata.catalog.selenium.pages.dashboardService;
import com.github.javafaker.Faker;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.Test;
import org.openmetadata.catalog.selenium.events.Events;
import org.openmetadata.catalog.selenium.properties.Property;
import org.openqa.selenium.By;
@ -59,7 +59,7 @@ public class DashboardServiceTestPage {
webDriver.get(url);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(1)
public void openDashboardServicePage() throws InterruptedException {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -69,7 +69,7 @@ public class DashboardServiceTestPage {
Thread.sleep(waitTime);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(2)
public void addDashboardService() throws InterruptedException {
openDashboardServicePage();
@ -99,7 +99,7 @@ public class DashboardServiceTestPage {
Events.click(webDriver, By.cssSelector("[data-testid='save-button']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(3)
public void editDashboardService() throws InterruptedException {
openDashboardServicePage();
@ -111,7 +111,7 @@ public class DashboardServiceTestPage {
Events.click(webDriver, By.cssSelector("[data-testid='save-button']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(4)
public void checkDashboardServiceDetails() throws InterruptedException {
openDashboardServicePage();
@ -125,7 +125,7 @@ public class DashboardServiceTestPage {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(5)
public void searchDashboardService() throws InterruptedException {
openDashboardServicePage();
@ -133,7 +133,7 @@ public class DashboardServiceTestPage {
Events.click(webDriver, By.cssSelector("[data-testid='service-name-"+ serviceName + "']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(6)
public void deleteDashboardService() throws InterruptedException {
openDashboardServicePage();

View File

@ -14,7 +14,7 @@
package org.openmetadata.catalog.selenium.pages.databaseService;
import com.github.javafaker.Faker;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.Test;
import org.openmetadata.catalog.selenium.events.Events;
import org.openmetadata.catalog.selenium.properties.Property;
import org.openqa.selenium.By;
@ -60,7 +60,7 @@ public class DatabaseServicePageTest {
webDriver.get(url);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(1)
public void openDatabaseServicePage() throws InterruptedException {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -71,7 +71,7 @@ public class DatabaseServicePageTest {
Thread.sleep(waitTime);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(2)
public void addDatabaseService() throws InterruptedException {
openDatabaseServicePage();
@ -101,7 +101,7 @@ public class DatabaseServicePageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save-button']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(3)
public void editDatabaseService() throws InterruptedException {
openDatabaseServicePage();
@ -113,7 +113,7 @@ public class DatabaseServicePageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save-button']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(4)
public void checkDatabaseServiceDetails() throws InterruptedException {
openDatabaseServicePage();
@ -127,7 +127,7 @@ public class DatabaseServicePageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(5)
public void searchDatabaseService() throws InterruptedException {
openDatabaseServicePage();
@ -135,7 +135,7 @@ public class DatabaseServicePageTest {
Events.click(webDriver, By.cssSelector("[data-testid='service-name-" + serviceName + "']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(6)
public void deleteDatabaseService() throws InterruptedException {
openDatabaseServicePage();

View File

@ -1,157 +1,156 @@
/*
* Copyright 2021 Collate
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openmetadata.catalog.selenium.pages.dbtModelDetails;
import com.github.javafaker.Faker;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.TestMethodOrder;
import org.openmetadata.catalog.selenium.events.Events;
import org.openmetadata.catalog.selenium.properties.Property;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration;
import java.util.ArrayList;
@Order(13)
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
public class DbtModelDetailsPageTest {
static WebDriver webDriver;
static String url = Property.getInstance().getURL();
static Faker faker = new Faker();
static String enterDescription = "//div[@data-testid='enterDescription']/div/div[2]/div/div/div/div/div/div";
static Actions actions;
static WebDriverWait wait;
Integer waitTime = Property.getInstance().getSleepTime();
@BeforeEach
public void openMetadataWindow() {
System.setProperty("webdriver.chrome.driver", "src/test/resources/drivers/linux/chromedriver");
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless");
options.addArguments("--window-size=1280,800");
webDriver = new ChromeDriver(options);
actions = new Actions(webDriver);
wait = new WebDriverWait(webDriver, Duration.ofSeconds(30));
webDriver.manage().window().maximize();
webDriver.get(url);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Order(1)
public void openDbtModelPage() throws InterruptedException {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
Events.click(webDriver, By.cssSelector("[data-testid='appbar-item'][id='explore']")); // Explore
Events.click(webDriver, By.xpath("(//button[@data-testid='tab'])[5]")); // Dashboard
Thread.sleep(waitTime);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Order(2)
public void editDescription() throws InterruptedException {
openDbtModelPage();
Events.click(webDriver, By.cssSelector("[data-testid='sortBy']")); // Sort By
Events.click(webDriver, By.cssSelector("[data-testid='list-item']")); // Last Updated
Events.click(webDriver, By.xpath("(//a[@data-testid='table-link'])[last()]"));
Events.click(webDriver, By.cssSelector("[data-testid='edit-description']"));
Events.sendKeys(webDriver, By.xpath(enterDescription), faker.address().toString());
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Order(3)
public void editColumnDescription() throws InterruptedException {
openDbtModelPage();
Events.click(webDriver, By.cssSelector("[data-testid='sortBy']")); // Sort By
Events.click(webDriver, By.cssSelector("[data-testid='list-item']")); // Last Updated
Events.click(webDriver, By.xpath("(//a[@data-testid='table-link'])[1]"));
Thread.sleep(waitTime);
actions.moveToElement(webDriver.findElement(By.xpath("//div[@data-testid='description']/button"))).perform();
Events.click(webDriver, By.xpath("//div[@data-testid='description']/button"));
Events.sendKeys(webDriver, By.xpath(enterDescription), faker.address().toString());
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Order(4)
public void addColumnTag() throws InterruptedException {
openDbtModelPage();
Events.click(webDriver, By.cssSelector("[data-testid='sortBy']")); // Sort By
Events.click(webDriver, By.cssSelector("[data-testid='list-item']")); // Last Updated
Events.click(webDriver, By.xpath("(//a[@data-testid='table-link'])[1]"));
Thread.sleep(waitTime);
Events.click(webDriver, By.cssSelector("[data-testid='tags']"));
Events.click(webDriver, By.cssSelector("[data-testid='associatedTagName']"));
for (int i = 1; i <= 2; i++) {
Events.sendKeys(webDriver, By.cssSelector("[data-testid='associatedTagName']"), "P");
Events.click(webDriver, By.cssSelector("[data-testid='list-item']"));
}
Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
webDriver.navigate().back();
webDriver.navigate().refresh();
}
@RepeatedIfExceptionsTest(repeats = 2)
@Order(5)
public void removeColumnTag() throws InterruptedException {
openDbtModelPage();
Events.click(webDriver, By.cssSelector("[data-testid='sortBy']")); // Sort By
Events.click(webDriver, By.cssSelector("[data-testid='list-item']")); // Last Updated
Events.click(webDriver, By.xpath("(//a[@data-testid='table-link'])[1]"));
Events.click(webDriver, By.cssSelector("[data-testid='tag-conatiner']"));
Events.click(webDriver, By.cssSelector("[data-testid='remove']"));
Events.click(webDriver, By.cssSelector("[data-testid='remove']"));
Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Order(6)
public void checkManage() throws InterruptedException {
openDbtModelPage();
Events.click(webDriver, By.cssSelector("[data-testid='sortBy']")); // Sort By
Events.click(webDriver, By.cssSelector("[data-testid='list-item']")); // Last Updated
Events.click(webDriver, By.xpath("(//a[@data-testid='table-link'])[last()]"));
Events.click(webDriver, By.xpath("(//button[@data-testid='tab'])[2]"));
Events.click(webDriver, By.xpath("(//button[@data-testid='tab'])[3]"));
Events.click(webDriver, By.cssSelector("[data-testid='owner-dropdown']")); // Owner
Events.sendKeys(webDriver, By.cssSelector("[data-testid='searchInputText']"), "Cloud");
Events.click(webDriver, By.cssSelector("[data-testid='list-item']")); // Select User/Team
Events.click(webDriver, By.cssSelector("[data-testid='card-list']")); // Select Tier
Events.click(webDriver, By.cssSelector("[data-testid='saveManageTab']")); // Save
webDriver.navigate().back();
webDriver.navigate().refresh();
}
@AfterEach
public void closeTabs() {
ArrayList<String> tabs = new ArrayList<>(webDriver.getWindowHandles());
String originalHandle = webDriver.getWindowHandle();
for (String handle : webDriver.getWindowHandles()) {
if (!handle.equals(originalHandle)) {
webDriver.switchTo().window(handle);
webDriver.close();
}
}
webDriver.switchTo().window(tabs.get(0)).close();
}
}
///*
// * Copyright 2021 Collate
// * Licensed under the Apache License, Version 2.0 (the "License");
// * you may not use this file except in compliance with the License.
// * You may obtain a copy of the License at
// * http://www.apache.org/licenses/LICENSE-2.0
// * Unless required by applicable law or agreed to in writing, software
// * distributed under the License is distributed on an "AS IS" BASIS,
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// * See the License for the specific language governing permissions and
// * limitations under the License.
// */
//
//package org.openmetadata.catalog.selenium.pages.dbtModelDetails;
//
//import com.github.javafaker.Faker;
////import org.junit.jupiter.api.AfterEach;
//import org.junit.jupiter.api.BeforeEach;
//import org.junit.jupiter.api.MethodOrderer;
//import org.junit.jupiter.api.Order;
//import org.junit.jupiter.api.TestMethodOrder;
//import org.openmetadata.catalog.selenium.events.Events;
//import org.openmetadata.catalog.selenium.properties.Property;
//import org.openqa.selenium.By;
//import org.openqa.selenium.WebDriver;
//import org.openqa.selenium.chrome.ChromeDriver;
//import org.openqa.selenium.chrome.ChromeOptions;
//import org.openqa.selenium.interactions.Actions;
//import org.openqa.selenium.support.ui.WebDriverWait;
//
//import java.time.Duration;
//import java.util.ArrayList;
//
//@Order(13)
//@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
//public class DbtModelDetailsPageTest {
//
// static WebDriver webDriver;
// static String url = Property.getInstance().getURL();
// static Faker faker = new Faker();
// static String enterDescription = "//div[@data-testid='enterDescription']/div/div[2]/div/div/div/div/div/div";
// static Actions actions;
// static WebDriverWait wait;
// Integer waitTime = Property.getInstance().getSleepTime();
//
// @BeforeEach
// public void openMetadataWindow() {
// System.setProperty("webdriver.chrome.driver", "src/test/resources/drivers/linux/chromedriver");
// ChromeOptions options = new ChromeOptions();
// options.addArguments("--headless");
// options.addArguments("--window-size=1280,800");
// webDriver = new ChromeDriver(options);
// actions = new Actions(webDriver);
// wait = new WebDriverWait(webDriver, Duration.ofSeconds(30));
// webDriver.manage().window().maximize();
// webDriver.get(url);
// }
//
// @Test
// @Order(1)
// public void openDbtModelPage() throws InterruptedException {
// Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
// Events.click(webDriver, By.cssSelector("[data-testid='appbar-item'][id='explore']")); // Explore
// Events.click(webDriver, By.xpath("(//button[@data-testid='tab'])[5]")); // Dashboard
// Thread.sleep(waitTime);
// }
//
// @Test
// @Order(2)
// public void editDescription() throws InterruptedException {
// openDbtModelPage();
// Events.click(webDriver, By.cssSelector("[data-testid='sortBy']")); // Sort By
// Events.click(webDriver, By.cssSelector("[data-testid='list-item']")); // Last Updated
// Events.click(webDriver, By.xpath("(//a[@data-testid='table-link'])[last()]"));
// Events.click(webDriver, By.cssSelector("[data-testid='edit-description']"));
// Events.sendKeys(webDriver, By.xpath(enterDescription), faker.address().toString());
// Events.click(webDriver, By.cssSelector("[data-testid='save']"));
// }
//
// @Test
// @Order(3)
// public void editColumnDescription() throws InterruptedException {
// openDbtModelPage();
// Events.click(webDriver, By.cssSelector("[data-testid='sortBy']")); // Sort By
// Events.click(webDriver, By.cssSelector("[data-testid='list-item']")); // Last Updated
// Events.click(webDriver, By.xpath("(//a[@data-testid='table-link'])[1]"));
// Thread.sleep(waitTime);
// actions.moveToElement(webDriver.findElement(By.xpath("//div[@data-testid='description']/button"))).perform();
// Events.click(webDriver, By.xpath("//div[@data-testid='description']/button"));
// Events.sendKeys(webDriver, By.xpath(enterDescription), faker.address().toString());
// Events.click(webDriver, By.cssSelector("[data-testid='save']"));
// }
//
// @Test
// @Order(4)
// public void addColumnTag() throws InterruptedException {
// openDbtModelPage();
// Events.click(webDriver, By.cssSelector("[data-testid='sortBy']")); // Sort By
// Events.click(webDriver, By.cssSelector("[data-testid='list-item']")); // Last Updated
// Events.click(webDriver, By.xpath("(//a[@data-testid='table-link'])[1]"));
// Thread.sleep(waitTime);
// Events.click(webDriver, By.cssSelector("[data-testid='tags']"));
// Events.click(webDriver, By.cssSelector("[data-testid='associatedTagName']"));
// for (int i = 1; i <= 2; i++) {
// Events.sendKeys(webDriver, By.cssSelector("[data-testid='associatedTagName']"), "P");
// Events.click(webDriver, By.cssSelector("[data-testid='list-item']"));
// }
// Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
// webDriver.navigate().back();
// webDriver.navigate().refresh();
// }
//
// @Test
// @Order(5)
// public void removeColumnTag() throws InterruptedException {
// openDbtModelPage();
// Events.click(webDriver, By.cssSelector("[data-testid='sortBy']")); // Sort By
// Events.click(webDriver, By.cssSelector("[data-testid='list-item']")); // Last Updated
// Events.click(webDriver, By.xpath("(//a[@data-testid='table-link'])[1]"));
// Events.click(webDriver, By.cssSelector("[data-testid='tag-conatiner']"));
// Events.click(webDriver, By.cssSelector("[data-testid='remove']"));
// Events.click(webDriver, By.cssSelector("[data-testid='remove']"));
// Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
// }
//
// @Test
// @Order(6)
// public void checkManage() throws InterruptedException {
// openDbtModelPage();
// Events.click(webDriver, By.cssSelector("[data-testid='sortBy']")); // Sort By
// Events.click(webDriver, By.cssSelector("[data-testid='list-item']")); // Last Updated
// Events.click(webDriver, By.xpath("(//a[@data-testid='table-link'])[last()]"));
// Events.click(webDriver, By.xpath("(//button[@data-testid='tab'])[2]"));
// Events.click(webDriver, By.xpath("(//button[@data-testid='tab'])[3]"));
// Events.click(webDriver, By.cssSelector("[data-testid='owner-dropdown']")); // Owner
// Events.sendKeys(webDriver, By.cssSelector("[data-testid='searchInputText']"), "Cloud");
// Events.click(webDriver, By.cssSelector("[data-testid='list-item']")); // Select User/Team
// Events.click(webDriver, By.cssSelector("[data-testid='card-list']")); // Select Tier
// Events.click(webDriver, By.cssSelector("[data-testid='saveManageTab']")); // Save
// webDriver.navigate().back();
// webDriver.navigate().refresh();
// }
//
// @AfterEach
// public void closeTabs() {
// ArrayList<String> tabs = new ArrayList<>(webDriver.getWindowHandles());
// String originalHandle = webDriver.getWindowHandle();
// for (String handle : webDriver.getWindowHandles()) {
// if (!handle.equals(originalHandle)) {
// webDriver.switchTo().window(handle);
// webDriver.close();
// }
// }
// webDriver.switchTo().window(tabs.get(0)).close();
// }
//}

View File

@ -14,7 +14,7 @@
package org.openmetadata.catalog.selenium.pages.ingestion;
import com.github.javafaker.Faker;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.Test;
import org.openmetadata.catalog.selenium.events.Events;
import org.openmetadata.catalog.selenium.properties.Property;
import org.openqa.selenium.By;
@ -56,7 +56,7 @@ public class IngestionPageTest {
webDriver.get(url);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(1)
public void openIngestionPage() throws InterruptedException {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -67,7 +67,7 @@ public class IngestionPageTest {
Thread.sleep(waitTime);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(2)
public void addIngestionService() throws InterruptedException {
openIngestionPage();
@ -89,7 +89,7 @@ public class IngestionPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='deploy-button']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(3)
public void runIngestionService() throws InterruptedException{
openIngestionPage();
@ -97,7 +97,7 @@ public class IngestionPageTest {
webDriver.navigate().refresh();
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(4)
public void editIngestionService() throws InterruptedException{
openIngestionPage();
@ -110,7 +110,7 @@ public class IngestionPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='deploy-button']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(5)
public void deleteIngestionService() throws InterruptedException {
openIngestionPage();

View File

@ -14,7 +14,7 @@
package org.openmetadata.catalog.selenium.pages.messagingService;
import com.github.javafaker.Faker;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.Test;
import org.openmetadata.catalog.selenium.events.Events;
import org.openmetadata.catalog.selenium.properties.Property;
import org.openqa.selenium.By;
@ -23,7 +23,6 @@ import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.AfterEach;
@ -59,7 +58,7 @@ public class MessagingServicePageTest {
webDriver.get(url);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(1)
public void openMessagingServicePage() throws InterruptedException {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -69,7 +68,7 @@ public class MessagingServicePageTest {
Thread.sleep(waitTime);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(2)
public void addMessagingService() throws InterruptedException {
openMessagingServicePage();
@ -98,7 +97,7 @@ public class MessagingServicePageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save-button']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(3)
public void editMessagingService() throws InterruptedException {
openMessagingServicePage();
@ -110,7 +109,7 @@ public class MessagingServicePageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save-button']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(4)
public void checkMessagingServiceDetails() throws InterruptedException {
openMessagingServicePage();
@ -124,7 +123,7 @@ public class MessagingServicePageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(5)
public void searchMessagingService() throws InterruptedException {
openMessagingServicePage();
@ -132,7 +131,7 @@ public class MessagingServicePageTest {
Events.click(webDriver, By.cssSelector("[data-testid='service-name-" + serviceName + "']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(6)
public void deleteMessagingService() throws InterruptedException {
openMessagingServicePage();

View File

@ -13,11 +13,11 @@
package org.openmetadata.catalog.selenium.pages.myData;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.openmetadata.catalog.selenium.events.Events;
import org.openmetadata.catalog.selenium.properties.Property;
@ -40,6 +40,7 @@ public class MyDataPageTest {
static String url = Property.getInstance().getURL();
static Actions actions;
static WebDriverWait wait;
static String table = "dim_product_variant";
Integer waitTime = Property.getInstance().getSleepTime();
@BeforeEach
@ -55,7 +56,7 @@ public class MyDataPageTest {
webDriver.get(url);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(1)
public void checkWhatsNew() {
Events.click(webDriver, By.xpath("//ul[@class='slick-dots testid-dots-button']//li[2]")); // What's new page 2
@ -63,16 +64,8 @@ public class MyDataPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(2)
public void checkTabs() {
checkWhatsNew();
Events.click(webDriver, By.cssSelector("[data-testid='tab'][id='myDataTab']")); // My Data
Events.click(webDriver, By.cssSelector("[data-testid='tab'][id='followingTab']")); // Following
}
@RepeatedIfExceptionsTest(repeats = 2)
@Order(3)
public void checkOverview() throws InterruptedException {
checkWhatsNew();
Events.click(webDriver, By.cssSelector("[data-testid='tables']")); // Tables
@ -92,8 +85,8 @@ public class MyDataPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='terms']")); // Teams
}
@RepeatedIfExceptionsTest(repeats = 2)
@Order(4)
@Test
@Order(3)
public void checkSearchBar() throws InterruptedException {
checkWhatsNew();
wait.until(ExpectedConditions.elementToBeClickable(
@ -104,8 +97,8 @@ public class MyDataPageTest {
}
@RepeatedIfExceptionsTest(repeats = 2)
@Order(5)
@Test
@Order(4)
public void checkHeaders() {
checkWhatsNew();
ArrayList<String> tabs = new ArrayList<>(webDriver.getWindowHandles());
@ -134,12 +127,13 @@ public class MyDataPageTest {
webDriver.switchTo().window(tabs.get(0));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Order(6)
@Test
@Order(5)
public void checkMyDataTab() {
checkWhatsNew();
Events.click(webDriver, By.cssSelector("[data-testid='tables']")); // Tables
Events.click(webDriver, By.xpath("(//a[@data-testid='table-link'])[last()]"));
Events.sendKeys(webDriver, By.cssSelector("[data-testid='searchBox']"), table);
Events.click(webDriver, By.cssSelector("[data-testid='data-name'][id='bigquery_gcpshopifydim_product_variant']"));
Events.click(webDriver, By.xpath("(//button[@data-testid='tab'])[4]")); // Manage
Events.click(webDriver, By.cssSelector("[data-testid='owner-dropdown']")); // Owner
Events.click(webDriver, By.xpath("//div[@data-testid='dropdown-list']//div[2]//button[2]"));
@ -147,25 +141,53 @@ public class MyDataPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='saveManageTab']")); // Save
Events.click(webDriver, By.cssSelector("[data-testid='image']"));
webDriver.navigate().refresh();
Events.click(webDriver, By.cssSelector("[data-testid='tab'][id='myDataTab']")); // My Data
Events.click(webDriver, By.cssSelector("[data-testid='My data-" + table + "']"));
webDriver.navigate().back();
Events.click(webDriver, By.cssSelector("[data-testid='my-data']")); // My Data
Events.click(webDriver, By.xpath("//a[@data-testid='table-link']//button"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Order(7)
@Test
@Order(6)
public void checkFollowingTab() {
checkWhatsNew();
Events.click(webDriver, By.cssSelector("[data-testid='tables']")); // Tables
Events.click(webDriver, By.xpath("(//a[@data-testid='table-link'])[last()]"));
Events.sendKeys(webDriver, By.cssSelector("[data-testid='searchBox']"), table);
Events.click(webDriver, By.cssSelector("[data-testid='data-name'][id='bigquery_gcpshopifydim_product_variant']"));
Events.click(webDriver, By.cssSelector("[data-testid='follow-button']"));
Events.click(webDriver, By.cssSelector("[data-testid='image']"));
webDriver.navigate().refresh();
Events.click(webDriver, By.cssSelector("[data-testid='tab'][id='followingTab']")); // Following
Events.click(webDriver, By.xpath("//div[@data-testid='Following data-" + table + "']/div/a/button"));
webDriver.navigate().back();
Events.click(webDriver, By.cssSelector("[data-testid='following-data']")); // Following
Events.click(webDriver, By.xpath("//a[@data-testid='table-link']//button"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(7)
public void checkRecentlyViewed() {
checkWhatsNew();
Events.click(webDriver, By.cssSelector("[data-testid='tables']")); // Tables
Events.sendKeys(webDriver, By.cssSelector("[data-testid='searchBox']"), "fact_line_item");
Events.click(webDriver, By.cssSelector("[data-testid='data-name'][id='bigquery_gcpshopifyfact_line_item']"));
Events.click(webDriver, By.cssSelector("[data-testid='image']"));
webDriver.navigate().refresh();
Events.click(webDriver, By.cssSelector("[data-testid='Recently Viewed-fact_line_item']"));
}
@Test
@Order(8)
public void checkRecentlySearched() {
checkWhatsNew();
Events.sendKeys(webDriver, By.cssSelector("[id='searchBox']"), "dim"); // Search bar/dim
Events.sendEnter(webDriver, By.cssSelector("[id='searchBox']"));
Events.click(webDriver, By.cssSelector("[data-testid='table-link']"));
Events.click(webDriver, By.cssSelector("[data-testid='image']"));
Events.click(webDriver, By.cssSelector("[data-testid='Recently-Search-dim']"));
}
@Test
@Order(9)
public void checkLogout() {
checkWhatsNew();
Events.click(webDriver, By.cssSelector("[data-testid='dropdown-profile']"));

View File

@ -14,7 +14,7 @@
package org.openmetadata.catalog.selenium.pages.pipelineDetails;
import com.github.javafaker.Faker;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.Test;
import org.openmetadata.catalog.selenium.events.Events;
import org.openmetadata.catalog.selenium.properties.Property;
import org.openqa.selenium.By;
@ -58,7 +58,7 @@ public class PipelineDetailsPageTest {
webDriver.get(url);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(1)
public void openExplorePage() throws InterruptedException {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -67,7 +67,7 @@ public class PipelineDetailsPageTest {
Thread.sleep(waitTime);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(2)
public void editDescription() throws InterruptedException {
openExplorePage();
@ -79,7 +79,7 @@ public class PipelineDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(3)
public void addTag() throws InterruptedException {
openExplorePage();
@ -98,7 +98,7 @@ public class PipelineDetailsPageTest {
webDriver.navigate().refresh();
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(4)
public void removeTag() throws InterruptedException {
openExplorePage();
@ -111,7 +111,7 @@ public class PipelineDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(5)
public void editTaskDescription() throws InterruptedException {
openExplorePage();
@ -125,7 +125,7 @@ public class PipelineDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(6)
public void checkLineage() throws InterruptedException {
openExplorePage();
@ -139,7 +139,7 @@ public class PipelineDetailsPageTest {
}
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(7)
public void checkManage() throws InterruptedException {
openExplorePage();
@ -156,7 +156,7 @@ public class PipelineDetailsPageTest {
webDriver.navigate().refresh();
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(8)
public void checkBreadCrumb() throws InterruptedException {
openExplorePage();

View File

@ -14,7 +14,7 @@
package org.openmetadata.catalog.selenium.pages.pipelineService;
import com.github.javafaker.Faker;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.Test;
import org.openmetadata.catalog.selenium.events.Events;
import org.openmetadata.catalog.selenium.properties.Property;
import org.openqa.selenium.By;
@ -59,7 +59,7 @@ public class PipelineServiceTestPage {
webDriver.get(url);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(1)
public void openPipelineServicePage() throws InterruptedException {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -69,7 +69,7 @@ public class PipelineServiceTestPage {
Thread.sleep(waitTime);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(2)
public void addPipelineService() throws InterruptedException {
openPipelineServicePage();
@ -96,7 +96,7 @@ public class PipelineServiceTestPage {
Events.click(webDriver, By.cssSelector("[data-testid='save-button']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(3)
public void editPipelineService() throws InterruptedException {
openPipelineServicePage();
@ -108,7 +108,7 @@ public class PipelineServiceTestPage {
Events.click(webDriver, By.cssSelector("[data-testid='save-button']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(4)
public void checkPipelineServiceDetails() throws InterruptedException {
openPipelineServicePage();
@ -122,7 +122,7 @@ public class PipelineServiceTestPage {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(5)
public void searchPipelineService() throws InterruptedException {
openPipelineServicePage();
@ -130,7 +130,7 @@ public class PipelineServiceTestPage {
Events.click(webDriver, By.cssSelector("[data-testid='service-name-" + serviceName + "']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(6)
public void deletePipelineService() throws InterruptedException {
openPipelineServicePage();

View File

@ -14,7 +14,7 @@
package org.openmetadata.catalog.selenium.pages.tableDetails;
import com.github.javafaker.Faker;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.Test;
import org.openmetadata.catalog.selenium.events.Events;
import org.openmetadata.catalog.selenium.properties.Property;
import org.openqa.selenium.By;
@ -59,7 +59,7 @@ public class TableDetailsPageTest {
webDriver.get(url);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(1)
public void openExplorePage() throws InterruptedException {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -67,7 +67,7 @@ public class TableDetailsPageTest {
Thread.sleep(waitTime);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(2)
public void checkTabs() throws InterruptedException {
openExplorePage();
@ -78,7 +78,7 @@ public class TableDetailsPageTest {
Events.click(webDriver, By.xpath("(//button[@data-testid='tab'])[4]")); // Manage
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(3)
public void editDescription() throws InterruptedException {
openExplorePage();
@ -89,7 +89,7 @@ public class TableDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(4)
public void searchColumnAndEditDescription() throws InterruptedException {
openExplorePage();
@ -104,7 +104,7 @@ public class TableDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(5)
public void addTagsToColumn() throws InterruptedException {
openExplorePage();
@ -121,7 +121,7 @@ public class TableDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(6)
public void removeTagsFromColumn() throws InterruptedException {
openExplorePage();
@ -135,7 +135,7 @@ public class TableDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
}
// @RepeatedIfExceptionsTest(repeats = 2)
// @Test
// @Order(7)
// public void basicChecks() throws InterruptedException {
// openExplorePage();
@ -149,7 +149,7 @@ public class TableDetailsPageTest {
// Events.click(webDriver, By.cssSelector("[data-testid='sample-data-button']"));
// }
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(8)
public void checkProfiler() throws InterruptedException {
openExplorePage();
@ -168,7 +168,7 @@ public class TableDetailsPageTest {
}
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(9)
public void checkManage() throws InterruptedException {
openExplorePage();
@ -186,7 +186,7 @@ public class TableDetailsPageTest {
webDriver.navigate().refresh();
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(10)
public void checkLineage() throws InterruptedException {
openExplorePage();
@ -200,7 +200,7 @@ public class TableDetailsPageTest {
}
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(11)
public void checkBreadCrumb() throws InterruptedException {
openExplorePage();
@ -221,7 +221,7 @@ public class TableDetailsPageTest {
}
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(12)
public void checkVersion() throws InterruptedException {
openExplorePage();
@ -237,7 +237,7 @@ public class TableDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='closeDrawer']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(13)
public void checkFrequentlyJoinedTables() throws InterruptedException {
openExplorePage();
@ -258,7 +258,7 @@ public class TableDetailsPageTest {
// }
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(14)
public void checkFrequentlyJoinedColumns() throws InterruptedException {
openExplorePage();

View File

@ -14,7 +14,7 @@
package org.openmetadata.catalog.selenium.pages.tags;
import com.github.javafaker.Faker;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.Test;
import org.openmetadata.catalog.selenium.events.Events;
import org.openmetadata.catalog.selenium.properties.Property;
import org.openqa.selenium.By;
@ -60,7 +60,7 @@ public class TagsPageTest {
webDriver.get(url);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(1)
public void openTagsPage() throws InterruptedException {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -69,7 +69,7 @@ public class TagsPageTest {
Thread.sleep(waitTime);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(2)
public void addTagCategory() throws InterruptedException {
openTagsPage();
@ -89,7 +89,7 @@ public class TagsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='saveButton']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(3)
public void editTagCategoryDescription() throws InterruptedException {
openTagsPage();
@ -100,7 +100,7 @@ public class TagsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(4)
public void addTag() throws InterruptedException {
openTagsPage();
@ -123,7 +123,7 @@ public class TagsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='saveButton']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(5)
public void changeTagDescription() throws InterruptedException {
openTagsPage();
@ -136,7 +136,7 @@ public class TagsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(6)
public void addAssociatedTag() throws InterruptedException {
openTagsPage();
@ -152,7 +152,7 @@ public class TagsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(7)
public void removeAssociatedTag() throws InterruptedException {
openTagsPage();
@ -165,7 +165,7 @@ public class TagsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(8)
public void addTagToTableColumn() throws InterruptedException {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -189,7 +189,7 @@ public class TagsPageTest {
webDriver.navigate().refresh();
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(9)
public void checkAddedTagToTableColumn() {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -199,7 +199,7 @@ public class TagsPageTest {
Events.click(webDriver, By.xpath("//a[@data-testid='table-link']//button"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(10)
public void removeTagFromTableColumn() throws InterruptedException {
openTagsPage();

View File

@ -14,7 +14,7 @@
package org.openmetadata.catalog.selenium.pages.teams;
import com.github.javafaker.Faker;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.Test;
import org.openmetadata.catalog.selenium.events.Events;
import org.openmetadata.catalog.selenium.properties.Property;
import org.openqa.selenium.By;
@ -60,7 +60,7 @@ public class TeamsPageTest {
webDriver.get(URL);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(1)
public void openTeamsPage() throws InterruptedException {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -69,7 +69,7 @@ public class TeamsPageTest {
Thread.sleep(waitTime);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(2)
public void createTeam() throws InterruptedException {
openTeamsPage();
@ -83,7 +83,7 @@ public class TeamsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='saveButton']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(3)
public void addUser() throws InterruptedException {
openTeamsPage();
@ -97,7 +97,7 @@ public class TeamsPageTest {
}
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(4)
public void editDescription() throws InterruptedException {
openTeamsPage();
@ -110,7 +110,7 @@ public class TeamsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(5)
public void addAsset() throws InterruptedException {
openTeamsPage();

View File

@ -14,7 +14,7 @@
package org.openmetadata.catalog.selenium.pages.topicDetails;
import com.github.javafaker.Faker;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.junit.jupiter.api.Test;
import org.openmetadata.catalog.selenium.events.Events;
import org.openmetadata.catalog.selenium.properties.Property;
import org.openqa.selenium.By;
@ -57,7 +57,7 @@ public class TopicDetailsPageTest {
webDriver.get(url);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(1)
public void openExplorePage() throws InterruptedException {
Events.click(webDriver, By.cssSelector("[data-testid='closeWhatsNew']")); // Close What's new
@ -66,7 +66,7 @@ public class TopicDetailsPageTest {
Thread.sleep(waitTime);
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(2)
public void checkTabs() throws InterruptedException {
openExplorePage();
@ -79,7 +79,7 @@ public class TopicDetailsPageTest {
Events.click(webDriver, By.xpath("(//button[@data-testid='tab'])[3]"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(3)
public void checkFollow() throws InterruptedException {
openExplorePage();
@ -93,7 +93,7 @@ public class TopicDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='getFollowerDetail']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(4)
public void addTags() throws InterruptedException {
openExplorePage();
@ -110,7 +110,7 @@ public class TopicDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(5)
public void removeTag() throws InterruptedException {
openExplorePage();
@ -118,12 +118,15 @@ public class TopicDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='list-item']")); // Last Updated
Events.click(webDriver, By.xpath("(//a[@data-testid='table-link'])[1]"));
Events.click(webDriver, By.cssSelector("[data-testid='tag-conatiner']"));
Thread.sleep(waitTime);
Events.click(webDriver, By.cssSelector("[data-testid='remove']"));
Thread.sleep(waitTime);
Events.click(webDriver, By.cssSelector("[data-testid='remove']"));
Thread.sleep(waitTime);
Events.click(webDriver, By.cssSelector("[data-testid='saveAssociatedTag']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(6)
public void editDescription() throws InterruptedException {
openExplorePage();
@ -135,7 +138,7 @@ public class TopicDetailsPageTest {
Events.click(webDriver, By.cssSelector("[data-testid='save']"));
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(7)
public void checkManage() throws InterruptedException {
openExplorePage();
@ -152,7 +155,7 @@ public class TopicDetailsPageTest {
webDriver.navigate().refresh();
}
@RepeatedIfExceptionsTest(repeats = 2)
@Test
@Order(8)
public void checkBreadCrumb() throws InterruptedException {
openExplorePage();