-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
control center framework steps #13
base: develop
Are you sure you want to change the base?
Conversation
ElementHelper.clickOnElement(CdfControlCenterLocators.navigateControlCenterPage); | ||
} | ||
|
||
public static void clickCreateButtonControlCenterPage() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clickOn*CreateButtonCenterPage()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
@FindBy(how = How.XPATH, using = "//div[@class='just-added-entities-list']//button[@class='btn btn-link']" + | ||
"//*[@class='icon-svg icon-trash']") | ||
public static WebElement clickDeleteIconControlCenter; | ||
public static By clickDeleteButton() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clickOn*DeleteButton
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
public void pipelinePresentControlCenterPage() { | ||
CdfControlCenterActions.pipelinePresentControlCenterPage(); | ||
} | ||
@Then("Verify user can click on the delete icon of the created pipeline and pipeline gets deleted successfully") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not verifying if the piplline is deleted or not , we are simply deleting it . Can we add the validation steps that after deleting the pipline is not present inside control center or something like that ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working on it
} | ||
|
||
public static void clickOnHamburgerMenu() { | ||
ElementHelper.clickOnElement(CdfControlCenterLocators.hamburgerMenu); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
click on HamburgerMenu is used for Namespace admin cases also , If you can reuse the same no need to add new method here .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore the above comment as we are raising the PRs individually .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
ElementHelper.clickOnElement(CdfControlCenterLocators.controlCenterMenu); | ||
} | ||
|
||
public static void navigateOnControlCenterTab() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the method Name to navigateToControlCenter()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
public static WebElement controlCenterMenu; | ||
|
||
@FindBy(how = How.XPATH, using = "//*[@data-cy='feature-heading'][//div[contains(text(),'Control Center')]]") | ||
public static WebElement navigateControlCenterPage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the locator name pageHeaderControlCenter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed pageHeaderControlCenter
|
||
private static final Logger logger = LoggerFactory.getLogger(ControlCenterSteps.class); | ||
|
||
@Then("Click on the Hamburger bar on the left panel") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this and use the namespace admin code
public static WebElement navigateControlCenterPage; | ||
|
||
@FindBy(how = How.XPATH, using = "//span[contains(text(),'Create')]") | ||
public static WebElement clickCreateButtonControlCenter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove click , it should be createButtonControlCenter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
public static WebElement clickCreateButtonControlCenter; | ||
|
||
@FindBy(how = How.XPATH, using = "//span[@class='entity-type'][//span[contains(text(),'Data Pipeline')]]") | ||
public static WebElement clickDataPipelineControlCenter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove click
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed click
|
||
@FindBy(how = How.XPATH, using = "//div[@class='just-added-entities-list']//button[@class='btn btn-link']" + | ||
"//*[@class='icon-svg icon-trash']") | ||
public static WebElement clickDeleteIconControlCenter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove click
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed click
} | ||
|
||
public static void clickOnDeleteButtonIfDisplayed() { | ||
ElementHelper.clickIfDisplayed(CdfControlCenterLocators.clickDeleteButton()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use clickOnElement function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have used this as its a alert box coming after clicking on the delete icon , so if it displyed then click on it
ElementHelper.clickOnElement(CdfControlCenterLocators.clickDataPipelineControlCenter); | ||
} | ||
|
||
public static void clickOnDeleteButtonIfDisplayed() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change method name to clickOnDeleteButtonOnConfirmationBox()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed clickOnDeleteButtonOnConfirmationBox
"//*[@class='icon-svg icon-trash']") | ||
public static WebElement clickDeleteIconControlCenter; | ||
public static By clickDeleteButton() { | ||
return By.xpath("//button[@class='btn btn-primary'][//button[@data-cy='Delete']]"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a data-cy or data-test-id for this we can use it and create something like this : //div//button[@data-cy='Delete'] or //div//button[@data-testid='Delete']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have used both things here class and data-cy also, i think thats fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note - Class names are mostly defined by developers to apply styling/css on web pages and they can change them quite frequently while an UI update.
@FindBy(how = How.XPATH, using = "//*[@data-cy='feature-heading'][//div[contains(text(),'Control Center')]]") | ||
public static WebElement navigateControlCenterPage; | ||
|
||
@FindBy(how = How.XPATH, using = "//span[contains(text(),'Create')]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to use //*[@id='create-pipeline-link'] as we have id for element
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used //*[@id='create-pipeline-link']
@FindBy(how = How.XPATH, using = "//*[@data-cy='navbar-hamburger-icon']") | ||
public static WebElement hamburgerMenu; | ||
|
||
@FindBy(how = How.XPATH, using = "//div[contains(text(),'Control Center')]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use data-cy or data-testid as it exists for this element
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed the loactor //*[@data-cy='navbar-control-center-link']
public static void clickOnDeleteButtonOnConfirmationBox() { | ||
ElementHelper.clickIfDisplayed(CdfControlCenterLocators.clickOnDeleteButton()); | ||
} | ||
public static void deletePipelineControlCenter() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
public static void deletePipelineControlCenter() { | ||
ElementHelper.clickOnElement(CdfControlCenterLocators.deleteIconControlCenter); | ||
clickOnDeleteButtonOnConfirmationBox(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed extra line
clickOnDeleteButtonOnConfirmationBox(); | ||
|
||
} | ||
public static void pipelineDeletedIsNotPresent() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use formatter to resolve these line spacing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done removed extraa lines
0223396
to
0e38678
Compare
@Then("Verify user is able to click on the create button to create a pipeline successfully") | ||
public void createButtonControlCenterPage() { | ||
CdfControlCenterActions.clickOnCreateButtonControlCenterPage(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add space here , avoid these kind of mistakes
@Then("Verify the pipeline created successfully is present in control center page") | ||
public void pipelinePresentControlCenterPage() { | ||
CdfControlCenterActions.pipelinePresentControlCenterPage(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add space after this
|
||
@FindBy(how = How.XPATH, using = "//div[@class='just-added-entities-list']//button[@class='btn btn-link']" + | ||
"//*[@class='icon-svg icon-trash']") | ||
public static WebElement deleteIconControlCenter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add space below
} | ||
|
||
public static void pipelineDeletedIsNotPresent() { | ||
clickOnSearchTabControlCenter(PipelineSteps.pipelineName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this step will search the recently deleted pipline ?
0e38678
to
8e92307
Compare
8e92307
to
4aa87ac
Compare
No description provided.