mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-31 12:39:01 +00:00
Selenium error fix (#4485)
This commit is contained in:
parent
882ea0f8e7
commit
5108e6aa35
@ -25,17 +25,17 @@ public final class Events {
|
|||||||
private Events() {}
|
private Events() {}
|
||||||
|
|
||||||
public static void click(WebDriver driver, By by) {
|
public static void click(WebDriver driver, By by) {
|
||||||
(new WebDriverWait(driver, 30)).until(ExpectedConditions.elementToBeClickable(by));
|
(new WebDriverWait(driver, 15)).until(ExpectedConditions.elementToBeClickable(by));
|
||||||
driver.findElement(by).click();
|
driver.findElement(by).click();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void sendKeys(WebDriver driver, By by, String sendKeys) {
|
public static void sendKeys(WebDriver driver, By by, String sendKeys) {
|
||||||
(new WebDriverWait(driver, 30)).until(ExpectedConditions.elementToBeClickable(by));
|
(new WebDriverWait(driver, 15)).until(ExpectedConditions.elementToBeClickable(by));
|
||||||
driver.findElement(by).sendKeys(sendKeys);
|
driver.findElement(by).sendKeys(sendKeys);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void sendEnter(WebDriver driver, By by) {
|
public static void sendEnter(WebDriver driver, By by) {
|
||||||
(new WebDriverWait(driver, 30)).until(ExpectedConditions.elementToBeClickable(by));
|
(new WebDriverWait(driver, 15)).until(ExpectedConditions.elementToBeClickable(by));
|
||||||
driver.findElement(by).sendKeys(Keys.ENTER);
|
driver.findElement(by).sendKeys(Keys.ENTER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ public class DatabaseServicePage {
|
|||||||
By selectInterval = By.xpath("//select[@id='ingestionType']");
|
By selectInterval = By.xpath("//select[@id='ingestionType']");
|
||||||
By confirmationDeleteText = By.cssSelector("[data-testid='confirmation-text-input']");
|
By confirmationDeleteText = By.cssSelector("[data-testid='confirmation-text-input']");
|
||||||
By viewService = By.cssSelector("[data-testid='view-service-button']");
|
By viewService = By.cssSelector("[data-testid='view-service-button']");
|
||||||
By clickDatabase = By.xpath("//tr[@data-testid='column']/td");
|
By clickDatabase = By.xpath("//tr[@data-testid='column']/td/a");
|
||||||
By deleteDatabase = By.cssSelector("[data-testid='delete-button']");
|
By deleteDatabase = By.cssSelector("[data-testid='delete-button']");
|
||||||
|
|
||||||
public By ingestionInterval(String interval) {
|
public By ingestionInterval(String interval) {
|
||||||
|
@ -36,6 +36,7 @@ public class TagsPage {
|
|||||||
By headerSettingsTags = By.cssSelector("[data-testid='menu-item-Tags']");
|
By headerSettingsTags = By.cssSelector("[data-testid='menu-item-Tags']");
|
||||||
By sortBy = By.cssSelector("[data-testid='sortBy']");
|
By sortBy = By.cssSelector("[data-testid='sortBy']");
|
||||||
By editTags = By.xpath("(//div[@data-testid=\"tag-container\"])[1]");
|
By editTags = By.xpath("(//div[@data-testid=\"tag-container\"])[1]");
|
||||||
|
By editBreadcrumbTag = By.xpath("//div[@data-testid='tag-container']/div/button");
|
||||||
|
|
||||||
public By tagFilter(String tagCategoryDisplayName, String tagDisplayName) {
|
public By tagFilter(String tagCategoryDisplayName, String tagDisplayName) {
|
||||||
return By.cssSelector("[data-testid='checkbox'][id='" + tagCategoryDisplayName + "." + tagDisplayName + "']");
|
return By.cssSelector("[data-testid='checkbox'][id='" + tagCategoryDisplayName + "." + tagDisplayName + "']");
|
||||||
|
@ -14,14 +14,18 @@ public class UserPage {
|
|||||||
|
|
||||||
By rolesList = By.cssSelector("[data-testid='menu-button'][id='menu-button-User']");
|
By rolesList = By.cssSelector("[data-testid='menu-button'][id='menu-button-User']");
|
||||||
By selectUser = By.xpath("//div[@data-testid='data-container']//p");
|
By selectUser = By.xpath("//div[@data-testid='data-container']//p");
|
||||||
By userFilterCount = By.xpath("//span[@data-testid='filter-count'][text()[contains(.,'101')]]");
|
By userFilterCount = By.xpath("//span[@data-testid='filter-count'][text()='101']");
|
||||||
By adminFilterCount = By.xpath("//span[@data-testid='filter-count'][text()='1']");
|
By adminFilterCount = By.xpath("//span[@data-testid='filter-count'][text()='1']");
|
||||||
|
By adminFilterCountAfterDelete = By.xpath("//span[@data-testid='filter-count'][text()='0']");
|
||||||
By userListSearchBar = By.cssSelector("[data-testid='searchbar']");
|
By userListSearchBar = By.cssSelector("[data-testid='searchbar']");
|
||||||
By userListSearchResult =
|
By userListSearchResult =
|
||||||
By.xpath("//div[@data-testid='user-card-container']/div/div[@data-testid='user-card-container']");
|
By.xpath("//div[@data-testid='user-card-container']/div/div[@data-testid='user-card-container']");
|
||||||
By closeCheckBoxDropDown = By.cssSelector("[data-testid='close-dropdown']");
|
By closeCheckBoxDropDown = By.cssSelector("[data-testid='close-dropdown']");
|
||||||
By admin = By.cssSelector("[title='Admins']");
|
By admin = By.cssSelector("[title='Admins']");
|
||||||
By users = By.cssSelector("[title='Users']");
|
By users = By.cssSelector("[title='Users']");
|
||||||
|
By editRole = By.cssSelector("[data-testid='edit-roles']");
|
||||||
|
By saveRole = By.cssSelector("[data-testid='save-roles']");
|
||||||
|
By removeRole = By.xpath("(//div[@class='css-xb97g8'])[2]");
|
||||||
|
|
||||||
public By selectRole(String role) {
|
public By selectRole(String role) {
|
||||||
return By.cssSelector("[data-testid='" + role + "']");
|
return By.cssSelector("[data-testid='" + role + "']");
|
||||||
|
@ -20,6 +20,9 @@ public class Webhooks {
|
|||||||
By checkbox = By.xpath("//input[@data-testid='entity-created-checkbox']");
|
By checkbox = By.xpath("//input[@data-testid='entity-created-checkbox']");
|
||||||
By entityCreatedMenu = By.xpath("(//button[@id='menu-button-select entities'])[1]");
|
By entityCreatedMenu = By.xpath("(//button[@id='menu-button-select entities'])[1]");
|
||||||
By allEntities = By.xpath("(//input[@type='checkbox'])[2]");
|
By allEntities = By.xpath("(//input[@type='checkbox'])[2]");
|
||||||
By checkWebhook = By.xpath("//button[@data-testid='webhook-link']");
|
|
||||||
By toast = By.xpath("(//div[@class='Toastify__toast-body']/div)[2]");
|
By toast = By.xpath("(//div[@class='Toastify__toast-body']/div)[2]");
|
||||||
|
|
||||||
|
public By checkWebhook(String webHookName) {
|
||||||
|
return By.xpath("//button[@data-testid='webhook-link'][text()='" + webHookName + "']");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,17 +69,17 @@ class WebhooksPageTest {
|
|||||||
Events.click(webDriver, webhooks.addWebhook());
|
Events.click(webDriver, webhooks.addWebhook());
|
||||||
Events.sendKeys(webDriver, webhooks.name(), name);
|
Events.sendKeys(webDriver, webhooks.name(), name);
|
||||||
Events.click(webDriver, webhooks.descriptionBox());
|
Events.click(webDriver, webhooks.descriptionBox());
|
||||||
Events.sendKeys(webDriver, webhooks.focusedDescriptionBox(), "test");
|
Events.sendKeys(webDriver, webhooks.focusedDescriptionBox(), faker.address().toString());
|
||||||
Events.sendKeys(webDriver, webhooks.endpoint(), "https://www.example.com");
|
Events.sendKeys(webDriver, webhooks.endpoint(), "https://www.example.com");
|
||||||
Events.click(webDriver, webhooks.checkbox());
|
Events.click(webDriver, webhooks.checkbox());
|
||||||
Thread.sleep(waitTime);
|
|
||||||
Events.click(webDriver, webhooks.entityCreatedMenu());
|
Events.click(webDriver, webhooks.entityCreatedMenu());
|
||||||
Events.click(webDriver, webhooks.allEntities());
|
Events.click(webDriver, webhooks.allEntities());
|
||||||
actions.click();
|
actions.click();
|
||||||
actions.perform();
|
actions.perform();
|
||||||
Events.click(webDriver, common.saveWebhook());
|
Events.click(webDriver, common.saveWebhook());
|
||||||
Thread.sleep(2000);
|
Thread.sleep(waitTime);
|
||||||
WebElement checkName = wait.until(ExpectedConditions.presenceOfElementLocated(webhooks.checkWebhook()));
|
WebElement checkName = wait.until(ExpectedConditions.presenceOfElementLocated(webhooks.checkWebhook(name)));
|
||||||
|
Thread.sleep(waitTime);
|
||||||
Assert.assertTrue(checkName.isDisplayed());
|
Assert.assertTrue(checkName.isDisplayed());
|
||||||
Assert.assertEquals(checkName.getText(), name);
|
Assert.assertEquals(checkName.getText(), name);
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ class WebhooksPageTest {
|
|||||||
actions.click();
|
actions.click();
|
||||||
actions.perform();
|
actions.perform();
|
||||||
Events.click(webDriver, common.saveWebhook());
|
Events.click(webDriver, common.saveWebhook());
|
||||||
Thread.sleep(2000);
|
Thread.sleep(waitTime);
|
||||||
}
|
}
|
||||||
WebElement errorMessage = webDriver.findElement(webhooks.toast());
|
WebElement errorMessage = webDriver.findElement(webhooks.toast());
|
||||||
Assert.assertTrue(errorMessage.isDisplayed());
|
Assert.assertTrue(errorMessage.isDisplayed());
|
||||||
|
@ -345,7 +345,6 @@ class CommonTests {
|
|||||||
Events.sendKeys(webDriver, common.searchBar(), tableName);
|
Events.sendKeys(webDriver, common.searchBar(), tableName);
|
||||||
Events.click(webDriver, common.searchSuggestion());
|
Events.click(webDriver, common.searchSuggestion());
|
||||||
Thread.sleep(waitTime);
|
Thread.sleep(waitTime);
|
||||||
// actions.moveToElement(webDriver.findElement(common.editAssociatedTagButton())).perform();
|
|
||||||
Events.click(webDriver, common.editAssociatedTagButton());
|
Events.click(webDriver, common.editAssociatedTagButton());
|
||||||
Events.click(webDriver, common.enterAssociatedTagName());
|
Events.click(webDriver, common.enterAssociatedTagName());
|
||||||
for (int i = 0; i <= 2; i++) {
|
for (int i = 0; i <= 2; i++) {
|
||||||
@ -364,7 +363,6 @@ class CommonTests {
|
|||||||
Events.click(webDriver, common.saveAssociatedTag());
|
Events.click(webDriver, common.saveAssociatedTag());
|
||||||
Thread.sleep(waitTime);
|
Thread.sleep(waitTime);
|
||||||
Events.click(webDriver, common.editAssociatedTagButton());
|
Events.click(webDriver, common.editAssociatedTagButton());
|
||||||
Object tagsCount = webDriver.findElements(common.tagCount()).size();
|
|
||||||
Events.click(webDriver, common.explore());
|
Events.click(webDriver, common.explore());
|
||||||
Thread.sleep(waitTime);
|
Thread.sleep(waitTime);
|
||||||
try {
|
try {
|
||||||
|
@ -35,6 +35,7 @@ import org.openqa.selenium.WebElement;
|
|||||||
import org.openqa.selenium.chrome.ChromeDriver;
|
import org.openqa.selenium.chrome.ChromeDriver;
|
||||||
import org.openqa.selenium.chrome.ChromeOptions;
|
import org.openqa.selenium.chrome.ChromeOptions;
|
||||||
import org.openqa.selenium.interactions.Actions;
|
import org.openqa.selenium.interactions.Actions;
|
||||||
|
import org.openqa.selenium.support.ui.ExpectedConditions;
|
||||||
import org.openqa.selenium.support.ui.WebDriverWait;
|
import org.openqa.selenium.support.ui.WebDriverWait;
|
||||||
import org.testng.Assert;
|
import org.testng.Assert;
|
||||||
|
|
||||||
@ -188,8 +189,9 @@ class DatabaseServicePageTest {
|
|||||||
void deleteDatabaseService() throws InterruptedException {
|
void deleteDatabaseService() throws InterruptedException {
|
||||||
openDatabaseServicePage();
|
openDatabaseServicePage();
|
||||||
Events.click(webDriver, databaseServicePage.serviceName(serviceName));
|
Events.click(webDriver, databaseServicePage.serviceName(serviceName));
|
||||||
Thread.sleep(waitTime);
|
|
||||||
Events.click(webDriver, databaseServicePage.clickDatabase());
|
Events.click(webDriver, databaseServicePage.clickDatabase());
|
||||||
|
Thread.sleep(waitTime);
|
||||||
|
wait.until(ExpectedConditions.urlContains("/database/" + serviceName + ".default"));
|
||||||
Events.click(webDriver, common.manage());
|
Events.click(webDriver, common.manage());
|
||||||
Events.click(webDriver, databaseServicePage.deleteDatabase());
|
Events.click(webDriver, databaseServicePage.deleteDatabase());
|
||||||
Events.sendKeys(webDriver, databaseServicePage.confirmationDeleteText(), "DELETE");
|
Events.sendKeys(webDriver, databaseServicePage.confirmationDeleteText(), "DELETE");
|
||||||
|
@ -187,11 +187,6 @@ class GlossaryPageTest {
|
|||||||
Events.sendKeys(webDriver, common.urlLink(), faker.address().toString());
|
Events.sendKeys(webDriver, common.urlLink(), faker.address().toString());
|
||||||
Events.sendKeys(webDriver, common.linkText(), faker.address().firstName());
|
Events.sendKeys(webDriver, common.linkText(), faker.address().firstName());
|
||||||
Events.click(webDriver, common.okButton());
|
Events.click(webDriver, common.okButton());
|
||||||
Events.click(webDriver, glossary.addReviewerButton());
|
|
||||||
for (int i = 1; i <= 2; i++) {
|
|
||||||
Events.click(webDriver, glossary.checkboxAddUser(i));
|
|
||||||
}
|
|
||||||
Events.click(webDriver, common.descriptionSaveButton());
|
|
||||||
Events.click(webDriver, glossary.saveGlossaryTerm());
|
Events.click(webDriver, glossary.saveGlossaryTerm());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,9 +216,15 @@ class GlossaryPageTest {
|
|||||||
Events.click(webDriver, common.containsText(glossaryName));
|
Events.click(webDriver, common.containsText(glossaryName));
|
||||||
Events.click(webDriver, common.containsText(glossaryName));
|
Events.click(webDriver, common.containsText(glossaryName));
|
||||||
Events.click(webDriver, common.containsText(termName));
|
Events.click(webDriver, common.containsText(termName));
|
||||||
Events.click(webDriver, glossary.reviewers());
|
Events.click(webDriver, common.manage());
|
||||||
Events.click(webDriver, common.addGlossaryReviewer());
|
Events.click(webDriver, common.addGlossaryReviewer());
|
||||||
|
Thread.sleep(waitTime);
|
||||||
|
Events.click(webDriver, glossary.checkboxAddUser(1));
|
||||||
|
Thread.sleep(waitTime);
|
||||||
|
Events.click(webDriver, glossary.checkboxAddUser(2));
|
||||||
|
Thread.sleep(waitTime);
|
||||||
Events.click(webDriver, glossary.checkboxAddUser(3));
|
Events.click(webDriver, glossary.checkboxAddUser(3));
|
||||||
|
Thread.sleep(waitTime);
|
||||||
Events.click(webDriver, glossary.saveTermReviewer());
|
Events.click(webDriver, glossary.saveTermReviewer());
|
||||||
Thread.sleep(waitTime);
|
Thread.sleep(waitTime);
|
||||||
Object reviewerCount = webDriver.findElements(common.reviewCount()).size();
|
Object reviewerCount = webDriver.findElements(common.reviewCount()).size();
|
||||||
@ -237,7 +238,7 @@ class GlossaryPageTest {
|
|||||||
Events.click(webDriver, common.containsText(glossaryName));
|
Events.click(webDriver, common.containsText(glossaryName));
|
||||||
Events.click(webDriver, common.containsText(glossaryName));
|
Events.click(webDriver, common.containsText(glossaryName));
|
||||||
Events.click(webDriver, common.containsText(termName));
|
Events.click(webDriver, common.containsText(termName));
|
||||||
Events.click(webDriver, glossary.reviewers());
|
Events.click(webDriver, common.manage());
|
||||||
Thread.sleep(waitTime);
|
Thread.sleep(waitTime);
|
||||||
actions.moveToElement(webDriver.findElement(common.removeAssociatedTag())).perform();
|
actions.moveToElement(webDriver.findElement(common.removeAssociatedTag())).perform();
|
||||||
Events.click(webDriver, common.removeAssociatedTag());
|
Events.click(webDriver, common.removeAssociatedTag());
|
||||||
@ -253,13 +254,12 @@ class GlossaryPageTest {
|
|||||||
Events.click(webDriver, common.containsText(glossaryName));
|
Events.click(webDriver, common.containsText(glossaryName));
|
||||||
Events.click(webDriver, common.containsText(glossaryName));
|
Events.click(webDriver, common.containsText(glossaryName));
|
||||||
Events.click(webDriver, common.containsText(termName));
|
Events.click(webDriver, common.containsText(termName));
|
||||||
Events.click(webDriver, glossary.reviewers());
|
Events.click(webDriver, common.manage());
|
||||||
Events.click(webDriver, common.addGlossaryReviewer());
|
actions.moveToElement(webDriver.findElement(common.removeAssociatedTag())).perform();
|
||||||
for (int i = 1; i <= 2; i++) {
|
for (int i = 1; i <= 2; i++) {
|
||||||
Events.click(webDriver, glossary.checkboxAddUser(i));
|
Events.click(webDriver, common.removeAssociatedTag());
|
||||||
|
Thread.sleep(waitTime);
|
||||||
}
|
}
|
||||||
Events.click(webDriver, glossary.saveTermReviewer());
|
|
||||||
Thread.sleep(waitTime);
|
|
||||||
Object reviewerCount = webDriver.findElements(common.reviewCount()).size();
|
Object reviewerCount = webDriver.findElements(common.reviewCount()).size();
|
||||||
Assert.assertEquals(reviewerCount.toString(), "0");
|
Assert.assertEquals(reviewerCount.toString(), "0");
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ class RolesPageTest {
|
|||||||
openRolesPage();
|
openRolesPage();
|
||||||
Events.click(webDriver, common.containsText(roleName));
|
Events.click(webDriver, common.containsText(roleName));
|
||||||
Events.click(webDriver, common.editTagCategoryDescription());
|
Events.click(webDriver, common.editTagCategoryDescription());
|
||||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), Keys.COMMAND + "A");
|
Events.sendKeys(webDriver, common.focusedDescriptionBox(), Keys.CONTROL + "A");
|
||||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), description);
|
Events.sendKeys(webDriver, common.focusedDescriptionBox(), description);
|
||||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||||
webDriver.navigate().refresh();
|
webDriver.navigate().refresh();
|
||||||
|
@ -187,7 +187,7 @@ class TagsPageTest {
|
|||||||
} catch (TimeoutException e) {
|
} catch (TimeoutException e) {
|
||||||
Assert.fail("Table is not present for the selected tag filter");
|
Assert.fail("Table is not present for the selected tag filter");
|
||||||
}
|
}
|
||||||
Events.click(webDriver, common.editAssociatedTagButton());
|
Events.click(webDriver, tagsPage.editBreadcrumbTag());
|
||||||
Events.click(webDriver, tagsPage.removeAssociatedTag());
|
Events.click(webDriver, tagsPage.removeAssociatedTag());
|
||||||
Events.click(webDriver, common.saveAssociatedTag());
|
Events.click(webDriver, common.saveAssociatedTag());
|
||||||
}
|
}
|
||||||
@ -219,7 +219,17 @@ class TagsPageTest {
|
|||||||
@Test
|
@Test
|
||||||
@Order(11)
|
@Order(11)
|
||||||
void TagUsageCheck() throws InterruptedException {
|
void TagUsageCheck() throws InterruptedException {
|
||||||
openTagsPage();
|
Events.click(webDriver, common.closeWhatsNew());
|
||||||
|
Events.click(webDriver, common.headerItem("explore"));
|
||||||
|
Events.click(webDriver, tagsPage.lastTableLink());
|
||||||
|
Thread.sleep(waitTime);
|
||||||
|
Events.click(webDriver, tagsPage.editTags());
|
||||||
|
Events.click(webDriver, common.enterAssociatedTagName());
|
||||||
|
Events.sendKeys(webDriver, common.enterAssociatedTagName(), "P");
|
||||||
|
Events.click(webDriver, common.tagListItem());
|
||||||
|
Events.click(webDriver, common.saveAssociatedTag());
|
||||||
|
Events.click(webDriver, common.headerSettings());
|
||||||
|
Events.click(webDriver, tagsPage.headerSettingsTags());
|
||||||
Events.click(webDriver, common.containsText("PersonalData"));
|
Events.click(webDriver, common.containsText("PersonalData"));
|
||||||
Events.click(webDriver, tagsPage.usageCountElementIndex(1));
|
Events.click(webDriver, tagsPage.usageCountElementIndex(1));
|
||||||
Thread.sleep(2000);
|
Thread.sleep(2000);
|
||||||
|
@ -196,6 +196,7 @@ class TeamsPageTest {
|
|||||||
// Select the created listed team
|
// Select the created listed team
|
||||||
Events.click(webDriver, common.containsText(teamDisplayName));
|
Events.click(webDriver, common.containsText(teamDisplayName));
|
||||||
// Events.click(webDriver,teamsPage.getAsset());
|
// Events.click(webDriver,teamsPage.getAsset());
|
||||||
|
Events.click(webDriver, common.manage());
|
||||||
Events.click(webDriver, teamsPage.ownerDropdown());
|
Events.click(webDriver, teamsPage.ownerDropdown());
|
||||||
String ownerName = webDriver.findElement(teamsPage.selectOwner()).getText();
|
String ownerName = webDriver.findElement(teamsPage.selectOwner()).getText();
|
||||||
Events.click(webDriver, teamsPage.selectOwner());
|
Events.click(webDriver, teamsPage.selectOwner());
|
||||||
|
@ -61,12 +61,15 @@ class UsersPageTest {
|
|||||||
openUsersPage();
|
openUsersPage();
|
||||||
Events.click(webDriver, userPage.users());
|
Events.click(webDriver, userPage.users());
|
||||||
Events.click(webDriver, userPage.selectUser());
|
Events.click(webDriver, userPage.selectUser());
|
||||||
Events.click(webDriver, userPage.rolesList());
|
Events.click(webDriver, userPage.editRole());
|
||||||
Events.click(webDriver, userPage.selectRole("Admin"));
|
Events.click(webDriver, common.containsText("Data Consumer"));
|
||||||
actions.moveToElement(userPage.closeCheckBoxDropDown(), 100, 200);
|
Events.click(webDriver, common.containsText("Admin"));
|
||||||
actions.click();
|
Events.click(webDriver, userPage.saveRole());
|
||||||
actions.perform();
|
Thread.sleep(waitTime);
|
||||||
Events.click(webDriver, common.descriptionSaveButton());
|
Events.click(webDriver, common.headerSettings());
|
||||||
|
Events.click(webDriver, common.headerSettingsTeams());
|
||||||
|
Events.click(webDriver, userPage.users());
|
||||||
|
webDriver.navigate().refresh();
|
||||||
Thread.sleep(waitTime);
|
Thread.sleep(waitTime);
|
||||||
Object afterUsersCount = webDriver.findElement(userPage.userFilterCount()).getAttribute("innerHTML");
|
Object afterUsersCount = webDriver.findElement(userPage.userFilterCount()).getAttribute("innerHTML");
|
||||||
Thread.sleep(waitTime);
|
Thread.sleep(waitTime);
|
||||||
@ -81,15 +84,17 @@ class UsersPageTest {
|
|||||||
openUsersPage();
|
openUsersPage();
|
||||||
Events.click(webDriver, userPage.users());
|
Events.click(webDriver, userPage.users());
|
||||||
Events.click(webDriver, userPage.selectUser());
|
Events.click(webDriver, userPage.selectUser());
|
||||||
Events.click(webDriver, userPage.rolesList());
|
Events.click(webDriver, userPage.editRole());
|
||||||
Events.click(webDriver, userPage.selectRole("Admin"));
|
Events.click(webDriver, userPage.removeRole());
|
||||||
actions.moveToElement(userPage.closeCheckBoxDropDown(), 100, 200);
|
Events.click(webDriver, userPage.saveRole());
|
||||||
actions.click();
|
Thread.sleep(waitTime);
|
||||||
actions.perform();
|
Events.click(webDriver, common.headerSettings());
|
||||||
Events.click(webDriver, common.descriptionSaveButton());
|
Events.click(webDriver, common.headerSettingsTeams());
|
||||||
Thread.sleep(1000);
|
Events.click(webDriver, userPage.users());
|
||||||
Object afterAdminCount = webDriver.findElement(userPage.adminFilterCount()).getAttribute("innerHTML");
|
webDriver.navigate().refresh();
|
||||||
Thread.sleep(1000);
|
Thread.sleep(waitTime);
|
||||||
|
Object afterAdminCount = webDriver.findElement(userPage.adminFilterCountAfterDelete()).getAttribute("innerHTML");
|
||||||
|
Thread.sleep(waitTime);
|
||||||
Assert.assertEquals(afterAdminCount, "0");
|
Assert.assertEquals(afterAdminCount, "0");
|
||||||
Object afterUsersCount = webDriver.findElement(userPage.userFilterCount()).getAttribute("innerHTML");
|
Object afterUsersCount = webDriver.findElement(userPage.userFilterCount()).getAttribute("innerHTML");
|
||||||
Assert.assertEquals(afterUsersCount, "101");
|
Assert.assertEquals(afterUsersCount, "101");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user