-
Notifications
You must be signed in to change notification settings - Fork 6
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
draft for STCS test cases #230
base: v2.x/rc
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Page,Locator } from '@playwright/test'; | ||
|
||
class InstallationTypePage{ | ||
page: Page; | ||
|
@@ -26,7 +26,7 @@ | |
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']") | ||
|
@@ -36,6 +36,10 @@ | |
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.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(){ | ||
|
@@ -145,6 +149,22 @@ | |
this.selectSmpe() | ||
this.enterRuntimeDir(runtimeDir) | ||
this.clickValidateLocation() | ||
} | ||
} | ||
|
||
async clickOnContinueToUnpax(){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As we have a separate page for Unpax, I think we can add all unpax-related stuff under unpax page file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't have unpax page as of now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, we don't have the page with the title 'Unpax' but on the 'Installation Type' page we are getting the option to 'Continue to Unpax' page, and on that page, we are getting the option 'Skip Unpax' so I think that is a page but it doesn't have the specific title as the title depends on which Installation type we are selecting. So I think if we are following the Page object model then we should add the 'Unpax' page separately. Let me know your thoughts or we can discuss this with our QA team. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree as your new PR contains unpax page so will wait for your PR to merge then after that I will fix them after taking pull, because writing same code in two files does not make sense. |
||
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; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,8 +45,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' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid using dynamic xpaths which changes frequently |
||
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")]') | ||
|
@@ -59,41 +59,43 @@ class SecurityPage{ | |
this.certificateTab_title = page.locator('//div[text()="Certificates"]') | ||
this.securityTab_title = page.locator('//div[text()="Security"]') | ||
this.continue_CertificateSelector = page.locator('//button[contains(text(), "Continue to Certificates Setup")]') | ||
|
||
this.click_security = page.locator('//span[text()="Security"]') | ||
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 }) | ||
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){ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function should be in the Title page file and already exists so you can use it from there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done