Skip to content
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

Locators,Action and Stepdesign class for hub #12

Closed
wants to merge 1 commit into from

Conversation

AnkitCLI
Copy link
Collaborator

No description provided.

@AnkitCLI AnkitCLI force-pushed the e2e-hub-tests branch 6 times, most recently from 1eef033 to 107421d Compare October 25, 2023 08:16
src/main/java/io/cdap/e2e/pages/actions/CdfHubActions.java Outdated Show resolved Hide resolved
*/
public class CdfHubLocators {

@FindBy(how = How.XPATH, using = "//input[@class='search-input form-control'][@placeholder='Search by name']")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to write them here which is related to control center , how can we extract those locators from control center locator file ? so that duplicate code can be avoided ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

}
@Then("Verify user can click on the delete icon of the plugin and plugin gets deleted successfully")
public void deleteControlCenterPlugin() {
CdfHubActions.deletePluginControlCenter();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are we verifying that the plugin is actualy deleted after successful delete operation . Ideally we should be adding some validationsteps to search for the deleted plugin post delete

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added the validation step

}

public static WebElement deleteButton() {
return SeleniumDriver.getDriver().findElement(By.xpath("//button[@class='btn btn-primary']" +
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to //button[@data-cy='Delete'] or //button[@data-testid='Delete']

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

public static WebElement deleteButton;
@FindBy(how = How.XPATH, using = "//button[@id='navbar-hub']")
public static WebElement hubPage;
@FindBy(how = How.XPATH, using = "//*[contains(text(),'No entities found in namespace \"default\"')]")
Copy link
Collaborator

@itsmekumari itsmekumari Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, check for 'No results found' text after deleting

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text which we are getting there is No entities found.

@FindBy(how = How.XPATH, using = "//button[@id='navbar-hub']")
public static WebElement hubPage;
@FindBy(how = How.XPATH, using = "//*[contains(text(),'No entities found in namespace \"default\"')]")
public static WebElement verifyDelete;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think verifyDelete can be changed to something else specific to deletion of element like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants