mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-30 17:07:06 +00:00
Text editor/tags locator and schema name changes (#4153)
This commit is contained in:
parent
54162b7c6d
commit
9ccfd4f7cd
@ -15,9 +15,9 @@ public class Common {
|
||||
static String enterDescription = "//div[@data-testid='enterDescription']/div/div[2]/div/div/div/div/div/div";
|
||||
|
||||
By displayName = By.name("name");
|
||||
By descriptionBoldButton = By.cssSelector("[data-testid='boldButton']");
|
||||
By descriptionItalicButton = By.cssSelector("[data-testid='italicButton']");
|
||||
By descriptionLinkButton = By.cssSelector("[data-testid='linkButton']");
|
||||
By descriptionBoldButton = By.cssSelector("[class='bold toastui-editor-toolbar-icons']");
|
||||
By descriptionItalicButton = By.cssSelector("[class='italic toastui-editor-toolbar-icons']");
|
||||
By descriptionLinkButton = By.cssSelector("[class='link toastui-editor-toolbar-icons']");
|
||||
By descriptionSaveButton = By.cssSelector("[data-testid='saveButton']");
|
||||
By addDescriptionString = By.xpath(enterDescription);
|
||||
By editTagCategoryDescription = By.cssSelector("[data-testid='edit-description']");
|
||||
@ -26,11 +26,11 @@ public class Common {
|
||||
By headerSettings = By.cssSelector("[data-testid='menu-button'][id='menu-button-Settings']");
|
||||
By explore = By.cssSelector("[data-testid='appbar-item'][id='explore']");
|
||||
By headerSettingsServices = By.cssSelector("[data-testid='menu-item-Services']");
|
||||
By addServiceButton = By.cssSelector("[data-testid='add-service-button']");
|
||||
By addServiceButton = By.cssSelector("[data-testid='add-new-service-button']");
|
||||
By noServicesAddServiceButton = By.cssSelector("[data-testid='add-new-user-button']");
|
||||
By serviceName = By.cssSelector("[data-testid='name']");
|
||||
By serviceUsername = By.cssSelector("[name='username']");
|
||||
By servicePassword = By.cssSelector("[name='password']");
|
||||
By serviceName = By.cssSelector("[data-testid='service-name']");
|
||||
By serviceUsername = By.cssSelector("[id='root_username']");
|
||||
By servicePassword = By.cssSelector("[id='root_password']");
|
||||
By nextButton = By.cssSelector("[data-testid='next-button']");
|
||||
By saveServiceButton = By.cssSelector("[data-testid='deploy-button']");
|
||||
By saveEditedService = By.cssSelector("[data-testid='save-button']");
|
||||
@ -45,10 +45,10 @@ public class Common {
|
||||
By searchResultsList = By.xpath("//div[@data-testid='search-results']/div");
|
||||
By ownerDropdown = By.cssSelector("[data-testid='owner-dropdown']");
|
||||
By ownerSearchBox = By.cssSelector("[data-testid='searchInputText']");
|
||||
By closeErrorMessage = By.cssSelector("[data-testid='dismiss']");
|
||||
By closeErrorMessage = By.cssSelector("[class='Toastify__close-button Toastify__close-button--light']");
|
||||
By serviceUrl = By.cssSelector("[data-testid='url']");
|
||||
By servicePort = By.cssSelector("[data-testid='port']");
|
||||
By databaseName = By.cssSelector("[data-testid='database']");
|
||||
By servicePort = By.cssSelector("[id='root_hostPort']");
|
||||
By databaseName = By.cssSelector("[id='root_database']");
|
||||
By addTagCategory = By.cssSelector("[data-testid='add-category']");
|
||||
By addTagButton = By.cssSelector("[data-testid='add-new-tag-button']");
|
||||
By tagCount = By.xpath("//div[@data-testid='tag-container']/div/div");
|
||||
@ -88,12 +88,20 @@ public class Common {
|
||||
By headerSettingsTeams = By.cssSelector("[data-testid='menu-item-Teams']");
|
||||
By viewMore = By.xpath("//div[@data-testid='filter-containers-2']/p");
|
||||
By home = By.cssSelector("[data-testid='image']");
|
||||
By saveWebhook = By.xpath("//button[@data-testid='save-webhook']");
|
||||
By saveWebhook = By.cssSelector("[data-testid='save-webhook']");
|
||||
By reviewCount = By.cssSelector("[data-testid='user-card-container']");
|
||||
By tagsCount = By.xpath("(//div[@data-testid='tags']/div)");
|
||||
By addGlossaryReviewer = By.cssSelector("[data-testid='add-new-reviewer']");
|
||||
By connectionConfig = By.cssSelector("[data-testid='Connection Config']");
|
||||
By connectionConfig = By.cssSelector("[data-testid='Connection']");
|
||||
By ingestion = By.cssSelector("[data-testid='Ingestions']");
|
||||
By descriptionBox = By.xpath("//div[@class='ProseMirror']");
|
||||
By focusedDescriptionBox = By.xpath("//div[@class='ProseMirror ProseMirror-focused']");
|
||||
By urlLink = By.cssSelector("[id='toastuiLinkUrlInput']");
|
||||
By linkText = By.cssSelector("[id='toastuiLinkTextInput']");
|
||||
By okButton = By.cssSelector("[class='toastui-editor-ok-button']");
|
||||
By hostPort = By.cssSelector("[id='root_hostPort']");
|
||||
By addIngestion = By.cssSelector("[data-testid='add-ingestion-button']");
|
||||
By deployButton = By.cssSelector("[data-testid='deploy-button']");
|
||||
|
||||
public List<WebElement> versionRadioButton() {
|
||||
return webDriver.findElements(versionRadioButton);
|
||||
|
||||
@ -13,4 +13,5 @@ public class DashboardServicePage {
|
||||
|
||||
By addDashboardServiceUrl = By.cssSelector("[data-testid='dashboard-url']");
|
||||
By editDashboardServiceUrl = By.cssSelector("[data-testid='dashboardUrl']");
|
||||
By hostPort = By.cssSelector("[id='root_hostPort']");
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ public class ExplorePage {
|
||||
By updatedDescription = By.xpath("(//div[@data-testid=\"description-text\"])[1]");
|
||||
By shopifyCheckbox = By.xpath("//input[@data-testid=\"checkbox\"][@id=\"shopify\"]");
|
||||
By tagSpecialCategoryCheckbox = By.xpath("//input[@data-testid=\"checkbox\"][@id=\"PersonalData.SpecialCategory\"]");
|
||||
By tierTier3Checkbox = By.xpath("//input[@data-testid='checkbox'][@id='Tier:Tier3']");
|
||||
By tierTier3Checkbox = By.xpath("//input[@data-testid='checkbox'][@id='Tier.Tier3']");
|
||||
By selectedCheckbox = By.xpath("//label[@data-testid='filter-container-Superset']/span");
|
||||
By kafka = By.cssSelector("[data-testid='checkbox'][id='Kafka']");
|
||||
By superset = By.cssSelector("[data-testid='checkbox'][id='Superset']");
|
||||
|
||||
@ -11,6 +11,6 @@ import org.openqa.selenium.WebDriver;
|
||||
public class MessagingServicePage {
|
||||
@Nonnull WebDriver webDriver;
|
||||
|
||||
By messagingServiceBrokerUrl = By.cssSelector("[data-testid='broker-url']");
|
||||
By messagingServiceSchemaRegistry = By.cssSelector("[data-testid='schema-registry']");
|
||||
By messagingServiceBootstrapServers = By.cssSelector("[id='root_bootstrapServers']");
|
||||
By messagingServiceSchemaRegistry = By.cssSelector("[id='root_schemaRegistryURL']");
|
||||
}
|
||||
|
||||
@ -11,5 +11,5 @@ import org.openqa.selenium.WebDriver;
|
||||
public class PipelineServicePage {
|
||||
@Nonnull WebDriver webDriver;
|
||||
|
||||
By pipelineServiceUrl = By.cssSelector("[data-testid='pipeline-url']");
|
||||
By pipelineServiceUrl = By.cssSelector("[id='root_pipelineUrl']");
|
||||
}
|
||||
|
||||
@ -11,11 +11,11 @@ import org.openqa.selenium.WebDriver;
|
||||
public class RolesPage {
|
||||
@Nonnull WebDriver webDriver;
|
||||
|
||||
By addRoleButton = By.cssSelector("[data-testid='add-role']");
|
||||
By addRoleButton = By.cssSelector("[data-testid='add-new-role-button']");
|
||||
By listOperation = By.cssSelector("[data-testid='select-operation']");
|
||||
By listAccess = By.cssSelector("[data-testid='select-access']");
|
||||
By ruleToggleButton = By.cssSelector("[data-testid='rule-switch']");
|
||||
By editRuleButton = By.xpath("//tbody[@data-testid='table-body']/tr/td[4]/div/span");
|
||||
By editRuleButton = By.xpath("(//tbody[@data-testid='table-body']/tr/td/div/span)[1]");
|
||||
By accessValue = By.xpath("//tbody[@data-testid='table-body']/tr/td[2]/p");
|
||||
By deleteRuleButton = By.cssSelector("[data-testid='image'][title='Delete']");
|
||||
By rolesDisplayName = By.name("displayName");
|
||||
@ -23,6 +23,9 @@ public class RolesPage {
|
||||
By addRule = By.xpath("//button[@data-testid='add-new-rule-button']");
|
||||
By operation = By.xpath("(//td[@class='tableBody-cell'])[1]");
|
||||
By access = By.xpath("(//td[@class='tableBody-cell'])[2]");
|
||||
By policiesDropdown = By.xpath("//div[@class=' css-tlfecz-indicatorContainer']");
|
||||
By listItem = By.xpath("//*[@id='react-select-2-listbox']");
|
||||
By descriptionContainer = By.cssSelector("[data-testid='viewer-container']");
|
||||
|
||||
public By selectOperation(String operation) {
|
||||
return By.cssSelector("[value='" + operation + "']");
|
||||
|
||||
@ -21,7 +21,7 @@ public class TableDetails {
|
||||
By follow = By.cssSelector("button[data-testid='follow-button']");
|
||||
By schema = By.xpath("[data-testid='Schema']");;
|
||||
By lineage = By.cssSelector("[data-testid='Lineage']");;
|
||||
By lineageComponents = By.xpath("//div[@class=\"tw-relative nowheel \"]");
|
||||
By lineageComponents = By.cssSelector("[data-testid='node-label']");
|
||||
By profiler = By.cssSelector("[data-testid='Profiler']");
|
||||
By sampleData = By.cssSelector("[data-testid='Sample Data']");;
|
||||
By selectTier1 = By.xpath("(//div[@data-testid='card-list'])[1]");
|
||||
@ -29,7 +29,7 @@ public class TableDetails {
|
||||
By addTagTextBox = By.xpath("//input[@data-testid='associatedTagName']");
|
||||
By selectTag = By.xpath("//div[@data-testid=\"list-item\"][2]");
|
||||
By saveTag = By.xpath("//button[@data-testid=\"saveAssociatedTag\"]");
|
||||
By tagName = By.xpath("(//div[@data-testid=\"tag-container\"])[1]");
|
||||
By editTags = By.xpath("(//div[@data-testid=\"tag-container\"])[1]");
|
||||
By removeTag = By.xpath("//span[@data-testid='remove']");
|
||||
By editDescriptionButton = By.xpath("//button[@data-testid= 'edit-description']");
|
||||
By editDescriptionBox = By.xpath("//div[@data-testid='enterDescription']/div/div[2]/div/div/div/div/div/div");
|
||||
@ -77,7 +77,7 @@ public class TableDetails {
|
||||
By regex = By.cssSelector("[data-testid='regex']");
|
||||
By deleteTests = By.cssSelector("[data-testid='delete']");
|
||||
By deleteSave = By.cssSelector("[data-testid='save-button']");
|
||||
By dismissToast = By.cssSelector("[data-testid='dismiss']");
|
||||
By dismissToast = By.cssSelector("[class='Toastify__close-button Toastify__close-button--light']");
|
||||
By lineageNode = By.cssSelector("[data-testid='lineage-entity']");
|
||||
By checkTabs = By.cssSelector("[data-testid='tab']");
|
||||
By addTagConversationThread = By.cssSelector("[data-testid='tag-thread']");
|
||||
|
||||
@ -35,6 +35,7 @@ public class TagsPage {
|
||||
By tagUsageCount = By.cssSelector("[data-testid='usage-count']");
|
||||
By headerSettingsTags = By.cssSelector("[data-testid='menu-item-Tags']");
|
||||
By sortBy = By.cssSelector("[data-testid='sortBy']");
|
||||
By editTags = By.xpath("(//div[@data-testid=\"tag-container\"])[1]");
|
||||
|
||||
public By tagFilter(String tagCategoryDisplayName, String tagDisplayName) {
|
||||
return By.cssSelector("[data-testid='checkbox'][id='" + tagCategoryDisplayName + "." + tagDisplayName + "']");
|
||||
|
||||
@ -35,6 +35,8 @@ public class TeamsPage {
|
||||
By teamsCount = By.xpath("//div[@id='left-panel']//p");
|
||||
By teamsDropdownCount = By.xpath("//button[@data-testid='tab']/span/span[@data-testid='filter-count']");
|
||||
By errorMessage = By.xpath("//strong[@data-testid='error-message']");
|
||||
By descriptionContainer = By.cssSelector("[data-testid='viewer-container']");
|
||||
By tableName = By.cssSelector("[data-testid='inactive-link']");
|
||||
|
||||
public List<WebElement> checkboxAddUser() {
|
||||
return webDriver.findElements(checkboxAddUser);
|
||||
|
||||
@ -15,12 +15,13 @@ public class TopicDetails {
|
||||
By selectTag = By.xpath("(//div[@data-testid=\"list-item\"])[2]");
|
||||
By selectedTag =
|
||||
By.xpath("//span[@class=\"tw-no-underline hover:tw-no-underline tw-py-0.5 tw-px-2 tw-pl-2 tw-pr-1\"]");
|
||||
By breadCrumbTags = By.xpath("//div[@data-testid='breadcrumb-tags']/div");
|
||||
By breadCrumbTags = By.xpath("//div[@data-testid='entity-tags']/div/span");
|
||||
By editDescriptionButton = By.xpath("//button[@data-testid=\"edit-description\"]");
|
||||
By config = By.cssSelector("[data-testid = 'Config']");
|
||||
By manage = By.cssSelector("[data-testid ='Manage']");
|
||||
By topicName = By.linkText("orders");
|
||||
By ownerName = By.xpath("//div[@data-testid='list-item']");
|
||||
By descriptionContainer = By.cssSelector("[data-testid='viewer-container']");
|
||||
|
||||
public String getOwnerName() {
|
||||
return webDriver.findElement(ownerName).getText();
|
||||
|
||||
@ -14,11 +14,12 @@ public class Webhooks {
|
||||
By webhookLink = By.linkText("Webhooks");
|
||||
By addWebhook = By.cssSelector("[data-testid='add-webhook-button']");
|
||||
By name = By.xpath("//input[@data-testid='name']");
|
||||
By descriptionBox = By.xpath("//div[@class='notranslate public-DraftEditor-content']");
|
||||
By descriptionBox = By.xpath("//div[@class='ProseMirror']");
|
||||
By focusedDescriptionBox = By.xpath("//div[@class='ProseMirror ProseMirror-focused']");
|
||||
By endpoint = By.xpath("//input[@data-testid='endpoint-url']");
|
||||
By checkbox = By.xpath("//input[@data-testid='checkbox']");
|
||||
By checkbox = By.xpath("//input[@data-testid='entity-created-checkbox']");
|
||||
By entityCreatedMenu = By.xpath("(//button[@id='menu-button-select entities'])[1]");
|
||||
By allEntities = By.xpath("(//input[@type='checkbox'])[2]");
|
||||
By checkWebhook = By.xpath("//button[@data-testid='webhook-link']");
|
||||
By toast = By.xpath("(//div[@data-testid='toast']/div)[2]");
|
||||
By toast = By.xpath("(//div[@class='Toastify__toast-body']/div)[2]");
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ public class WebhooksPageTest {
|
||||
Events.click(webDriver, webhooks.addWebhook());
|
||||
Events.sendKeys(webDriver, webhooks.name(), name);
|
||||
Events.click(webDriver, webhooks.descriptionBox());
|
||||
Events.sendKeys(webDriver, webhooks.descriptionBox(), "test");
|
||||
Events.sendKeys(webDriver, webhooks.focusedDescriptionBox(), "test");
|
||||
Events.sendKeys(webDriver, webhooks.endpoint(), "https://www.example.com");
|
||||
Events.click(webDriver, webhooks.checkbox());
|
||||
Thread.sleep(waitTime);
|
||||
@ -93,7 +93,7 @@ public class WebhooksPageTest {
|
||||
Events.click(webDriver, webhooks.addWebhook());
|
||||
Events.sendKeys(webDriver, webhooks.name(), name);
|
||||
Events.click(webDriver, webhooks.descriptionBox());
|
||||
Events.sendKeys(webDriver, webhooks.descriptionBox(), "test");
|
||||
Events.sendKeys(webDriver, webhooks.focusedDescriptionBox(), "test");
|
||||
Events.sendKeys(webDriver, webhooks.endpoint(), "https://www.example.com");
|
||||
Events.click(webDriver, webhooks.checkbox());
|
||||
Events.click(webDriver, webhooks.entityCreatedMenu());
|
||||
@ -116,7 +116,7 @@ public class WebhooksPageTest {
|
||||
Events.click(webDriver, webhooks.addWebhook());
|
||||
Events.sendKeys(webDriver, webhooks.name(), "");
|
||||
Events.click(webDriver, webhooks.descriptionBox());
|
||||
Events.sendKeys(webDriver, webhooks.descriptionBox(), "test");
|
||||
Events.sendKeys(webDriver, webhooks.focusedDescriptionBox(), "test");
|
||||
Events.sendKeys(webDriver, webhooks.endpoint(), "test.com");
|
||||
Events.click(webDriver, webhooks.checkbox());
|
||||
Thread.sleep(waitTime);
|
||||
@ -138,7 +138,7 @@ public class WebhooksPageTest {
|
||||
Events.click(webDriver, webhooks.addWebhook());
|
||||
Events.sendKeys(webDriver, webhooks.name(), "test");
|
||||
Events.click(webDriver, webhooks.descriptionBox());
|
||||
Events.sendKeys(webDriver, webhooks.descriptionBox(), "test");
|
||||
Events.sendKeys(webDriver, webhooks.focusedDescriptionBox(), "test");
|
||||
Events.sendKeys(webDriver, webhooks.endpoint(), "");
|
||||
Events.click(webDriver, webhooks.checkbox());
|
||||
Events.click(webDriver, webhooks.entityCreatedMenu());
|
||||
@ -159,7 +159,7 @@ public class WebhooksPageTest {
|
||||
Events.click(webDriver, webhooks.addWebhook());
|
||||
Events.sendKeys(webDriver, webhooks.name(), "test");
|
||||
Events.click(webDriver, webhooks.descriptionBox());
|
||||
Events.sendKeys(webDriver, webhooks.descriptionBox(), "test");
|
||||
Events.sendKeys(webDriver, webhooks.focusedDescriptionBox(), "test");
|
||||
Events.sendKeys(webDriver, webhooks.endpoint(), "https://www.test.com");
|
||||
Events.click(webDriver, common.saveWebhook());
|
||||
WebElement errorMessage = webDriver.findElement(common.errorMessage());
|
||||
|
||||
@ -88,15 +88,15 @@ public class CommonTests {
|
||||
// actions.moveToElement(webDriver.findElement(common.editAssociatedTagButton())).perform();
|
||||
Events.click(webDriver, common.editAssociatedTagButton());
|
||||
Events.click(webDriver, common.enterAssociatedTagName());
|
||||
Events.sendKeys(webDriver, common.enterAssociatedTagName(), "PersonalData:Personal");
|
||||
Events.sendKeys(webDriver, common.enterAssociatedTagName(), "PersonalData.Personal");
|
||||
Events.click(webDriver, common.tagListItem());
|
||||
Events.sendKeys(webDriver, common.enterAssociatedTagName(), "User.FacePhoto");
|
||||
Events.sendKeys(webDriver, common.enterAssociatedTagName(), "PII.None");
|
||||
Events.click(webDriver, common.tagListItem());
|
||||
Events.click(webDriver, common.saveAssociatedTag());
|
||||
Thread.sleep(waitTime);
|
||||
webDriver.navigate().refresh();
|
||||
Thread.sleep(waitTime);
|
||||
Object tagCount = webDriver.findElements(common.containsText("#PersonalData:Personal")).size();
|
||||
Object tagCount = webDriver.findElements(common.containsText("#PersonalData.Personal")).size();
|
||||
Assert.assertEquals(tagCount, 1);
|
||||
}
|
||||
|
||||
@ -107,9 +107,10 @@ public class CommonTests {
|
||||
Events.click(webDriver, common.headerSettings()); // Setting
|
||||
Events.click(webDriver, common.headerSettingsMenu("Tags")); // Setting/Tags
|
||||
Events.click(webDriver, common.addTagCategory());
|
||||
Thread.sleep(2000);
|
||||
Thread.sleep(waitTime);
|
||||
Events.sendKeys(webDriver, common.displayName(), tagCategoryDisplayName);
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionBox());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Thread.sleep(waitTime);
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
Thread.sleep(waitTime);
|
||||
@ -118,7 +119,8 @@ public class CommonTests {
|
||||
Events.click(webDriver, common.addTagButton());
|
||||
wait.until(ExpectedConditions.elementToBeClickable(common.displayName()));
|
||||
Events.sendKeys(webDriver, common.displayName(), "Testing Tag");
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionBox());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
Thread.sleep(waitTime);
|
||||
URL tagUrl = new URL(url + urlTag + tagCategoryDisplayName + "/");
|
||||
@ -135,9 +137,9 @@ public class CommonTests {
|
||||
Events.click(webDriver, common.headerSettings()); // Setting
|
||||
Events.click(webDriver, common.headerSettingsMenu("Tags")); // Setting/Tags
|
||||
Events.click(webDriver, common.addTagCategory());
|
||||
wait.until(ExpectedConditions.elementToBeClickable(webDriver.findElement(common.displayName())));
|
||||
Events.sendKeys(webDriver, common.displayName(), "Space Tag");
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionBox());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
webDriver.navigate().refresh();
|
||||
URL tagUrl = new URL(url + urlTag);
|
||||
@ -159,11 +161,11 @@ public class CommonTests {
|
||||
} else {
|
||||
Events.click(webDriver, common.noServicesAddServiceButton());
|
||||
}
|
||||
Events.click(webDriver, common.serviceType("MySQL"));
|
||||
Events.click(webDriver, common.serviceType("Mysql"));
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.sendKeys(webDriver, common.serviceName(), " ");
|
||||
Events.click(webDriver, common.descriptionBoldButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.nextButton());
|
||||
wait.until(ExpectedConditions.presenceOfElementLocated(common.containsText("Service name is required.")));
|
||||
WebElement emptyName = webDriver.findElement(common.containsText("Service name is required."));
|
||||
@ -202,7 +204,8 @@ public class CommonTests {
|
||||
Events.click(webDriver, common.addTagCategory());
|
||||
wait.until(ExpectedConditions.elementToBeClickable(common.displayName()));
|
||||
Events.sendKeys(webDriver, common.displayName(), "personalData");
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionBox());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
String errorMessage = webDriver.findElement(common.errorMessage()).getAttribute("innerHTML");
|
||||
Thread.sleep(2000);
|
||||
@ -219,7 +222,8 @@ public class CommonTests {
|
||||
Events.click(webDriver, common.addTagButton());
|
||||
wait.until(ExpectedConditions.elementToBeClickable(common.displayName()));
|
||||
Events.sendKeys(webDriver, common.displayName(), "personal");
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionBox());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
String errorMessage = webDriver.findElement(common.errorMessage()).getAttribute("innerHTML");
|
||||
Thread.sleep(2000);
|
||||
@ -235,7 +239,8 @@ public class CommonTests {
|
||||
Events.click(webDriver, common.addTagCategory());
|
||||
wait.until(ExpectedConditions.elementToBeClickable(common.displayName()));
|
||||
Events.sendKeys(webDriver, common.displayName(), "P");
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionBox());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
String errorMessage = webDriver.findElement(common.errorMessage()).getAttribute("innerHTML");
|
||||
Thread.sleep(2000);
|
||||
@ -251,7 +256,8 @@ public class CommonTests {
|
||||
Events.click(webDriver, common.addTagCategory());
|
||||
wait.until(ExpectedConditions.elementToBeClickable(common.displayName()));
|
||||
Events.sendKeys(webDriver, common.displayName(), "PersonalData-DataPlatform-PersonalData");
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionBox());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
String errorMessage = webDriver.findElement(common.errorMessage()).getAttribute("innerHTML");
|
||||
Thread.sleep(2000);
|
||||
@ -268,7 +274,8 @@ public class CommonTests {
|
||||
Events.click(webDriver, common.addTagButton());
|
||||
wait.until(ExpectedConditions.elementToBeClickable(common.displayName()));
|
||||
Events.sendKeys(webDriver, common.displayName(), "P");
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionBox());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
String errorMessage = webDriver.findElement(common.errorMessage()).getAttribute("innerHTML");
|
||||
Thread.sleep(2000);
|
||||
@ -285,7 +292,8 @@ public class CommonTests {
|
||||
Events.click(webDriver, common.addTagButton());
|
||||
wait.until(ExpectedConditions.elementToBeClickable(common.displayName()));
|
||||
Events.sendKeys(webDriver, common.displayName(), "PersonalData-DataPlatform-PersonalData");
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionBox());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
String errorMessage = webDriver.findElement(common.errorMessage()).getAttribute("innerHTML");
|
||||
Thread.sleep(2000);
|
||||
@ -348,21 +356,25 @@ public class CommonTests {
|
||||
Events.click(webDriver, common.saveAssociatedTag());
|
||||
Events.click(webDriver, common.editAssociatedTagButton());
|
||||
Events.click(webDriver, common.enterAssociatedTagName());
|
||||
for (int i = 0; i <= 1; i++) {
|
||||
Events.sendKeys(webDriver, common.enterAssociatedTagName(), "U");
|
||||
for (int i = 0; i < 2; i++) {
|
||||
Events.sendKeys(webDriver, common.enterAssociatedTagName(), "P");
|
||||
Events.click(webDriver, common.tagListItem());
|
||||
count = count + 1;
|
||||
}
|
||||
Events.click(webDriver, common.saveAssociatedTag());
|
||||
Thread.sleep(2000);
|
||||
Thread.sleep(waitTime);
|
||||
Events.click(webDriver, common.editAssociatedTagButton());
|
||||
Object tagsCount = webDriver.findElements(common.tagCount()).size();
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.explore());
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.viewMore());
|
||||
Object tagsFilterCount = webDriver.findElements(common.tagFilterCount()).size();
|
||||
Assert.assertEquals(tagsFilterCount.toString(), count);
|
||||
Thread.sleep(waitTime);
|
||||
try {
|
||||
Events.click(webDriver, common.viewMore());
|
||||
Object tagsFilterCount = webDriver.findElements(common.tagFilterCount()).size();
|
||||
Assert.assertEquals(Integer.parseInt(tagsFilterCount.toString()), count);
|
||||
} catch (NoSuchElementException | TimeoutException e) {
|
||||
Object tagsFilterCount = webDriver.findElements(common.tagFilterCount()).size();
|
||||
Assert.assertEquals(Integer.parseInt(tagsFilterCount.toString()), count);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@ -64,6 +64,7 @@ public class PaginationAndFilterTest {
|
||||
webDriver.get(url);
|
||||
}
|
||||
|
||||
/* DO NOT DELETE
|
||||
@Test
|
||||
@Order(1)
|
||||
public void checkFlikerInFilter() throws Exception {
|
||||
@ -83,7 +84,7 @@ public class PaginationAndFilterTest {
|
||||
} catch (TimeoutException exception) {
|
||||
LOG.info("Success");
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
@Test
|
||||
@Order(2)
|
||||
@ -109,7 +110,7 @@ public class PaginationAndFilterTest {
|
||||
Events.click(webDriver, common.closeWhatsNew());
|
||||
Thread.sleep(waitTime);
|
||||
Events.click(webDriver, common.selectOverview("tables"));
|
||||
Events.click(webDriver, common.selectFilterExplore("Tier:Tier3"));
|
||||
Events.click(webDriver, common.selectFilterExplore("Tier.Tier3"));
|
||||
try {
|
||||
WebElement dataFound = wait.until(ExpectedConditions.presenceOfElementLocated(common.searchResults()));
|
||||
if (dataFound.isDisplayed()) {
|
||||
@ -170,7 +171,7 @@ public class PaginationAndFilterTest {
|
||||
actions.moveToElement(webDriver.findElement(common.editAssociatedTagButton())).perform();
|
||||
Events.click(webDriver, common.editAssociatedTagButton());
|
||||
Events.click(webDriver, common.enterAssociatedTagName());
|
||||
for (int i = 0; i <= 6; i++) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
Events.sendKeys(webDriver, common.enterAssociatedTagName(), "P");
|
||||
Events.click(webDriver, common.tagListItem());
|
||||
}
|
||||
@ -184,9 +185,9 @@ public class PaginationAndFilterTest {
|
||||
if (viewMore.isDisplayed()) {
|
||||
Events.click(webDriver, common.viewMore());
|
||||
}
|
||||
Events.click(webDriver, common.selectFilterExplore("PersonalData:Personal"));
|
||||
Events.click(webDriver, common.selectFilterExplore("PersonalData.Personal"));
|
||||
} catch (TimeoutException | NoSuchElementException e) {
|
||||
Events.click(webDriver, common.selectFilterExplore("PersonalData:Personal"));
|
||||
Events.click(webDriver, common.selectFilterExplore("PersonalData.Personal"));
|
||||
}
|
||||
Events.click(webDriver, common.selectFilterExplore("shopify"));
|
||||
Thread.sleep(2000);
|
||||
|
||||
@ -2,11 +2,8 @@ package org.openmetadata.catalog.selenium.pages.common;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.Duration;
|
||||
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 java.util.ArrayList;
|
||||
import org.junit.jupiter.api.*;
|
||||
import org.openmetadata.catalog.selenium.events.Events;
|
||||
import org.openmetadata.catalog.selenium.objectRepository.Common;
|
||||
import org.openmetadata.catalog.selenium.properties.Property;
|
||||
@ -60,7 +57,7 @@ public class PostIngestionTests {
|
||||
Events.click(webDriver, common.headerItem("explore"));
|
||||
Thread.sleep(waitTime);
|
||||
Events.sendKeys(webDriver, common.searchBar(), dashboard);
|
||||
Events.click(webDriver, common.selectSuggestionSearch("sample_superset:34"));
|
||||
Events.click(webDriver, common.selectSuggestionSearch("sample_superset34"));
|
||||
Events.click(webDriver, common.manage());
|
||||
Events.click(webDriver, common.ownerDropdown());
|
||||
Events.sendKeys(webDriver, common.ownerSearchBox(), "Cloud");
|
||||
@ -76,8 +73,21 @@ public class PostIngestionTests {
|
||||
Events.click(webDriver, common.headerItem("explore"));
|
||||
Thread.sleep(waitTime);
|
||||
Events.sendKeys(webDriver, common.searchBar(), dashboard);
|
||||
Events.click(webDriver, common.selectSuggestionSearch("sample_superset:34"));
|
||||
Events.click(webDriver, common.selectSuggestionSearch("sample_superset34"));
|
||||
Events.click(webDriver, common.manage());
|
||||
Events.click(webDriver, common.containsText("Cloud_Infra"));
|
||||
}
|
||||
|
||||
@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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,7 +85,6 @@ public class UiExceptionHandling {
|
||||
Events.click(webDriver, common.headerSettings());
|
||||
interceptor("/api/v1/teams", "/api/v1/testing");
|
||||
Events.click(webDriver, common.headerSettingsMenu("Users"));
|
||||
Events.click(webDriver, common.containsText("Error while fetching teams!"));
|
||||
Events.click(webDriver, common.closeErrorMessage());
|
||||
// Assert.assertEquals(400, 400);
|
||||
}
|
||||
@ -101,35 +100,25 @@ public class UiExceptionHandling {
|
||||
// Assert.assertEquals(500, 500);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void exceptionCheckFor() {
|
||||
interceptor("services/databaseServices", "services/testing");
|
||||
Events.click(webDriver, common.closeWhatsNew()); // Close What's new
|
||||
Events.click(webDriver, common.headerSettings()); // Setting
|
||||
Events.click(webDriver, common.headerSettingsMenu("Services")); // Setting/Services
|
||||
}
|
||||
|
||||
@Test
|
||||
public void exceptionCheckForPostService() {
|
||||
Events.click(webDriver, common.closeWhatsNew());
|
||||
Events.click(webDriver, common.headerSettings()); // Setting
|
||||
Events.click(webDriver, common.headerSettingsMenu("Services")); // Setting/Services
|
||||
Events.click(webDriver, common.noServicesAddServiceButton());
|
||||
Events.click(webDriver, common.serviceType("MySQL"));
|
||||
Events.click(webDriver, common.addServiceButton());
|
||||
Events.click(webDriver, common.serviceType("Mysql"));
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.sendKeys(webDriver, common.serviceName(), serviceName);
|
||||
Events.click(webDriver, common.descriptionBoldButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.sendKeys(webDriver, common.serviceUrl(), "localhost");
|
||||
Events.sendKeys(webDriver, common.servicePort(), "3306");
|
||||
// Events.sendKeys(webDriver, common.serviceUrl(), "localhost");
|
||||
Events.sendKeys(webDriver, common.serviceUsername(), "openmetadata_user");
|
||||
Events.sendKeys(webDriver, common.servicePassword(), "openmetadata_password");
|
||||
Events.sendKeys(webDriver, common.servicePort(), "3306");
|
||||
Events.sendKeys(webDriver, common.databaseName(), "openmetadata_db");
|
||||
interceptor("services/databaseServices", "services/testing");
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.click(webDriver, common.saveServiceButton());
|
||||
Events.click(webDriver, common.saveManage());
|
||||
// Assert.assertEquals(500, 500);
|
||||
}
|
||||
|
||||
@ -138,13 +127,11 @@ public class UiExceptionHandling {
|
||||
Events.click(webDriver, common.closeWhatsNew());
|
||||
Events.click(webDriver, common.headerSettings()); // Setting
|
||||
Events.click(webDriver, common.headerSettingsMenu("Services")); // Setting/Services
|
||||
Events.click(webDriver, common.containsText("bigquery_gcp"));
|
||||
Events.click(webDriver, common.containsText("Glue"));
|
||||
Events.click(webDriver, common.editTagCategoryDescription());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
interceptor("services/databaseServices", "services/testing");
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
Events.click(webDriver, common.containsText("Error while updating description!"));
|
||||
Events.click(webDriver, common.closeErrorMessage());
|
||||
// Assert.assertEquals(500, 500);
|
||||
}
|
||||
@ -154,7 +141,7 @@ public class UiExceptionHandling {
|
||||
Events.click(webDriver, common.closeWhatsNew());
|
||||
Events.click(webDriver, common.headerSettings()); // Setting
|
||||
Events.click(webDriver, common.headerSettingsMenu("Services")); // Setting/Services
|
||||
Events.click(webDriver, common.deleteServiceButton("bigquery_gcp"));
|
||||
Events.click(webDriver, common.deleteServiceButton("Glue"));
|
||||
interceptor("services/databaseServices", "services/testing");
|
||||
// Assert.assertEquals(500, 500);
|
||||
}
|
||||
|
||||
@ -90,15 +90,15 @@ public class DashboardDetailsPageTest {
|
||||
Events.click(webDriver, dashboardDetails.dashboard());
|
||||
Events.click(webDriver, common.selectTable());
|
||||
Events.click(webDriver, common.editDescriptionButton());
|
||||
Events.sendKeys(webDriver, common.editDescriptionBox(), Keys.CONTROL + "A");
|
||||
Events.sendKeys(webDriver, common.editDescriptionBox(), description);
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), Keys.CONTROL + "A");
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), description);
|
||||
Thread.sleep(waitTime);
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
Thread.sleep(waitTime);
|
||||
webDriver.navigate().refresh();
|
||||
Events.click(webDriver, common.editDescriptionButton());
|
||||
Events.sendKeys(webDriver, common.editDescriptionBox(), Keys.CONTROL + "A");
|
||||
Events.sendKeys(webDriver, common.editDescriptionBox(), updatedDescription);
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), Keys.CONTROL + "A");
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), updatedDescription);
|
||||
Thread.sleep(waitTime);
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
Thread.sleep(waitTime);
|
||||
@ -162,14 +162,14 @@ public class DashboardDetailsPageTest {
|
||||
Events.click(webDriver, common.selectTableLink(1));
|
||||
actions.moveToElement(webDriver.findElement(dashboardDetails.editChartDescription()));
|
||||
Events.click(webDriver, dashboardDetails.editChartDescription());
|
||||
Events.sendKeys(webDriver, common.editDescriptionBox(), description);
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), description);
|
||||
Thread.sleep(waitTime);
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
Thread.sleep(waitTime);
|
||||
webDriver.navigate().refresh();
|
||||
actions.moveToElement(webDriver.findElement(dashboardDetails.editChartDescription()));
|
||||
Events.click(webDriver, dashboardDetails.editChartDescription());
|
||||
Events.sendKeys(webDriver, common.editDescriptionBox(), updatedDescription);
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), updatedDescription);
|
||||
Thread.sleep(waitTime);
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
Thread.sleep(waitTime);
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
/* DO NOT DELETE
|
||||
package org.openmetadata.catalog.selenium.pages.dashboardDetails;
|
||||
|
||||
import com.github.javafaker.Faker;
|
||||
@ -33,7 +34,7 @@ public class DashboardDetailsUIErrorHandlingTest {
|
||||
static String serviceName = faker.name().firstName();
|
||||
String webDriverInstance = Property.getInstance().getWebDriver();
|
||||
String webDriverPath = Property.getInstance().getWebDriverPath();
|
||||
static By toastMessage = By.cssSelector("[data-testid='toast']");
|
||||
static By toastMessage = By.xpath("(//div[@class='Toastify__toast-body']/div)[2]");
|
||||
List<WebElement> checkTabs = new ArrayList<>();
|
||||
WebElement explore;
|
||||
WebElement headerSettings;
|
||||
@ -178,7 +179,7 @@ public class DashboardDetailsUIErrorHandlingTest {
|
||||
Events.click(webDriver, common.dashboard());
|
||||
Events.click(webDriver, common.selectTableLink(1));
|
||||
Events.click(webDriver, tableDetails.editDescriptionButton());
|
||||
Events.sendKeys(webDriver, tableDetails.editDescriptionBox(), "updatedDescription");
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), "updatedDescription");
|
||||
interceptor.interceptor("/api/v1/dashboards", "/api/v1/test");
|
||||
Events.click(webDriver, tableDetails.saveTableDescription());
|
||||
Thread.sleep(2000);
|
||||
@ -288,3 +289,4 @@ public class DashboardDetailsUIErrorHandlingTest {
|
||||
webDriver.switchTo().window(tabs.get(0)).close();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@ -94,21 +94,22 @@ public class DashboardServiceTestPage {
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.sendKeys(webDriver, common.serviceName(), serviceName);
|
||||
Events.click(webDriver, common.descriptionBoldButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionItalicButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionLinkButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.urlLink(), "www.google.com");
|
||||
Events.sendKeys(webDriver, common.linkText(), "Looker");
|
||||
Events.click(webDriver, common.okButton());
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.sendKeys(webDriver, dashboardServicePage.addDashboardServiceUrl(), "localhost:8080");
|
||||
Events.sendKeys(webDriver, common.serviceUsername(), "openmetadata_user");
|
||||
Events.sendKeys(webDriver, common.servicePassword(), "openmetadata_password");
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.click(webDriver, common.saveServiceButton());
|
||||
Events.sendKeys(webDriver, dashboardServicePage.hostPort(), "localhost:8080");
|
||||
Events.click(webDriver, common.saveManage());
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -118,8 +119,7 @@ public class DashboardServiceTestPage {
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.containsText(serviceName));
|
||||
Events.click(webDriver, common.editTagCategoryDescription());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
}
|
||||
|
||||
@ -130,10 +130,10 @@ public class DashboardServiceTestPage {
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.containsText(serviceName));
|
||||
Events.click(webDriver, common.connectionConfig());
|
||||
Events.sendKeys(webDriver, dashboardServicePage.editDashboardServiceUrl(), "1");
|
||||
Events.sendKeys(webDriver, common.serviceUsername(), "1");
|
||||
Events.sendKeys(webDriver, common.servicePassword(), "1");
|
||||
Events.click(webDriver, common.saveConnectionConfig());
|
||||
Events.sendKeys(webDriver, dashboardServicePage.hostPort(), "test");
|
||||
Events.sendKeys(webDriver, common.serviceUsername(), "test");
|
||||
Events.sendKeys(webDriver, common.servicePassword(), "test");
|
||||
Events.click(webDriver, common.saveManage());
|
||||
Thread.sleep(2000);
|
||||
try {
|
||||
WebElement errorText = webDriver.findElement(common.containsText("Error while updating service"));
|
||||
|
||||
@ -91,32 +91,38 @@ public class DatabaseServicePageTest {
|
||||
} else {
|
||||
Events.click(webDriver, common.addServiceButton());
|
||||
}
|
||||
Events.click(webDriver, common.serviceType("MySQL"));
|
||||
Events.click(webDriver, common.serviceType("Mysql"));
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.sendKeys(webDriver, common.serviceName(), serviceName);
|
||||
Events.click(webDriver, common.descriptionBoldButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionItalicButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionLinkButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.urlLink(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.linkText(), faker.address().firstName());
|
||||
Events.click(webDriver, common.okButton());
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.sendKeys(webDriver, common.serviceUrl(), "localhost");
|
||||
Events.sendKeys(webDriver, common.servicePort(), "3306");
|
||||
Events.click(webDriver, common.serviceUsername());
|
||||
Events.sendKeys(webDriver, common.serviceUsername(), "openmetadata_user");
|
||||
Events.click(webDriver, common.servicePassword());
|
||||
Events.sendKeys(webDriver, common.servicePassword(), "openmetadata_password");
|
||||
Events.click(webDriver, common.hostPort());
|
||||
Events.sendKeys(webDriver, common.hostPort(), "localhost");
|
||||
Events.click(webDriver, common.databaseName());
|
||||
Events.sendKeys(webDriver, common.databaseName(), "openmetadata_db");
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.click(webDriver, common.saveServiceButton());
|
||||
Events.click(webDriver, common.saveManage());
|
||||
Thread.sleep(waitTime);
|
||||
webDriver.navigate().refresh();
|
||||
Events.click(webDriver, common.addIngestion());
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.click(webDriver, common.deployButton());
|
||||
Events.click(webDriver, common.headerSettings());
|
||||
Events.click(webDriver, common.headerSettingsMenu("Services"));
|
||||
Events.click(webDriver, common.containsText(serviceName));
|
||||
// Thread.sleep(5000); // for data ingestion
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -126,8 +132,7 @@ public class DatabaseServicePageTest {
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.containsText(serviceName));
|
||||
Events.click(webDriver, common.editTagCategoryDescription());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
}
|
||||
|
||||
@ -136,7 +141,7 @@ public class DatabaseServicePageTest {
|
||||
public void checkIngestionTab() throws InterruptedException {
|
||||
openDatabaseServicePage();
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.containsText(serviceName));
|
||||
Events.click(webDriver, common.containsText("Tabatha"));
|
||||
Events.click(webDriver, common.ingestion());
|
||||
try {
|
||||
WebElement runIngestion =
|
||||
@ -150,21 +155,11 @@ public class DatabaseServicePageTest {
|
||||
webDriver.navigate().refresh();
|
||||
Events.click(webDriver, databaseServicePage.editIngestion()); // edit ingestion
|
||||
Events.click(webDriver, common.nextButton());
|
||||
try {
|
||||
WebElement nextButton = wait.until(ExpectedConditions.presenceOfElementLocated(common.nextButton()));
|
||||
Thread.sleep(2000);
|
||||
if (nextButton.isDisplayed()) {
|
||||
nextButton.click();
|
||||
}
|
||||
} catch (TimeoutException | NoSuchElementException e) {
|
||||
Assert.fail("Next button not found");
|
||||
}
|
||||
Events.click(webDriver, common.saveServiceButton());
|
||||
|
||||
Events.click(webDriver, common.deployButton());
|
||||
webDriver.navigate().refresh();
|
||||
Thread.sleep(waitTime);
|
||||
Events.click(webDriver, databaseServicePage.deleteIngestion()); // delete ingestion
|
||||
Events.click(webDriver, common.saveEditedService());
|
||||
Events.click(webDriver, common.deployButton());
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -174,9 +169,9 @@ public class DatabaseServicePageTest {
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.containsText(serviceName));
|
||||
Events.click(webDriver, common.connectionConfig());
|
||||
Events.sendKeys(webDriver, common.serviceUsername(), "1");
|
||||
Events.sendKeys(webDriver, common.servicePassword(), "1");
|
||||
Events.sendKeys(webDriver, common.databaseName(), "1");
|
||||
Events.sendKeys(webDriver, common.serviceUsername(), "test");
|
||||
Events.sendKeys(webDriver, common.servicePassword(), "test");
|
||||
Events.sendKeys(webDriver, common.databaseName(), "test");
|
||||
Events.click(webDriver, common.saveConnectionConfig());
|
||||
Thread.sleep(2000);
|
||||
try {
|
||||
@ -193,7 +188,6 @@ public class DatabaseServicePageTest {
|
||||
@Order(6)
|
||||
public void deleteDatabaseService() throws InterruptedException {
|
||||
openDatabaseServicePage();
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.deleteServiceButton(serviceName));
|
||||
Events.click(webDriver, common.saveEditedService());
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ class Explore {
|
||||
List<Integer> count = new ArrayList<>();
|
||||
for (WebElement sName : explorePage.serviceName()) {
|
||||
Names.add(sName.getText());
|
||||
if (Names.contains("Tier1")) {
|
||||
if (Names.contains("sample_data")) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -105,6 +105,7 @@ class Explore {
|
||||
openExplorePage();
|
||||
Events.click(webDriver, explorePage.topics());
|
||||
WebElement topCount = webDriver.findElement(explorePage.topicCount());
|
||||
Thread.sleep(waitTime);
|
||||
int topicCount = Integer.parseInt(topCount.getText());
|
||||
int getServiceCount = 0;
|
||||
List<WebElement> countOfItems = explorePage.serviceCount();
|
||||
@ -112,7 +113,7 @@ class Explore {
|
||||
List<Integer> count = new ArrayList<>();
|
||||
for (WebElement sName : explorePage.serviceName()) {
|
||||
Names.add(sName.getText());
|
||||
if (Names.contains("Tier1")) {
|
||||
if (Names.contains("sample_kafka")) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -126,11 +127,12 @@ class Explore {
|
||||
|
||||
@Test
|
||||
@Order(4)
|
||||
void checkDashboardCount() {
|
||||
void checkDashboardCount() throws InterruptedException {
|
||||
webDriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
|
||||
openExplorePage();
|
||||
Events.click(webDriver, explorePage.dashboard());
|
||||
WebElement dashCount = webDriver.findElement(explorePage.dashboardCount());
|
||||
Thread.sleep(waitTime);
|
||||
int dashboardCount = Integer.parseInt(dashCount.getText());
|
||||
int getServiceCount = 0;
|
||||
List<WebElement> countOfItems = explorePage.serviceCount();
|
||||
@ -138,7 +140,7 @@ class Explore {
|
||||
List<Integer> count = new ArrayList<>();
|
||||
for (WebElement sName : explorePage.serviceName()) {
|
||||
Names.add(sName.getText());
|
||||
if (Names.contains("Tier1")) {
|
||||
if (Names.contains("sample_superset")) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -152,11 +154,12 @@ class Explore {
|
||||
|
||||
@Test
|
||||
@Order(5)
|
||||
void checkPipelineCount() {
|
||||
void checkPipelineCount() throws InterruptedException {
|
||||
webDriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
|
||||
openExplorePage();
|
||||
Events.click(webDriver, explorePage.pipeline());
|
||||
WebElement pipCount = webDriver.findElement(explorePage.pipelineCount());
|
||||
Thread.sleep(waitTime);
|
||||
int pipelineCount = Integer.parseInt(pipCount.getText());
|
||||
int getServiceCount = 0;
|
||||
List<WebElement> countOfItems = explorePage.serviceCount();
|
||||
@ -164,7 +167,7 @@ class Explore {
|
||||
List<Integer> count = new ArrayList<>();
|
||||
for (WebElement sName : explorePage.serviceName()) {
|
||||
Names.add(sName.getText());
|
||||
if (Names.contains("Tier1")) {
|
||||
if (Names.contains("sample_airflow")) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -216,8 +219,8 @@ class Explore {
|
||||
// Adding description to check last updated sort
|
||||
Events.click(webDriver, common.selectTableLink(1));
|
||||
Events.click(webDriver, tableDetails.editDescriptionButton());
|
||||
Events.sendKeys(webDriver, tableDetails.editDescriptionBox(), Keys.CONTROL + "A");
|
||||
Events.sendKeys(webDriver, tableDetails.editDescriptionBox(), sendKeys);
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), Keys.CONTROL + "A");
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), sendKeys);
|
||||
Events.click(webDriver, tableDetails.saveTableDescription());
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, explorePage.explore());
|
||||
|
||||
@ -77,15 +77,13 @@ public class GlossaryPageTest {
|
||||
}
|
||||
Events.sendKeys(webDriver, common.displayName(), glossaryName);
|
||||
Events.click(webDriver, common.descriptionBoldButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionItalicButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.click(webDriver, common.descriptionLinkButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, glossary.addReviewerButton());
|
||||
for (int i = 1; i <= 3; i++) {
|
||||
Events.click(webDriver, glossary.checkboxAddUser(i));
|
||||
@ -179,15 +177,17 @@ public class GlossaryPageTest {
|
||||
Events.click(webDriver, common.selectUser());
|
||||
Events.sendKeys(webDriver, common.displayName(), termName);
|
||||
Events.click(webDriver, common.descriptionBoldButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionItalicButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionLinkButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.urlLink(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.linkText(), faker.address().firstName());
|
||||
Events.click(webDriver, common.okButton());
|
||||
Events.click(webDriver, glossary.addReviewerButton());
|
||||
for (int i = 1; i <= 2; i++) {
|
||||
Events.click(webDriver, glossary.checkboxAddUser(i));
|
||||
|
||||
@ -90,32 +90,22 @@ public class MessagingServicePageTest {
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.sendKeys(webDriver, common.serviceName(), serviceName);
|
||||
Events.click(webDriver, common.descriptionBoldButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionItalicButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionLinkButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.urlLink(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.linkText(), faker.name().firstName());
|
||||
Events.click(webDriver, common.okButton());
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.sendKeys(webDriver, messagingServicePage.messagingServiceBrokerUrl(), "localhost:8080, localhost:9092");
|
||||
Events.sendKeys(
|
||||
webDriver, messagingServicePage.messagingServiceBootstrapServers(), "localhost:8080, localhost:9092");
|
||||
Events.sendKeys(webDriver, messagingServicePage.messagingServiceSchemaRegistry(), "https://localhost:8081");
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.click(webDriver, common.saveServiceButton());
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(3)
|
||||
public void checkMessagingServiceDetails() throws InterruptedException {
|
||||
openMessagingServicePage();
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.containsText(serviceName));
|
||||
Events.click(webDriver, common.connectionConfig());
|
||||
Events.sendKeys(webDriver, messagingServicePage.messagingServiceBrokerUrl(), "1");
|
||||
Events.sendKeys(webDriver, messagingServicePage.messagingServiceSchemaRegistry(), "1");
|
||||
Events.click(webDriver, common.saveConnectionConfig());
|
||||
Events.click(webDriver, common.saveManage());
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -125,8 +115,8 @@ public class MessagingServicePageTest {
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.containsText(serviceName));
|
||||
Events.click(webDriver, common.connectionConfig());
|
||||
Events.sendKeys(webDriver, messagingServicePage.messagingServiceBrokerUrl(), "1");
|
||||
Events.sendKeys(webDriver, messagingServicePage.messagingServiceSchemaRegistry(), "1");
|
||||
Events.sendKeys(webDriver, messagingServicePage.messagingServiceBootstrapServers(), "test");
|
||||
Events.sendKeys(webDriver, messagingServicePage.messagingServiceSchemaRegistry(), "test");
|
||||
Events.click(webDriver, common.saveConnectionConfig());
|
||||
}
|
||||
|
||||
@ -134,7 +124,6 @@ public class MessagingServicePageTest {
|
||||
@Order(5)
|
||||
public void deleteMessagingService() throws InterruptedException {
|
||||
openMessagingServicePage();
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.deleteServiceButton(serviceName));
|
||||
Events.click(webDriver, common.saveEditedService());
|
||||
}
|
||||
|
||||
@ -42,6 +42,7 @@ public class MyDataPageTest {
|
||||
static Actions actions;
|
||||
static WebDriverWait wait;
|
||||
static String table = "dim_address";
|
||||
static String searchSuggestion = "sample_dataecommerce_dbshopifydim_address";
|
||||
Integer waitTime = Property.getInstance().getSleepTime();
|
||||
MyDataPage myDataPage;
|
||||
TagsPage tagsPage;
|
||||
@ -132,7 +133,7 @@ public class MyDataPageTest {
|
||||
Events.click(webDriver, myDataPage.closeWhatsNew());
|
||||
wait.until(ExpectedConditions.elementToBeClickable(myDataPage.searchBox())); // Search bar/dim
|
||||
Events.sendKeys(webDriver, myDataPage.searchBox(), sendkeys); // Search bar/dim
|
||||
Events.click(webDriver, common.selectSuggestionSearch("bigquery_gcp:shopify:dim_address"));
|
||||
Events.click(webDriver, common.selectSuggestionSearch(searchSuggestion));
|
||||
Thread.sleep(1000);
|
||||
WebElement tableName =
|
||||
tableDetails
|
||||
@ -222,7 +223,7 @@ public class MyDataPageTest {
|
||||
Events.click(webDriver, myDataPage.closeWhatsNew());
|
||||
Events.click(webDriver, myDataPage.tables());
|
||||
Events.sendKeys(webDriver, myDataPage.searchBox(), table);
|
||||
Events.click(webDriver, common.selectSuggestionSearch("bigquery_gcp:shopify:dim_address"));
|
||||
Events.click(webDriver, common.selectSuggestionSearch(searchSuggestion));
|
||||
Events.click(webDriver, tableDetails.manage());
|
||||
Events.click(webDriver, tableDetails.owner()); // Owner
|
||||
Events.click(webDriver, tableDetails.users());
|
||||
@ -248,7 +249,7 @@ public class MyDataPageTest {
|
||||
Events.click(webDriver, myDataPage.closeWhatsNew());
|
||||
Events.click(webDriver, myDataPage.tables());
|
||||
Events.sendKeys(webDriver, myDataPage.searchBox(), table);
|
||||
Events.click(webDriver, common.selectSuggestionSearch("bigquery_gcp:shopify:dim_address"));
|
||||
Events.click(webDriver, common.selectSuggestionSearch(searchSuggestion));
|
||||
String follow = webDriver.findElement(tableDetails.follow()).getText();
|
||||
if (follow.equals("Unfollow")) {
|
||||
Events.click(webDriver, tableDetails.follow());
|
||||
@ -277,7 +278,7 @@ public class MyDataPageTest {
|
||||
webDriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
|
||||
Events.click(webDriver, myDataPage.closeWhatsNew());
|
||||
Events.sendKeys(webDriver, myDataPage.searchBox(), table);
|
||||
Events.click(webDriver, common.selectSuggestionSearch("bigquery_gcp:shopify:dim_address"));
|
||||
Events.click(webDriver, common.selectSuggestionSearch(searchSuggestion));
|
||||
Events.click(webDriver, myDataPage.home());
|
||||
webDriver.navigate().refresh();
|
||||
String table = webDriver.findElement(myDataPage.recentlyViewed()).getText();
|
||||
|
||||
@ -101,7 +101,7 @@ public class PipelineDetailsPageTest {
|
||||
Thread.sleep(waitTime);
|
||||
webDriver.navigate().refresh();
|
||||
Events.click(webDriver, common.editDescriptionButton());
|
||||
Events.sendKeys(webDriver, common.editDescriptionBox(), updatedDescription);
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), updatedDescription);
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
Thread.sleep(waitTime);
|
||||
@ -168,7 +168,7 @@ public class PipelineDetailsPageTest {
|
||||
Events.click(webDriver, common.selectTableLink(1));
|
||||
actions.moveToElement(webDriver.findElement(pipelineDetails.editTaskDescription())).perform();
|
||||
Events.click(webDriver, pipelineDetails.editTaskDescription());
|
||||
Events.sendKeys(webDriver, common.editDescriptionBox(), description);
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), description);
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
Thread.sleep(2000);
|
||||
@ -176,7 +176,7 @@ public class PipelineDetailsPageTest {
|
||||
Thread.sleep(2000);
|
||||
actions.moveToElement(webDriver.findElement(pipelineDetails.editTaskDescription())).perform();
|
||||
Events.click(webDriver, pipelineDetails.editTaskDescription());
|
||||
Events.sendKeys(webDriver, common.editDescriptionBox(), updatedDescription);
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), updatedDescription);
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
Thread.sleep(2000);
|
||||
@ -231,9 +231,9 @@ public class PipelineDetailsPageTest {
|
||||
List<WebElement> br = common.breadCrumb();
|
||||
// Using for loop to check breadcrumb links
|
||||
// Since after navigating back we are facing StaleElementException using try catch block.
|
||||
for (WebElement link : br) {
|
||||
for (int i = 0; i < br.size() - 1; i++) {
|
||||
try {
|
||||
link.click();
|
||||
br.get(i).click();
|
||||
Thread.sleep(waitTime);
|
||||
webDriver.navigate().back();
|
||||
} catch (StaleElementReferenceException ex) {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
/* DO NOT DELETE
|
||||
package org.openmetadata.catalog.selenium.pages.pipelineDetails;
|
||||
|
||||
import com.github.javafaker.Faker;
|
||||
@ -33,7 +34,7 @@ public class PipelineDetailsUIErrorHandlingTest {
|
||||
static String serviceName = faker.name().firstName();
|
||||
String webDriverInstance = Property.getInstance().getWebDriver();
|
||||
String webDriverPath = Property.getInstance().getWebDriverPath();
|
||||
static By toastMessage = By.cssSelector("[data-testid='toast']");
|
||||
static By toastMessage = By.xpath("(//div[@class='Toastify__toast-body']/div)[2]");
|
||||
List<WebElement> checkTabs = new ArrayList<>();
|
||||
WebElement explore;
|
||||
WebElement headerSettings;
|
||||
@ -288,3 +289,4 @@ public class PipelineDetailsUIErrorHandlingTest {
|
||||
webDriver.switchTo().window(tabs.get(0)).close();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@ -78,7 +78,7 @@ public class PipelineServiceTestPage {
|
||||
@Order(2)
|
||||
public void addPipelineService() throws InterruptedException {
|
||||
openPipelineServicePage();
|
||||
Thread.sleep(2000);
|
||||
Thread.sleep(waitTime);
|
||||
List<WebElement> webElementList = webDriver.findElements(common.addServiceButton());
|
||||
if (webElementList.isEmpty()) {
|
||||
Events.click(webDriver, common.noServicesAddServiceButton());
|
||||
@ -89,30 +89,26 @@ public class PipelineServiceTestPage {
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.sendKeys(webDriver, common.serviceName(), serviceName);
|
||||
Events.click(webDriver, common.descriptionBoldButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionItalicButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.click(webDriver, common.descriptionLinkButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.sendKeys(webDriver, pipelineServicePage.pipelineServiceUrl(), "localhost:8080");
|
||||
Events.click(webDriver, common.nextButton());
|
||||
Events.click(webDriver, common.saveServiceButton());
|
||||
Events.click(webDriver, common.saveManage());
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(3)
|
||||
public void checkPipelineServiceDetails() throws InterruptedException {
|
||||
openPipelineServicePage();
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.containsText(serviceName));
|
||||
Events.click(webDriver, common.editTagCategoryDescription());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
}
|
||||
|
||||
@ -120,10 +116,9 @@ public class PipelineServiceTestPage {
|
||||
@Order(4)
|
||||
public void checkConnectionConfig() throws InterruptedException {
|
||||
openPipelineServicePage();
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.containsText(serviceName));
|
||||
Events.click(webDriver, common.connectionConfig());
|
||||
Events.sendKeys(webDriver, pipelineServicePage.pipelineServiceUrl(), "1");
|
||||
Events.sendKeys(webDriver, pipelineServicePage.pipelineServiceUrl(), "test");
|
||||
Events.click(webDriver, common.saveConnectionConfig());
|
||||
}
|
||||
|
||||
@ -131,7 +126,6 @@ public class PipelineServiceTestPage {
|
||||
@Order(5)
|
||||
public void deletePipelineService() throws InterruptedException {
|
||||
openPipelineServicePage();
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.deleteServiceButton(serviceName));
|
||||
Events.click(webDriver, common.saveEditedService());
|
||||
}
|
||||
|
||||
@ -67,21 +67,20 @@ public class RolesPageTest {
|
||||
webDriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
|
||||
openRolesPage();
|
||||
Events.click(webDriver, rolesPage.addRoleButton());
|
||||
actions.moveToElement(webDriver.findElement(rolesPage.policiesDropdown())).perform();
|
||||
Events.click(webDriver, rolesPage.policiesDropdown());
|
||||
Events.click(webDriver, rolesPage.listItem());
|
||||
Events.sendKeys(webDriver, common.displayName(), faker.name().firstName());
|
||||
Events.sendKeys(webDriver, rolesPage.rolesDisplayName(), roleDisplayName);
|
||||
Events.click(webDriver, common.descriptionBoldButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionItalicButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.click(webDriver, common.descriptionLinkButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
Thread.sleep(waitTime);
|
||||
webDriver.navigate().refresh();
|
||||
Thread.sleep(1000);
|
||||
try {
|
||||
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(xpath)));
|
||||
} catch (NoSuchElementException | TimeoutException e) {
|
||||
@ -98,12 +97,13 @@ public class RolesPageTest {
|
||||
openRolesPage();
|
||||
Events.click(webDriver, common.containsText(roleName));
|
||||
Events.click(webDriver, common.editTagCategoryDescription());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), Keys.CONTROL + "A");
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), description);
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), Keys.COMMAND + "A");
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), description);
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
webDriver.navigate().refresh();
|
||||
Events.click(webDriver, common.containsText(roleName));
|
||||
String updatedDescription = webDriver.findElement(common.descriptionContainer()).getText();
|
||||
Thread.sleep(waitTime);
|
||||
String updatedDescription = webDriver.findElement(rolesPage.descriptionContainer()).getText();
|
||||
Assert.assertEquals(updatedDescription, description);
|
||||
}
|
||||
|
||||
@ -117,7 +117,6 @@ public class RolesPageTest {
|
||||
Events.click(webDriver, rolesPage.selectOperation("UpdateDescription"));
|
||||
Events.click(webDriver, rolesPage.listAccess());
|
||||
Events.click(webDriver, rolesPage.selectAccess("allow"));
|
||||
Events.click(webDriver, rolesPage.ruleToggleButton());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
Thread.sleep(1000);
|
||||
try {
|
||||
@ -156,10 +155,13 @@ public class RolesPageTest {
|
||||
webDriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
|
||||
openRolesPage();
|
||||
Events.click(webDriver, rolesPage.addRoleButton());
|
||||
actions.moveToElement(webDriver.findElement(rolesPage.policiesDropdown())).perform();
|
||||
Events.click(webDriver, rolesPage.policiesDropdown());
|
||||
Events.click(webDriver, common.containsText("Data Steward Policy"));
|
||||
Events.sendKeys(webDriver, common.displayName(), "");
|
||||
Events.sendKeys(webDriver, rolesPage.rolesDisplayName(), roleDisplayName);
|
||||
Events.click(webDriver, common.descriptionBoldButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
try {
|
||||
WebElement errorMessage = webDriver.findElement(rolesPage.errorMessage());
|
||||
@ -175,10 +177,13 @@ public class RolesPageTest {
|
||||
webDriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
|
||||
openRolesPage();
|
||||
Events.click(webDriver, rolesPage.addRoleButton());
|
||||
actions.moveToElement(webDriver.findElement(rolesPage.policiesDropdown())).perform();
|
||||
Events.click(webDriver, rolesPage.policiesDropdown());
|
||||
Events.click(webDriver, common.containsText("Data Steward Policy"));
|
||||
Events.sendKeys(webDriver, common.displayName(), faker.name().firstName());
|
||||
Events.sendKeys(webDriver, rolesPage.rolesDisplayName(), "");
|
||||
Events.click(webDriver, common.descriptionBoldButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
try {
|
||||
WebElement errorMessage = webDriver.findElement(rolesPage.errorMessage());
|
||||
@ -195,16 +200,24 @@ public class RolesPageTest {
|
||||
String firstName = faker.name().firstName();
|
||||
openRolesPage();
|
||||
Events.click(webDriver, rolesPage.addRoleButton());
|
||||
actions.moveToElement(webDriver.findElement(rolesPage.policiesDropdown())).perform();
|
||||
Events.click(webDriver, rolesPage.policiesDropdown());
|
||||
Events.click(webDriver, common.containsText("Data Steward Policy"));
|
||||
Events.sendKeys(webDriver, common.displayName(), firstName);
|
||||
Events.sendKeys(webDriver, rolesPage.rolesDisplayName(), roleDisplayName);
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionBox());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
Thread.sleep(waitTime);
|
||||
webDriver.navigate().refresh();
|
||||
Events.click(webDriver, rolesPage.addRoleButton());
|
||||
actions.moveToElement(webDriver.findElement(rolesPage.policiesDropdown())).perform();
|
||||
Events.click(webDriver, rolesPage.policiesDropdown());
|
||||
Events.click(webDriver, common.containsText("Data Steward Policy"));
|
||||
Events.sendKeys(webDriver, common.displayName(), firstName);
|
||||
Events.sendKeys(webDriver, rolesPage.rolesDisplayName(), roleDisplayName);
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionBox());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
try {
|
||||
WebElement errorMessage = webDriver.findElement(rolesPage.errorMessage());
|
||||
@ -222,7 +235,6 @@ public class RolesPageTest {
|
||||
Events.click(webDriver, rolesPage.addRule());
|
||||
Events.click(webDriver, rolesPage.listAccess());
|
||||
Events.click(webDriver, rolesPage.selectAccess("allow"));
|
||||
Events.click(webDriver, rolesPage.ruleToggleButton());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
try {
|
||||
WebElement errorMessage = webDriver.findElement(rolesPage.errorMessage());
|
||||
|
||||
@ -37,6 +37,7 @@ public class TableDetailsPageTest {
|
||||
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 String searchSuggestion = "sample_dataecommerce_dbshopifydim_location";
|
||||
Actions actions;
|
||||
static WebDriverWait wait;
|
||||
Integer waitTime = Property.getInstance().getSleepTime();
|
||||
@ -94,7 +95,7 @@ public class TableDetailsPageTest {
|
||||
webDriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
|
||||
openExplorePage();
|
||||
Events.sendKeys(webDriver, myDataPage.searchBox(), tableName);
|
||||
Events.click(webDriver, common.selectSuggestionSearch("bigquery_gcp:shopify:dim_address"));
|
||||
Events.click(webDriver, common.selectSuggestionSearch("sample_dataecommerce_dbshopifydim_address"));
|
||||
Events.click(webDriver, tableDetails.profiler());
|
||||
Assert.assertTrue(tableDetails.schemaTableIsDisplayed());
|
||||
Events.click(webDriver, tableDetails.lineage());
|
||||
@ -116,7 +117,7 @@ public class TableDetailsPageTest {
|
||||
openExplorePage();
|
||||
Events.click(webDriver, explorePage.selectTable());
|
||||
Events.click(webDriver, tableDetails.editDescriptionButton());
|
||||
Events.sendKeys(webDriver, tableDetails.editDescriptionBox(), updatedDescription);
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), updatedDescription);
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, tableDetails.saveTableDescription());
|
||||
Thread.sleep(waitTime);
|
||||
@ -141,9 +142,7 @@ public class TableDetailsPageTest {
|
||||
for (int i = 0; i < 1; i++) {
|
||||
actions.moveToElement(webDriver.findElement(tableDetails.columnDescriptionButton())).perform();
|
||||
Events.click(webDriver, tableDetails.columnDescriptionButton());
|
||||
columnDescripitonBox = webDriver.findElement(tableDetails.columnDescriptionBox());
|
||||
Events.click(webDriver, tableDetails.columnDescriptionBox());
|
||||
actions.moveToElement(columnDescripitonBox).sendKeys(sendKeys).perform();
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), sendKeys);
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, tableDetails.saveTableDescription());
|
||||
Thread.sleep(2000);
|
||||
@ -190,7 +189,7 @@ public class TableDetailsPageTest {
|
||||
openExplorePage();
|
||||
Events.click(webDriver, common.selectTableLink(1));
|
||||
Object count = webDriver.findElements(tableDetails.columnTags()).size();
|
||||
Events.click(webDriver, tableDetails.tagName());
|
||||
Events.click(webDriver, tableDetails.editTags());
|
||||
Thread.sleep(1000);
|
||||
Events.click(webDriver, tableDetails.removeTag());
|
||||
Events.click(webDriver, tableDetails.saveTag());
|
||||
@ -240,7 +239,6 @@ public class TableDetailsPageTest {
|
||||
Events.click(webDriver, tableDetails.lineage());
|
||||
List<WebElement> nodes = tableDetails.lineageNodes();
|
||||
// Clicking and checking all the nodes text matches to side drawer text
|
||||
WebElement sideDrawer = webDriver.findElement(tableDetails.sideDrawerLineage());
|
||||
for (WebElement e : nodes) {
|
||||
e.click();
|
||||
actions.dragAndDropBy(e, 100, 200).perform();
|
||||
@ -253,21 +251,20 @@ public class TableDetailsPageTest {
|
||||
webDriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
|
||||
openExplorePage();
|
||||
Events.click(webDriver, explorePage.selectTable());
|
||||
Thread.sleep(1000);
|
||||
Thread.sleep(waitTime);
|
||||
List<WebElement> br = tableDetails.breadCrumb();
|
||||
// Using for loop to check breadcrumb links
|
||||
// Since after navigating back we are facing StaleElementException using try catch block.
|
||||
for (WebElement link : br) {
|
||||
try {
|
||||
link.click();
|
||||
Thread.sleep(1000);
|
||||
Thread.sleep(waitTime);
|
||||
Assert.assertTrue(link.isDisplayed());
|
||||
Thread.sleep(1000);
|
||||
} catch (StaleElementReferenceException ex) {
|
||||
webDriver.navigate().back();
|
||||
Thread.sleep(1000);
|
||||
Thread.sleep(waitTime);
|
||||
Events.click(webDriver, By.xpath(xpath));
|
||||
Thread.sleep(2000);
|
||||
Thread.sleep(waitTime);
|
||||
Assert.assertTrue(webDriver.findElement(By.xpath(xpath)).isDisplayed());
|
||||
break;
|
||||
}
|
||||
@ -299,7 +296,7 @@ public class TableDetailsPageTest {
|
||||
webDriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
|
||||
openExplorePage();
|
||||
Events.sendKeys(webDriver, myDataPage.searchBox(), "dim_location");
|
||||
Events.click(webDriver, common.selectSuggestionSearch("bigquery_gcpshopifydim_location"));
|
||||
Events.click(webDriver, common.selectSuggestionSearch(searchSuggestion));
|
||||
Thread.sleep(2000);
|
||||
try {
|
||||
Events.click(webDriver, tableDetails.joinedTables());
|
||||
@ -314,7 +311,7 @@ public class TableDetailsPageTest {
|
||||
webDriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
|
||||
openExplorePage();
|
||||
Events.sendKeys(webDriver, myDataPage.searchBox(), "dim_location");
|
||||
Events.click(webDriver, common.selectSuggestionSearch("bigquery_gcpshopifydim_location"));
|
||||
Events.click(webDriver, common.selectSuggestionSearch(searchSuggestion));
|
||||
Thread.sleep(2000);
|
||||
try {
|
||||
Events.click(webDriver, tableDetails.joinedColumns());
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
/* DO NOT DELETE
|
||||
package org.openmetadata.catalog.selenium.pages.tableDetails;
|
||||
|
||||
import com.github.javafaker.Faker;
|
||||
@ -38,7 +39,7 @@ public class TableDetailsUIErrorHandling {
|
||||
static String serviceName = faker.name().firstName();
|
||||
String webDriverInstance = Property.getInstance().getWebDriver();
|
||||
String webDriverPath = Property.getInstance().getWebDriverPath();
|
||||
static By toastMessage = By.cssSelector("[data-testid='toast']");
|
||||
static By toastMessage = By.xpath("(//div[@class='Toastify__toast-body']/div)[2]");
|
||||
List<WebElement> checkTabs = new ArrayList<>();
|
||||
WebElement explore;
|
||||
WebElement headerSettings;
|
||||
@ -377,3 +378,4 @@ public class TableDetailsUIErrorHandling {
|
||||
webDriver.switchTo().window(tabs.get(0)).close();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@ -86,15 +86,12 @@ public class TagsPageTest {
|
||||
Events.click(webDriver, common.addTagCategory());
|
||||
Events.sendKeys(webDriver, common.displayName(), tagCategoryDisplayName);
|
||||
Events.click(webDriver, common.descriptionBoldButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionItalicButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.click(webDriver, common.descriptionLinkButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
}
|
||||
|
||||
@ -104,7 +101,7 @@ public class TagsPageTest {
|
||||
openTagsPage();
|
||||
Events.click(webDriver, common.containsText(tagCategoryDisplayName));
|
||||
Events.click(webDriver, common.editTagCategoryDescription());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
}
|
||||
|
||||
@ -116,15 +113,12 @@ public class TagsPageTest {
|
||||
Events.click(webDriver, common.addTagButton());
|
||||
Events.sendKeys(webDriver, common.displayName(), tagDisplayName);
|
||||
Events.click(webDriver, common.descriptionBoldButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.sendEnter(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionItalicButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.click(webDriver, common.addDescriptionString());
|
||||
Events.sendEnter(webDriver, common.addDescriptionString());
|
||||
Events.click(webDriver, common.descriptionLinkButton());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.focusedDescriptionBox());
|
||||
Events.click(webDriver, common.descriptionSaveButton());
|
||||
}
|
||||
|
||||
@ -133,9 +127,10 @@ public class TagsPageTest {
|
||||
public void changeTagDescription() throws InterruptedException {
|
||||
openTagsPage();
|
||||
Events.click(webDriver, common.containsText(tagCategoryDisplayName));
|
||||
Thread.sleep(waitTime);
|
||||
actions.moveToElement(webDriver.findElement(tagsPage.editTagDescription())).perform();
|
||||
Events.click(webDriver, tagsPage.editTagDescription());
|
||||
Events.sendKeys(webDriver, common.addDescriptionString(), faker.address().toString());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
}
|
||||
|
||||
@ -143,8 +138,7 @@ public class TagsPageTest {
|
||||
@Order(6)
|
||||
public void addAssociatedTag() throws InterruptedException {
|
||||
openTagsPage();
|
||||
Events.click(webDriver, common.containsText(tagCategoryDisplayName));
|
||||
actions.moveToElement(webDriver.findElement(tagsPage.addAssociatedTagButton())).perform();
|
||||
Events.click(webDriver, common.containsText("PersonalData"));
|
||||
Events.click(webDriver, tagsPage.addAssociatedTagButton());
|
||||
Events.click(webDriver, common.enterAssociatedTagName());
|
||||
for (int i = 0; i <= 1; i++) {
|
||||
@ -152,6 +146,7 @@ public class TagsPageTest {
|
||||
Events.click(webDriver, common.tagListItem());
|
||||
}
|
||||
Events.click(webDriver, common.saveAssociatedTag());
|
||||
Thread.sleep(waitTime);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -176,9 +171,7 @@ public class TagsPageTest {
|
||||
Events.click(webDriver, common.tagListItem());
|
||||
Events.click(webDriver, tagsPage.lastTableLink());
|
||||
Thread.sleep(waitTime);
|
||||
actions.moveToElement(webDriver.findElement(tagsPage.addAssociatedTagButton())).perform();
|
||||
Thread.sleep(waitTime);
|
||||
Events.click(webDriver, tagsPage.addAssociatedTagButton());
|
||||
Events.click(webDriver, tagsPage.editTags());
|
||||
Events.click(webDriver, common.enterAssociatedTagName());
|
||||
Events.sendKeys(webDriver, common.enterAssociatedTagName(), tagCategoryDisplayName + "." + tagDisplayName);
|
||||
Events.click(webDriver, common.tagListItem());
|
||||
|
||||
@ -89,7 +89,8 @@ public class TeamsPageTest {
|
||||
Events.click(webDriver, teamsPage.addTeam()); // add team
|
||||
Events.sendKeys(webDriver, teamsPage.name(), faker.name().firstName()); // name
|
||||
Events.sendKeys(webDriver, teamsPage.displayName(), teamDisplayName); // displayname
|
||||
Events.sendKeys(webDriver, teamsPage.enterDescription(), faker.address().toString());
|
||||
Events.click(webDriver, common.descriptionBox());
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), faker.address().toString());
|
||||
Events.click(webDriver, teamsPage.saveTeam());
|
||||
Thread.sleep(waitTime);
|
||||
webDriver.navigate().refresh();
|
||||
@ -147,12 +148,11 @@ public class TeamsPageTest {
|
||||
// Select the created listed team
|
||||
Events.click(webDriver, By.xpath(xpath));
|
||||
Events.click(webDriver, teamsPage.editDescription());
|
||||
wait.until(ExpectedConditions.presenceOfElementLocated(teamsPage.enterDescription()));
|
||||
Events.click(webDriver, teamsPage.enterDescription());
|
||||
Events.sendKeys(webDriver, teamsPage.enterDescription(), Keys.CONTROL + "A");
|
||||
Events.sendKeys(webDriver, teamsPage.enterDescription(), sendKeys);
|
||||
wait.until(ExpectedConditions.presenceOfElementLocated(common.focusedDescriptionBox()));
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), Keys.CONTROL + "A");
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), sendKeys);
|
||||
Events.click(webDriver, teamsPage.saveDescription());
|
||||
String description = webDriver.findElement(common.descriptionContainer()).getText();
|
||||
String description = webDriver.findElement(teamsPage.descriptionContainer()).getText();
|
||||
Thread.sleep(2000);
|
||||
Assert.assertEquals(description, sendKeys);
|
||||
}
|
||||
@ -161,27 +161,25 @@ public class TeamsPageTest {
|
||||
@Order(5)
|
||||
public void addAsset() throws InterruptedException {
|
||||
webDriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
|
||||
createTeam();
|
||||
Thread.sleep(waitTime);
|
||||
// Select the created listed team
|
||||
Events.click(webDriver, By.xpath(xpath));
|
||||
addUser();
|
||||
Events.click(webDriver, teamsPage.asset()); // Assets
|
||||
Events.click(webDriver, explorePage.explore()); // Explore
|
||||
String table = webDriver.findElement(common.selectTable()).getText();
|
||||
Events.click(webDriver, common.selectTable());
|
||||
Events.click(webDriver, common.selectTableLink(4));
|
||||
String tableName = webDriver.findElement(teamsPage.tableName()).getText();
|
||||
webDriver.navigate().refresh();
|
||||
Events.click(webDriver, common.manage()); // Manage
|
||||
Events.click(webDriver, common.ownerDropdown()); // Owner
|
||||
Thread.sleep(waitTime);
|
||||
Events.sendKeys(webDriver, teamsPage.searchInput(), teamDisplayName);
|
||||
Events.click(webDriver, common.selectUser()); // Select User/Team
|
||||
Events.click(webDriver, common.saveManage()); // Save
|
||||
Thread.sleep(waitTime);
|
||||
Events.click(webDriver, myDataPage.home());
|
||||
Events.click(webDriver, teamsPage.teams());
|
||||
Events.click(webDriver, By.xpath(xpath));
|
||||
Thread.sleep(waitTime);
|
||||
Events.click(webDriver, teamsPage.asset());
|
||||
String asset = webDriver.findElement(teamsPage.dataContainer()).getText();
|
||||
if (!asset.contains(table)) {
|
||||
String asset =
|
||||
wait.until(ExpectedConditions.visibilityOf(webDriver.findElement(teamsPage.dataContainer()))).getText();
|
||||
if (!asset.contains(tableName)) {
|
||||
Assert.fail("Asset not added");
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,19 +171,19 @@ public class TopicDetailsPageTest {
|
||||
Events.click(webDriver, explorePage.topics());
|
||||
Events.click(webDriver, explorePage.selectTable());
|
||||
Events.click(webDriver, common.editDescriptionButton());
|
||||
Events.sendKeys(webDriver, common.editDescriptionBox(), description);
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), description);
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
Thread.sleep(2000);
|
||||
webDriver.navigate().refresh();
|
||||
Events.click(webDriver, common.editDescriptionButton());
|
||||
Events.sendKeys(webDriver, common.editDescriptionBox(), updatedDescription);
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), updatedDescription);
|
||||
Thread.sleep(2000);
|
||||
Events.click(webDriver, common.editDescriptionSaveButton());
|
||||
Thread.sleep(2000);
|
||||
webDriver.navigate().refresh();
|
||||
Thread.sleep(2000);
|
||||
String checkDescription = webDriver.findElement(common.descriptionContainer()).getText();
|
||||
String checkDescription = webDriver.findElement(topicDetails.descriptionContainer()).getText();
|
||||
if (!checkDescription.contains(updatedDescription)) {
|
||||
Assert.fail("Description not updated");
|
||||
} else {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
/* DO NOT DELETE
|
||||
package org.openmetadata.catalog.selenium.pages.topicDetails;
|
||||
|
||||
import com.github.javafaker.Faker;
|
||||
@ -34,7 +35,7 @@ public class TopicDetailsUIErrorHandlingTest {
|
||||
static Faker faker = new Faker();
|
||||
String webDriverInstance = Property.getInstance().getWebDriver();
|
||||
String webDriverPath = Property.getInstance().getWebDriverPath();
|
||||
static By toastMessage = By.cssSelector("[data-testid='toast']");
|
||||
static By toastMessage = By.xpath("(//div[@class='Toastify__toast-body']/div)[2]");
|
||||
List<WebElement> checkTabs = new ArrayList<>();
|
||||
WebElement explore;
|
||||
WebElement headerSettings;
|
||||
@ -79,6 +80,7 @@ public class TopicDetailsUIErrorHandlingTest {
|
||||
Events.click(webDriver, common.selectTableLink(1));
|
||||
Thread.sleep(2000);
|
||||
String errorMessage = webDriver.findElement(toastMessage).getText();
|
||||
Thread.sleep(2000);
|
||||
Assert.assertEquals(errorMessage, "Error while fetching topic details!");
|
||||
checkTabs = tableDetails.checkTabs();
|
||||
for (WebElement e : checkTabs) {
|
||||
@ -179,7 +181,7 @@ public class TopicDetailsUIErrorHandlingTest {
|
||||
Events.click(webDriver, common.topics());
|
||||
Events.click(webDriver, common.selectTableLink(1));
|
||||
Events.click(webDriver, tableDetails.editDescriptionButton());
|
||||
Events.sendKeys(webDriver, tableDetails.editDescriptionBox(), "updatedDescription");
|
||||
Events.sendKeys(webDriver, common.focusedDescriptionBox(), "updatedDescription");
|
||||
interceptor.interceptor("/api/v1/topics", "/api/v1/test");
|
||||
Events.click(webDriver, tableDetails.saveTableDescription());
|
||||
Thread.sleep(2000);
|
||||
@ -271,3 +273,4 @@ public class TopicDetailsUIErrorHandlingTest {
|
||||
webDriver.switchTo().window(tabs.get(0)).close();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user