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

NameSpace Admin page locators actions and step definition addition #16

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

rahuldash171
Copy link
Collaborator

Page object model setup for New module Namespace admin .
New locators , actions and step def added .

@FindBy(how = How.XPATH, using = "//a[contains(text(),\"Switch to\")]")
public static WebElement switchToNameSpaceButton;

@FindBy(how = How.XPATH, using = "//div[@class=\"namespace-and-caret\"]")
Copy link
Collaborator

@itsmekumari itsmekumari Oct 30, 2023

Choose a reason for hiding this comment

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

If we can find an Id for these locators we should use them. As class names can be changed in UI mostly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Screenshot 2023-10-31 at 6 15 50 PM Screenshot 2023-10-31 at 6 15 03 PM I tried to find ID but they are not available for these locators so going with the same only

CdfNameSpaceAdminActions.switchToNewNameSpace();
}

@Then("Verify if the switch is successful by checking the current {string} value")
Copy link
Collaborator

Choose a reason for hiding this comment

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

It can be changed something like, 'Verify the namespace is switched to {string} successfully'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes changed it to the desired statement .

CdfNameSpaceAdminLocators.nameSpaceModules(tabName, nameSpaceName));
}

public static void clickOnNameSpaceAdminTab() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change the method as this and the above one has the same naming only having added s letter.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes changed the method name to openNamespaceAdminPage()

ElementHelper.clickOnElement(CdfNameSpaceAdminLocators.editPreferencesButton);
}

public static void switchOnNameSpace(String nameSpaceName) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

switchOnNameSpace to switchToNameSpace

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 , changed

ElementHelper.clickOnElement(CdfNameSpaceAdminLocators.switchNameSpace(nameSpaceName));
}

public static void createProfileforNameSpace(String nameSpaceName) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Fix the came casing : createProfileforNameSpace

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed to createProfileForNamespace()

}

public static void addNameSpacefromHamnugerMenu() {
ElementHelper.clickOnElement(CdfNameSpaceAdminLocators.addNamespace);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Fix the camel casing in above 2 method names.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also fix the Hamburger spelling.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed the spelling , changed the method name to addNamespaceFromHamburgerMenu()

}

/**
* Verify if the added Preferences reset is validated successfully
Copy link
Collaborator

Choose a reason for hiding this comment

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

Verify if the added Preferences reset is validated successfully to Verify if the added Preferences reset is successful

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed the comment to Verify if the added Preferences reset is successful

CdfNameSpaceAdminActions.selectHamburgerMenuList(tabName);
}

@Then("Set nameSpace preferences with key: {string} and value: {string}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe we should write the Step definitions normally and not in camel case, name space is fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks , changed it to namespace

CdfPluginPropertiesActions.replaceValueInInputProperty("projectId", "projectId");
}

@Then("Verify that the user is navigated to nameSpace admin page successfully")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Verify that the user is navigated to nameSpace admin page successfully
to
Verify if user sucessfully navigated to name space admin page

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed it to the desired statement .

}

@Then("Verify that the user is navigated to nameSpace admin page successfully")
public void verifyThatHubPageIsSuccessfullyOpened() {
Copy link
Collaborator

@Vipinofficial11 Vipinofficial11 Oct 30, 2023

Choose a reason for hiding this comment

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

Also the method name should be relevant with the step here the method says verify if hub page is opened but in step we are saying verify is user is navigated to name space admin page

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes , changed it to verifyThatNamespacePageIsSuccessfullyOpened()

@rahuldash171 rahuldash171 force-pushed the cdap_e2e_NameSpaceAdmin_FW branch from bc441b9 to ca3dc6d Compare November 1, 2023 07:47
@rahuldash171 rahuldash171 force-pushed the cdap_e2e_NameSpaceAdmin_FW branch from ca3dc6d to 86c646f Compare November 28, 2023 13:15
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