-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOSIP-33299 added testcases for revamp ui (#842)
* MOSIP-33299 Signed-off-by: Anup Nehe <[email protected]> * resolve conflicts Signed-off-by: Anup Nehe <[email protected]> * resolve conflicts Signed-off-by: Anup Nehe <[email protected]> * MOSIP-36006 Signed-off-by: Anup Nehe <[email protected]> * MOSIP-33299 Signed-off-by: Anup Nehe <[email protected]> * resolve conflicts Signed-off-by: Anup Nehe <[email protected]> * resolve conflicts Signed-off-by: Anup Nehe <[email protected]> * resolve conflicts Signed-off-by: Anup Nehe <[email protected]> --------- Signed-off-by: Anup Nehe <[email protected]>
- Loading branch information
Showing
14 changed files
with
1,092 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
192 changes: 192 additions & 0 deletions
192
uitest-pmprevamp/src/main/java/io/mosip/testrig/pmprevampui/pages/OldPmpPage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,192 @@ | ||
package io.mosip.testrig.pmprevampui.pages; | ||
|
||
import java.io.IOException; | ||
|
||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.WebDriver; | ||
import org.openqa.selenium.WebElement; | ||
import org.openqa.selenium.support.FindBy; | ||
|
||
public class OldPmpPage extends BasePage{ | ||
|
||
@FindBy(xpath = "//*[@class='menu-button mat-menu-trigger']") | ||
private WebElement UserProfile; | ||
|
||
@FindBy(xpath = "//*[contains(text(), 'Logout')]") | ||
private WebElement LogoutButton; | ||
|
||
@FindBy(id = "username") | ||
private WebElement usenameTextBox; | ||
|
||
@FindBy(id = "password") | ||
private WebElement PasswordTextBox; | ||
|
||
@FindBy(xpath = "//input[@name='login']") | ||
private WebElement LoginButton; | ||
|
||
@FindBy(id = "policymenugroup") | ||
private WebElement PolicyMenuGroup; | ||
|
||
@FindBy(xpath = "//a[@href='#/pmp/resources/policygroup/view']") | ||
private WebElement PolicyMenuGroupTab; | ||
|
||
@FindBy(xpath = "//button[@id='Create Policy Group']") | ||
private WebElement CreatePolicyGroup; | ||
|
||
@FindBy(id = "name") | ||
private WebElement nameFormPolicyGroup; | ||
|
||
@FindBy(id = "desc") | ||
private WebElement descFormPolicyGroup; | ||
|
||
@FindBy(xpath = "//button[@id='createButton']") | ||
private WebElement CreatButton; | ||
|
||
@FindBy(xpath = "//button[@id='confirmmessagepopup']") | ||
private WebElement ConfirmMessagePopup; | ||
|
||
@FindBy(xpath = "//*[contains(text(), 'Policy')]") | ||
private WebElement PolicyTab; | ||
|
||
@FindBy(xpath = "//*[contains(text(), 'Auth Policy')]") | ||
private WebElement AuthPolicyTab; | ||
|
||
@FindBy(xpath = "//*[contains(text(), 'Create Policy')]") | ||
private WebElement CreatePolicyTab; | ||
|
||
@FindBy(xpath = "//*[@placeholder='Name']") | ||
private WebElement NameTextBox; | ||
|
||
@FindBy(xpath = "//*[@placeholder='Description']") | ||
private WebElement DescriptionTextBox; | ||
|
||
@FindBy(xpath = "//*[@id='policyGroupName']") | ||
private WebElement policyGroupNameDropDown; | ||
|
||
@FindBy(id = "policies") | ||
private WebElement policiesTextBox; | ||
|
||
@FindBy(xpath = "//*[contains(text(), 'Filter')]") | ||
private WebElement filterButton; | ||
|
||
@FindBy(id = "applyTxt") | ||
private WebElement ApplyTextButton; | ||
|
||
@FindBy(xpath = "(//span[@class='mat-button-wrapper']/mat-icon)[2]") | ||
private WebElement PolicyGroupElipsis; | ||
|
||
@FindBy(xpath = "//*[contains(text(), 'Activate')]") | ||
private WebElement ActivateButton; | ||
|
||
@FindBy(xpath = "//*[contains(text(), ' Yes ')]") | ||
private WebElement YesButton; | ||
|
||
public OldPmpPage(WebDriver driver) { | ||
super(driver); | ||
} | ||
|
||
public void clickOnUserProfile() { | ||
clickOnElement(UserProfile); | ||
} | ||
|
||
public void clickOnLogOut() { | ||
clickOnElement(LogoutButton); | ||
} | ||
|
||
public void EnterUserName(String value) { | ||
enter(usenameTextBox,value); | ||
} | ||
|
||
public void EntePasswordTextBox(String value) { | ||
enter(PasswordTextBox,value); | ||
} | ||
|
||
public void clickOnLoginButton() { | ||
clickOnElement(LoginButton); | ||
} | ||
|
||
public void clickOnPolicyMenuGroup() { | ||
clickOnElement(PolicyMenuGroup); | ||
} | ||
|
||
public void clickOnPolicyMenuGroupTab() { | ||
clickOnElement(PolicyMenuGroupTab); | ||
} | ||
|
||
public void clickOnCreatePolicyGroup() { | ||
clickOnElement(CreatePolicyGroup); | ||
} | ||
|
||
public void EnterName() { | ||
enter(nameFormPolicyGroup,""); | ||
} | ||
|
||
public void EnterDescription() { | ||
enter(descFormPolicyGroup,""); | ||
} | ||
|
||
public void clickOnCreateButton() { | ||
clickOnElement(CreatButton); | ||
} | ||
|
||
public void clickOnConfirmMessagePopup() { | ||
clickOnElement(ConfirmMessagePopup); | ||
} | ||
|
||
public void clickOnPolicyTab() { | ||
clickOnElement(PolicyTab); | ||
} | ||
|
||
public void clickOnAuthPolicyTab() { | ||
clickOnElement(AuthPolicyTab); | ||
} | ||
|
||
public void clickOnCreatePolicyTab() { | ||
clickOnElement(CreatePolicyTab); | ||
} | ||
|
||
public void EnterNameTextBox(String value) { | ||
enter(NameTextBox,value); | ||
} | ||
|
||
public void EnterDescriptionTextBox(String value) { | ||
enter(DescriptionTextBox,value); | ||
} | ||
|
||
public void policyGroupNameDropDown(String value) { | ||
try { | ||
dropdown(policyGroupNameDropDown, value); | ||
} catch (IOException e) { | ||
// TODO Auto-generated catch block | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
public void EnterPoliciesTextBox(String value) { | ||
enter(policiesTextBox,value); | ||
} | ||
|
||
public void clickOnfilterButton() { | ||
clickOnElement(filterButton); | ||
} | ||
|
||
public void clickOnApplyTextButton() { | ||
clickOnElement(ApplyTextButton); | ||
} | ||
|
||
public void clickOnPolicyGroupElipsis() { | ||
clickOnElement(PolicyGroupElipsis); | ||
} | ||
|
||
public void clickOnActivateButton() { | ||
clickOnElement(ActivateButton); | ||
} | ||
|
||
public void clickOnYesButton() { | ||
clickOnElement(YesButton); | ||
} | ||
|
||
public void refreshPage() { | ||
driver.navigate().refresh(); | ||
} | ||
} |
Oops, something went wrong.