-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOSIP-34116 - Added register testcases for Device provider (#996)
Signed-off-by: Mohanachandran S <[email protected]>
- Loading branch information
1 parent
b5c6324
commit 307f3e3
Showing
9 changed files
with
163 additions
and
5 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
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
135 changes: 135 additions & 0 deletions
135
uitest-pmprevamp/src/main/java/io/mosip/testrig/pmprevampui/testcase/DevicePartnerTest.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,135 @@ | ||
package io.mosip.testrig.pmprevampui.testcase; | ||
|
||
import static org.testng.Assert.assertTrue; | ||
|
||
import org.testng.annotations.Test; | ||
|
||
import io.mosip.testrig.pmprevampui.pages.DashboardPage; | ||
import io.mosip.testrig.pmprevampui.pages.LoginPage; | ||
import io.mosip.testrig.pmprevampui.pages.PartnerCertificatePage; | ||
import io.mosip.testrig.pmprevampui.pages.RegisterPage; | ||
import io.mosip.testrig.pmprevampui.utility.BaseClass; | ||
import io.mosip.testrig.pmprevampui.utility.GlobalConstants; | ||
|
||
public class DevicePartnerTest extends BaseClass { | ||
|
||
@Test(priority = 1,description = "This is a test case register new device user") | ||
public void registerNewUser() throws InterruptedException { | ||
DashboardPage dashboardpage = new DashboardPage(driver); | ||
PartnerCertificatePage partnerCertificatePage = new PartnerCertificatePage(driver); | ||
RegisterPage registerPage = new RegisterPage(driver); | ||
|
||
assertTrue(dashboardpage.isTermsAndConditionsPopUppDisplayed(), GlobalConstants.isTermsAndConditionsPopUppDisplayed); | ||
dashboardpage.clickOnCheckbox(); | ||
|
||
assertTrue(dashboardpage.isProceedButtonDisplayed(), GlobalConstants.isProceedButtonDisplayed); | ||
dashboardpage.clickOnProceedButton(); | ||
|
||
dashboardpage.clickOnRootOFTrustCertText(); | ||
dashboardpage.clickOnRootCertificateUploadButton(); | ||
partnerCertificatePage.clickOnpartnerDomainSelectorDropdown(); | ||
partnerCertificatePage.ClickOnDeviceInPartnerDomainSelectorDropdown(); | ||
partnerCertificatePage.uploadCertificateRootCa(); | ||
partnerCertificatePage.ClickonSubmitButtonForAdmin(); | ||
partnerCertificatePage.ClickOnGoBackButton(); | ||
dashboardpage.clickOnRootCertificateUploadButton(); | ||
partnerCertificatePage.clickOnpartnerDomainSelectorDropdown(); | ||
partnerCertificatePage.ClickOnDeviceInPartnerDomainSelectorDropdown(); | ||
partnerCertificatePage.uploadCertificateSubCa(); | ||
partnerCertificatePage.ClickonSubmitButtonForAdmin(); | ||
partnerCertificatePage.ClickOnGoBackButton(); | ||
dashboardpage.clickOnProfileDropdown(); | ||
assertTrue(dashboardpage.isLogoutButtonDisplayed(), GlobalConstants.isLogoutButtonDisplayed); | ||
|
||
LoginPage loginpage = dashboardpage.clickOnLogoutButton(); | ||
assertTrue(loginpage.isLoginPageDisplayed(), GlobalConstants.isLoginPageDisplayed); | ||
|
||
loginpage.clickRegisterButton(); | ||
|
||
registerPage.enterFirstName("pmpui-device"); | ||
assertTrue(registerPage.isLastNameTextBoxDisplayed(), GlobalConstants.isLastNameTextBoxDisplayed); | ||
registerPage.enterLastName("pmpui-device"); | ||
|
||
assertTrue(registerPage.isOrganizationNameDisplayed(), GlobalConstants.isOrganizationNameDisplayed); | ||
registerPage.enterOrganizationName("AABBCC"); | ||
|
||
assertTrue(registerPage.isPartnerTypeDropdownDisplayed(), GlobalConstants.isPartnerTypeDropdownDisplayed); | ||
registerPage.selectDeviceProviderInPartnerTypeDropdown(); | ||
|
||
assertTrue(registerPage.isAddressTextBoxDisplayed(), GlobalConstants.isAddressTextBoxDisplayed); | ||
registerPage.enterAddress("0"+ data + "device"); | ||
|
||
assertTrue(registerPage.isEmailTextBoxDisplayed(), GlobalConstants.isEmailTextBoxDisplayed); | ||
registerPage.enterEmail("0"+ data + "device" + "@gmail.com"); | ||
|
||
assertTrue(registerPage.isPhoneNumberTextboxDisplayed(), GlobalConstants.isPhoneNumberTextboxDisplayed); | ||
registerPage.enterPhone("9876543010"); | ||
|
||
assertTrue(registerPage.isNotificationLanguageDropdownDisplayed(), GlobalConstants.isNotificationLanguageDropdownDisplayed); | ||
registerPage.selectNotificationLanguageDropdown(); | ||
|
||
assertTrue(registerPage.isUsernameTextBoxDisplayed(), GlobalConstants.isUsernameTextBoxDisplayed); | ||
registerPage.enterUsername("pmpui-device"); | ||
|
||
assertTrue(registerPage.isPasswordTextBoxDisplayed(), GlobalConstants.isPasswordTextBoxDisplayed); | ||
registerPage.enterPassword("mosip123"); | ||
|
||
assertTrue(registerPage.isPasswordConfirmTextBoxDisplayed(), GlobalConstants.isPasswordConfirmTextBoxDisplayed); | ||
registerPage.enterPasswordConfirm("mosip123"); | ||
|
||
assertTrue(registerPage.isSubmitButtonDisplayed(), GlobalConstants.isSubmitButtonDisplayed); | ||
dashboardpage = registerPage.clickSubmitButton(); | ||
|
||
assertTrue(dashboardpage.isTermsAndConditionsPopUppDisplayed(), GlobalConstants.isTermsAndConditionsPopUppDisplayed); | ||
dashboardpage.clickOnCheckbox(); | ||
|
||
assertTrue(dashboardpage.isProceedButtonDisplayed(), GlobalConstants.isProceedButtonDisplayed); | ||
dashboardpage.clickOnProceedButton(); | ||
|
||
Thread.sleep(3000); | ||
assertTrue(dashboardpage.isPartnerCertificateTitleDisplayed(), GlobalConstants.isPartnerCertificateTitleDisplayed); | ||
|
||
dashboardpage.clickOnPartnerCertificateTitle(); | ||
|
||
assertTrue(partnerCertificatePage.isPartnerCertificatePageDisplayed(), GlobalConstants.isPartnerCertificatePageDisplayed); | ||
partnerCertificatePage.clickOnUploadButton(); | ||
|
||
assertTrue(partnerCertificatePage.isUploadPartnerCertificatePopUpDisplayed(), GlobalConstants.isUploadPartnerCertificatePopUpDisplayed); | ||
partnerCertificatePage.uploadCertificate(); | ||
partnerCertificatePage.clickOnSubmitButton(); | ||
|
||
assertTrue(partnerCertificatePage.isDeviceProviderSuccessMessage(), GlobalConstants.isDeviceProviderSucessMessageDisplayed); | ||
partnerCertificatePage.clickOnCloseButton(); | ||
dashboardpage = partnerCertificatePage.clickOnHomeButton(); | ||
|
||
dashboardpage.clickOnPartnerCertificateTitle(); | ||
partnerCertificatePage.clickOnPartnerCertificateReuploadButton(); | ||
|
||
assertTrue(partnerCertificatePage.isReUploadPartnerCertificateTextDisplayed(), GlobalConstants.iReUploadPartnerCertificateTextDisplayed); | ||
// assertTrue(partnerCertificatePage.isReUploadPartnerCertificateSubTextDisplayed(), GlobalConstants.isReUploadPartnerCertificateSubTextDisplayed); | ||
|
||
assertTrue(partnerCertificatePage.isPartnerDomainTypeDisplayed(), GlobalConstants.iReUploadPartnerCertificateTextDisplayed); | ||
assertTrue(partnerCertificatePage.isPartnerCertOvelayDisplayed(), GlobalConstants.iReUploadPartnerCertificateTextDisplayed); | ||
|
||
partnerCertificatePage.uploadCertificate(); | ||
partnerCertificatePage.clickOnSubmitButton(); | ||
assertTrue(partnerCertificatePage.isDeviceProviderSuccessMessage(), GlobalConstants.isDeviceProviderSucessMessageDisplayed); | ||
partnerCertificatePage.clickOnRemoveCertificateButton(); | ||
|
||
partnerCertificatePage.uploadCertificateInvalidCert(); | ||
assertTrue(partnerCertificatePage.isInvalidFormatErrorPopupDisplayed(), GlobalConstants.isInvalidCertFormatePopupDisplayed); | ||
|
||
partnerCertificatePage.clickOnCertificateUploadCancelButton(); | ||
|
||
partnerCertificatePage.clickOnDownloadButton(); | ||
partnerCertificatePage.clickOnOriginalCertificateDownloadButton(); | ||
assertTrue(partnerCertificatePage.isOriginalSignedCertDownloadedPopupDisplayed(), GlobalConstants.isOriginalCertificateDownloadPopupDisplayed); | ||
|
||
partnerCertificatePage.clickOnMosipSignedCertificateDownloadButton(); | ||
assertTrue(partnerCertificatePage.isMosipSignedCertPopupDisplayed(), GlobalConstants.isMosipCertificateDownloadPopupDisplayed); | ||
|
||
// assertTrue(partnerCertificatePage.isSucessMessageDisplayed(), GlobalConstants.isSucessMessageDisplayed); | ||
partnerCertificatePage.ClickOnsuccessMsgCloseButton(); | ||
} | ||
|
||
} |
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
Binary file not shown.
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