Skip to content

Commit

Permalink
added test for vsam and stcs tabs
Browse files Browse the repository at this point in the history
Signed-off-by: Himani Pathak <[email protected]>
  • Loading branch information
Himani Pathak committed Aug 22, 2024
1 parent ce273eb commit 59bdf13
Show file tree
Hide file tree
Showing 7 changed files with 1,041 additions and 44 deletions.
52 changes: 35 additions & 17 deletions playwright_test/Pages/installationType.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class InstallationTypePage{
this.uploadPax = page.locator("//span[text()='Upload Zowe PAX for offline install']/preceding-sibling::span/input")
this.smpe = page.locator("//span[text()='SMP/E']/preceding-sibling::span/input")
this.licenseAgreement = page.locator("//button[text()='License Agreement']")
this.saveAndClose = page.locator("//button[contains(text(),'Save & close')]")
this.saveAndClose = page.locator("//button[contains(text(),'Save & close')]")
this.previousStep = page.locator("//button[contains(text(),'Previous step')]")
this.continueToComponentInstallation = page.locator("//button[text()='Continue to Components Installation']")
this.zoweLink = page.locator("//a[@href='zowe.org']")
Expand All @@ -36,10 +36,13 @@ class InstallationTypePage{
this.validateLocation = page.locator("//button[text()= 'Validate location']")
this.validateLocationGreenCheck = page.locator("//button[text()='Validate location']//following-sibling::*[@data-testid='CheckCircleIcon']")
this.licenseAgreementGreenCheck = page.locator("//button[text()='License Agreement']//following-sibling::*[@data-testid='CheckCircleIcon']")
this.continueUpnax = page.locator("//button[contains(text(),'Continue to Unpax')]")
this.retrieveExampleZoweYaml = page.locator("//button[contains(text(),'Retrieve example-zowe.yaml')]")
this.continueCompInstallation = page.locator("//button[contains(text(),'Continue to Components Installation')]")
this.skipUnpaxButton = page.locator("//button[text()='Skip ']")
this.retrieveExampleZoweYaml = page.locator("//button[contains(text(),'Retrieve example-zowe.yaml')]")
this.continueCompInstallation = page.locator("//button[contains(text(),'Continue to Components Installation')]")
this.skipUnpaxButton = page.locator("//button[text()='Skip ']")
this.continueToUnpax = page.locator("//button[contains(text(),'Continue to Unpax')]")
this.SkipUnpax = page.locator('//button[contains(text(),"Skip")]')
this.retrieveExampleZoweYaml= page.locator('//button[contains(text(),"Retrieve example-zowe.yaml")]')
this.click_InitializationStage = page.locator('//span[text()="Initialization"]')
}

async getInstallationTypePageTitle(){
Expand All @@ -57,15 +60,15 @@ class InstallationTypePage{
async selectSmpe(){
await this.smpe.click({timeout: 5000});
}

async continueToUnpax(){
await this.continueUpnax.click({timeout: 5000});
await this.continueToUnpax.click({ timeout: 2000 })
}

async retrieveExampleYaml(){
await this.retrieveExampleZoweYaml.click({timeout: 5000});
}

async continueComponentInstallation(){
const timeout = 5000;
const interval = 500;
Expand Down Expand Up @@ -106,7 +109,7 @@ class InstallationTypePage{
async isContinueToComponentInstallationEnabled(){
return await this.continueToComponentInstallation.isEnabled()
}

async isContinueUnpaxEnabled(){
return await this.continueUpnax.isEnabled()
}
Expand All @@ -122,7 +125,7 @@ class InstallationTypePage{
async clickUploadPaxButton(){
await this.uploadPaxButton.click({timeout: 5000});
}

async skipUnpax(){
await this.skipUnpaxButton.click({timeout: 5000});
}
Expand All @@ -141,20 +144,35 @@ class InstallationTypePage{
}

async downloadZowePaxAndNavigateToInstallationPage(){
this.selectDownloadZowePax()
this.clickLicenseAgreement()
this.clickAgreeLicense()
}
await this.selectDownloadZowePax()
await this.clickLicenseAgreement()
await this.clickAgreeLicense()
}

async uploadZowePaxAndNavigateToInstallationPage(uploadPaxPath: any){
this.selectUploadZowePax()
await this.uploadPaxButton.setInputFiles(uploadPaxPath)
}
}

async smpeZowePaxAndNavigateToInstallationPage(runtimeDir: any){
this.selectSmpe()
this.enterRuntimeDir(runtimeDir)
this.clickValidateLocation()
}
}
async clickOnContinueToUnpax(){
this.continueToUnpax.click({ timeout: 2000 })
}

async clickSkipUnpaxButton(){
this.SkipUnpax.click({ timeout: 2000 })
}

async clickRetrieveExZoweYaml(){
this.retrieveExampleZoweYaml.click({ timeout: 15000 })
}

async MoveToInitializationStage(){
this.click_InitializationStage.click({ timeout: 15000 })
}
}
export default InstallationTypePage;
56 changes: 29 additions & 27 deletions playwright_test/Pages/security.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class SecurityPage{
this.licenseAgreement = page.locator('//button[contains(text(), "License Agreement")]')
this.acceptLicense = page.locator('//html/body/div[2]/div[3]/div/div[2]/button[1]')
this.continueToComponentInstallation = page.locator('//button[contains(text(), "Continue to Components Installation")]')
this.mainXpath = '//html/body/div/div[2]/div/div[4]/div/form/div/div[3]/div[1]/div[3]/div/div[2]/div/div/div'
this.stc_mainXpath = '//html/body/div[1]/div[2]/div/div[4]/div/form/div/div[3]/div[1]/div[4]/div/div[2]/div/div/div/'
this.mainXpath = '//html/body/div/div[2]/div/div[4]/div/form/div/div[2]/div[1]/div[3]/div/div[2]/div/div/div'
this.stc_mainXpath = '//html/body/div/div[2]/div/div[4]/div/form/div/div[2]/div[1]/div[4]/div/div[2]/div/div/div'
this.product = page.locator('input[role="combobox"]')
this.view_yaml = page.locator('//button[contains(text(),"View/Edit Yaml")]')
this.viewAndSubmitJob = page.locator('//button[contains(text(), "View Job Output")]')
Expand All @@ -56,44 +56,46 @@ class SecurityPage{
this.initSecurity = page.locator("//button[contains(text(), 'Initialize Security Config')]")
this.close_button = page.locator('//button[contains(text(), "Close")]')
this.certificateTab_title = page.locator('//div[text()="Certificates"]')
this.stc_title = page.locator('//div[text()="Stcs"]')
this.stc_title = page.locator('//div[text()="Stcs"]')
this.securityTab_title = page.locator('//div[text()="Security"]')
this.click_security = page.locator('//span[text()="Security"]')
this.continue_CertificateSelector = page.locator('//button[contains(text(), "Continue to STC Setup")]')

this.admin = page.getByLabel('Admin');
this.stc = page.getByLabel('Stc');
this.sys_prog = page.getByLabel('Sys Prog');
this.user_zis = page.locator(this.mainXpath +'/div/div/div[2]/div/div/input');
this.user_zowe = page.locator(this.mainXpath +'/div/div/div[1]/div/div/input');
this.user_zis = page.locator(this.mainXpath +'/div/div/div[2]/div/label');
this.user_zowe = page.locator(this.mainXpath +'/div/div/div[1]/div/label');
this.aux = page.getByLabel('Aux');
this.stc_zowe = page.locator(this.stc_mainXpath + 'div[1]/div/div[1]/div/div/input');
this.stc_zis = page.locator(this.stc_mainXpath + 'div[1]/div/div[2]/div/div/input');
this.stc_zowe = page.locator(this.stc_mainXpath + '/div[1]/div/div[1]/div/label');
this.stc_zis = page.locator(this.stc_mainXpath + '/div[1]/div/div[2]/div/label');

}

async movetoSecurityPage(){
await this.licenseAgreement.click({timeout: 9000})
await this.acceptLicense.click({timeout: 9000})
await this.continueToComponentInstallation.click({timeout: 5000})
await this.skip_button.click()
await this.skip_button.click()
await this.click_security.click({timeout: 5000})
}
async fillProduct(product:string){
await this.product.fill(product,{ timeout: 10000 })
}
async fillSecurityDetails(product:string, admin:string,stc:string,sys_prog:string,user_zis:string,user_zowe:string,aux: string, stc_zowe: string, stc_zis:string){
await this.product.fill(product,{ timeout: 10000 })
await this.page.waitForTimeout(8000);
await this.admin.fill(admin,{ timeout: 10000 })
await this.stc.fill(stc,{ timeout: 10000 })
await this.sys_prog.fill(sys_prog,{ timeout: 10000 })
await this.page.waitForTimeout(8000);
await this.user_zis.fill(user_zis,{ timeout: 10000 })
await this.user_zowe.fill(user_zowe,{ timeout: 10000 })
await this.page.waitForTimeout(8000);
await this.aux.fill(aux,{ timeout: 10000 })
await this.stc_zowe.fill(stc_zowe,{ timeout: 10000 })
await this.stc_zis.fill(stc_zis,{ timeout: 10000 })
async fillSecurityDetails(product:string, admin:string,stc:string,sys_prog:string,user_zis:string,user_zowe:string,aux: string, stc_zowe: string, stc_zis:string){await this.page.waitForTimeout(1000);
await this.product.fill(product)
await this.page.waitForTimeout(1000);
await this.admin.fill(admin)
await this.page.waitForTimeout(1000);
await this.stc.fill(stc);
await this.page.waitForTimeout(1000);
await this.sys_prog.fill(sys_prog)
await this.page.waitForTimeout(1000);
await this.user_zis.fill(user_zis)
await this.page.waitForTimeout(1000);
await this.user_zowe.fill(user_zowe)
await this.page.waitForTimeout(1000);
await this.aux.fill(aux)
await this.page.waitForTimeout(1000);
await this.stc_zowe.fill(stc_zowe)
await this.page.waitForTimeout(1000);
await this.stc_zis.fill(stc_zis)
}

async fillAdmin(admin:string){
Expand Down Expand Up @@ -197,12 +199,12 @@ class SecurityPage{
const certPage_title = await this.certificateTab_title.textContent();
return certPage_title;
}

async returnTitleOfstcPage(){
const stcPage_title = await this.stc_title.textContent();
return stcPage_title;
}

}

export default SecurityPage;
export default SecurityPage;
Loading

0 comments on commit 59bdf13

Please sign in to comment.