diff --git a/playwright_test/Pages/apfAuth.page.ts b/playwright_test/Pages/apfAuth.page.ts index 6a0b271..224d202 100644 --- a/playwright_test/Pages/apfAuth.page.ts +++ b/playwright_test/Pages/apfAuth.page.ts @@ -3,6 +3,7 @@ let electronApp: ElectronApplication class ApfAuthPage{ page: Page; + pageTitle: Locator; continueButtonSelector: Locator; userNameInputSelector: Locator; writeConfig_greenCheckXpath: Locator; @@ -49,6 +50,7 @@ class ApfAuthPage{ constructor(page: Page) { this.page = page; + this.pageTitle = page.locator("//div[@class='MuiBox-root css-la96ob']/div") this.continueButtonSelector = page.locator('.MuiButton-containedPrimary.MuiButton-sizeMedium') this.userNameInputSelector = page.locator('label:has-text("User Name") + div input#standard-required') this.writeConfig_greenCheckXpath = page.locator('//*[@id="box-download-progress-card"][1]') @@ -85,14 +87,13 @@ class ApfAuthPage{ this.dataset_prefix_value = page.getByLabel('Dataset Prefix') this.auth_load_lib_value = page.getByLabel('APF Authorized Load Library') this.auth_plugin_lib_value = page.getByLabel('Zowe ZIS Plugins Load Library') - + //this.select_SMPE = page.getByLabel('//button[contains(text(),"SMP/E")]') this.select_SMPE = page.locator('span:has-text("SMP/E")'); } async returnTitleOfApfAuthPage(){ - const ApfAuthTitle = await this.APFAUTH_TITLE.textContent(); - return ApfAuthTitle; + return await this.pageTitle.textContent({ timeout: 2000 }); } async movetoApfAuthPage(){ @@ -100,19 +101,17 @@ class ApfAuthPage{ await this.click_ApfAuth.click({timeout: 9000}) } - async movetoInstallationPage(){ - await this.page.waitForTimeout(5000) - await this.click_Installation.click({timeout: 9000}) - } - async isContinueButtonEnabled(){ - return await this.continue_security_setup.isEnabled(); - } async selectInstallationType(){ await this.select_SMPE.waitFor({ state: 'visible', timeout: 9000 }); // Adjust timeout if needed console.log('SMP/E span is visible.'); await this.select_SMPE.click({timeout: 9000}) } - + + async movetoInstallationPage(){ + await this.licenseAgreement.click({timeout: 9000}) + await this.acceptLicense.click({timeout: 9000}) + await this.continueToComponentInstallation.click({timeout: 5000}) + } async fillApfDetails(datasetPrefix:string, authLoadLib:string,authpluginLib:string){ await this.page.waitForTimeout(500) @@ -121,7 +120,7 @@ class ApfAuthPage{ await this.authLoadLib.fill(authLoadLib); await this.authpluginLib.fill(authpluginLib); await this.page.waitForTimeout(5000) - + } async initializeApfauth(){ await this.initApfauth.click() diff --git a/playwright_test/Pages/certificates.page.ts b/playwright_test/Pages/certificates.page.ts new file mode 100644 index 0000000..12427e5 --- /dev/null +++ b/playwright_test/Pages/certificates.page.ts @@ -0,0 +1,17 @@ +import { Page, Locator } from '@playwright/test'; + +class CertificatesPage { + page: Page; + pageTitle: Locator; + + constructor(page: Page) { + this.page = page; + this.pageTitle = page.locator("//div[@class='MuiBox-root css-la96ob']/div") + } + + async getCertificatesPageTitle() { + await this.page.waitForTimeout(500); + return await this.pageTitle.textContent({ timeout: 2000 }); + } +} +export default CertificatesPage; \ No newline at end of file diff --git a/playwright_test/Pages/connection.page.ts b/playwright_test/Pages/connection.page.ts index adf3a62..a9d37b4 100644 --- a/playwright_test/Pages/connection.page.ts +++ b/playwright_test/Pages/connection.page.ts @@ -57,6 +57,11 @@ class ConnectionPage{ return await this.connectionPageTitle.textContent(); } + async fillPassword(password: string){ + await this.page.waitForTimeout(1000); + await this.password.fill(password); + } + async SubmitValidateCredential(){ console.log("Submitting credentials..."); await this.validateCredential.click(); diff --git a/playwright_test/Pages/launchConfig.page.ts b/playwright_test/Pages/launchConfig.page.ts index 41ed2fa..fe7beba 100644 --- a/playwright_test/Pages/launchConfig.page.ts +++ b/playwright_test/Pages/launchConfig.page.ts @@ -3,6 +3,7 @@ let electronApp: ElectronApplication class LaunchConfigPage{ page: Page; + pageTitle: Locator; fillValidation: Locator; logLevel: Locator; fillLogLevel: Locator; @@ -26,6 +27,7 @@ class LaunchConfigPage{ constructor(page: Page) { this.page = page; + this.pageTitle = page.locator("//div[@class='MuiBox-root css-la96ob']/div") this.click_launchConfig = page.locator('//span[text()="Launch Config"]') this.reviewPage_title = page.locator('//span[text()="Review Installation"]') this.validation = page.getByLabel('Validation'); @@ -57,9 +59,8 @@ class LaunchConfigPage{ async movetoLaunchConfigPage(){ await this.click_launchConfig.click({timeout: 5000}) } - async returnTitleOfConfPage(){ - const apfAuth_title = await this.CONFPAGE_TITLE.textContent(); - return apfAuth_title; + async getLaunchConfigurationPageTitle() { + return await this.pageTitle.textContent({ timeout: 2000 }); } async fillvalues(validation:string){ const inputLocator = this.page.locator('//html/body/div/div[2]/div/div[4]/div/form/div/div[2]/div/div[1]/div/div[2]/div/div/div/div/div/div/div/div/div/input'); diff --git a/playwright_test/Pages/planning.page.ts b/playwright_test/Pages/planning.page.ts index ecb9df5..658f20c 100644 --- a/playwright_test/Pages/planning.page.ts +++ b/playwright_test/Pages/planning.page.ts @@ -222,24 +222,20 @@ class PlanningPage{ await this.page.waitForTimeout(500); await this.previousStep.click(); } - private async waitForContinueButtonToBeEnabled(): Promise { - const timeout = 100000; // Adjust the timeout as needed - const interval = 500; - const endTime = Date.now() + timeout; - - while (Date.now() < endTime) { - if (await this.isContinueToInstallationEnabled()) { - console.log("Continue button is enabled."); - return true; // Button became enabled + + async clickContinueToInstallation(){ + const timeout = 30000; + const interval = 100; + const startTime = Date.now(); + const isButtonEnabled = async (): Promise => { + return await this.isContinueToInstallationEnabled(); + }; + while (!(await isButtonEnabled())) { + if (Date.now() - startTime > timeout) { + throw new Error('Timed out waiting for the button to be enabled.'); } - await this.page.waitForTimeout(interval); + await new Promise(resolve => setTimeout(resolve, interval)); } - - console.log("Continue button did not enabled "); - return false; // Button did not become enabled - } - - async clickContinueToInstallation(): Promise { await this.continueInstallationOptions.click(); } @@ -247,7 +243,7 @@ class PlanningPage{ await this.page.waitForTimeout(500); return await this.continueInstallationOptions.isDisabled() } - + async isContinueToInstallationEnabled(){ await this.page.waitForTimeout(500); return await this.continueInstallationOptions.isEnabled() @@ -267,8 +263,8 @@ class PlanningPage{ await this.saveAndValidate.click(); await this.page.waitForTimeout(500); } - - + + async fillPlanningPageWithRequiredFields(runtimeDir: any, workspaceDir: any, extensionDir: any, logDir: any, javaLocation:any,nodejsLocation:any,zOSMFHost:any,zOSMFPort:any,zOSMFAppID:any){ await this.clickSaveValidate(); await this.enterRuntimeDir(runtimeDir); @@ -277,8 +273,8 @@ class PlanningPage{ await this.enterExtensionsDir(extensionDir); await this.enterJavaLocation(javaLocation); await this.enterNodeJsLocation(nodejsLocation); - //await this.enterZosmfHost(zOSMFHost); - //await this.enterZosmfPort(zOSMFPort); + await this.enterZosmfHost(zOSMFHost); + await this.enterZosmfPort(zOSMFPort); await this.enterZosmfApplicationId(zOSMFAppID); await this.page.waitForTimeout(2000); } diff --git a/playwright_test/Pages/review.page.ts b/playwright_test/Pages/review.page.ts new file mode 100644 index 0000000..efbca43 --- /dev/null +++ b/playwright_test/Pages/review.page.ts @@ -0,0 +1,188 @@ +import { Page, Locator } from '@playwright/test'; + +class ReviewPage { + page: Page; + pageTitle: Locator; + reviewInstallationTab: Locator; + connectionTab: Locator; + planningTab: Locator; + installationTypeTab: Locator; + initializationTab: Locator; + installationTab: Locator; + networkingTab: Locator; + apfAuthTab: Locator; + securityTab: Locator; + stcsTab: Locator; + certificatesTab: Locator; + cachingServiceTab: Locator; + launchConfigTab: Locator; + connectionTabSuccessfulIcon: Locator; + planningTabPendingIcon: Locator; + installationTypeTabPendingIcon: Locator; + initializationTabPendingIcon: Locator; + installationTabPendingIcon: Locator; + networkingTabPendingIcon: Locator; + apfAuthTabPendingIcon: Locator; + securityTabPendingIcon: Locator; + certificatesTabPendingIcon: Locator; + launchConfigTabPendingIcon: Locator; + viewEditYaml: Locator; + viewJobOutput: Locator; + saveAndClose: Locator; + previousStep: Locator; + finishInstallation: Locator; + editorTitleElement: Locator; + closeEditorButton: Locator; + readOnlyEditor: Locator + + constructor(page: Page) { + this.page = page; + this.pageTitle = page.locator("//div[@class='MuiBox-root css-la96ob']/div") + this.reviewInstallationTab = page.locator("//span[text()='Review Installation']") + this.connectionTab = page.locator("//p[text()='Connection']") + this.planningTab = page.locator("//p[text()='Planning']") + this.installationTypeTab = page.locator("//p[text()='Installation Type']") + this.initializationTab = page.locator("//p[text()='Initialization']") + this.installationTab = page.locator("//p[text()='Installation']") + this.networkingTab = page.locator("//p[text()='Networking']") + this.apfAuthTab = page.locator("//p[text()='APF Auth']") + this.securityTab = page.locator("//p[text()='Security']") + this.stcsTab = page.locator("//p[text()='Stcs']") + this.certificatesTab = page.locator("//p[text()='Certificates']") + this.cachingServiceTab = page.locator("//p[text()='Caching Service']") + this.launchConfigTab = page.locator("//p[text()='Launch Config']") + this.connectionTabSuccessfulIcon = page.locator("//p[text()='Connection']/following-sibling::*[@data-testid='CheckCircleIcon']") + this.planningTabPendingIcon = page.locator("//p[text()='Planning']/following-sibling::*[@data-testid='WarningIcon']") + this.installationTypeTabPendingIcon = page.locator("//p[text()='Installation Type']/following-sibling::*[@data-testid='WarningIcon']") + this.initializationTabPendingIcon = page.locator("//p[text()='Initialization']/following-sibling::*[@data-testid='WarningIcon']") + this.installationTabPendingIcon = page.locator("//p[text()='Installation']/following-sibling::*[@data-testid='WarningIcon']") + this.networkingTabPendingIcon = page.locator("//p[text()='Networking']/following-sibling::*[@data-testid='WarningIcon']") + this.apfAuthTabPendingIcon = page.locator("//p[text()='APF Auth']/following-sibling::*[@data-testid='WarningIcon']") + this.securityTabPendingIcon = page.locator("//p[text()='Security']/following-sibling::*[@data-testid='WarningIcon']") + this.certificatesTabPendingIcon = page.locator("//p[text()='Certificates']/following-sibling::*[@data-testid='WarningIcon']") + this.launchConfigTabPendingIcon = page.locator("//p[text()='Launch Config']/following-sibling::*[@data-testid='WarningIcon']") + this.viewEditYaml = page.locator("//button[text()='View Yaml']") + this.viewJobOutput = page.locator("//button[text()='View Job Output']") + this.saveAndClose = page.locator("//button[text()='Save & close']") + this.previousStep = page.locator("//button[text()='Previous step']") + this.finishInstallation = page.locator("//button[text()='Finish Installation']") + this.editorTitleElement = page.locator("//h2[text()='Editor']") + this.closeEditorButton = page.locator("//button[text()='Close']") + this.readOnlyEditor = page.locator("//h2[text()='Editor']/following-sibling::div[1]//div[@class='view-lines monaco-mouse-cursor-text']/div[1]") + } + + async getReviewPageTitle() { + await this.page.waitForTimeout(500); + return await this.pageTitle.textContent({ timeout: 2000 }); + } + + async clickReviewInstallationTab() { + await this.page.waitForTimeout(500); + await this.reviewInstallationTab.click(); + } + + async clickConnectionTab() { + await this.page.waitForTimeout(500); + await this.connectionTab.click(); + } + + async clickPlanningTab() { + await this.page.waitForTimeout(500); + await this.planningTab.click(); + } + + async clickInstallationTypeTab() { + await this.page.waitForTimeout(500); + await this.installationTypeTab.click(); + } + + async clickInstallationTab() { + await this.page.waitForTimeout(500); + await this.installationTab.click(); + } + + async clickNetworkingTab() { + await this.page.waitForTimeout(500); + await this.networkingTab.click(); + } + + async clickApfAuthTab() { + await this.page.waitForTimeout(500); + await this.apfAuthTab.click(); + } + + async clickSecurityTab() { + await this.page.waitForTimeout(500); + await this.securityTab.click(); + } + + async clickStcsTab() { + await this.page.waitForTimeout(500); + await this.stcsTab.click(); + } + + async clickCertificatesTab() { + await this.page.waitForTimeout(500); + await this.certificatesTab.click(); + } + + async clickCachingServiceTab() { + await this.page.waitForTimeout(500); + await this.cachingServiceTab.click(); + } + + async clickLaunchConfigTab() { + await this.page.waitForTimeout(500); + await this.launchConfigTab.click(); + } + + async clickViewEditYaml() { + await this.page.waitForTimeout(500); + await this.viewEditYaml.click(); + } + + async clickViewJobOutput() { + await this.page.waitForTimeout(500); + await this.viewJobOutput.click(); + await this.page.waitForTimeout(2000); + } + + async clickSaveAndClose() { + await this.page.waitForTimeout(500); + await this.saveAndClose.click({ timeout: 2000 }); + } + + async clickPreviousStep() { + await this.page.waitForTimeout(500); + await this.previousStep.click(); + } + + async clickFinishInstallation() { + await this.page.waitForTimeout(500); + await this.finishInstallation.click(); + } + + async isFinishInstallationDisabled() { + await this.page.waitForTimeout(500); + return await this.finishInstallation.isDisabled() + } + + async isFinishInstallationEnabled() { + await this.page.waitForTimeout(500); + return await this.finishInstallation.isEnabled() + } + + async open_monacoEditor() { + await this.page.waitForTimeout(500); + this.viewEditYaml.click({ timeout: 2000 }) + await this.page.waitForTimeout(500); + const editor_title = await this.editorTitleElement.textContent(); + return editor_title; + } + + async clickCloseEditor() { + await this.page.waitForTimeout(500); + await this.closeEditorButton.click(); + } +} +export default ReviewPage; diff --git a/playwright_test/Pages/security.page.ts b/playwright_test/Pages/security.page.ts index 017afa2..4a95035 100644 --- a/playwright_test/Pages/security.page.ts +++ b/playwright_test/Pages/security.page.ts @@ -3,6 +3,7 @@ let electronApp: ElectronApplication class SecurityPage{ page: Page; + pageTitle: Locator; writeConfig_greenCheckXpath: Locator; uploadYaml_greenCheckXpath: Locator; init_security_greenCheckXpath: Locator; @@ -35,6 +36,7 @@ class SecurityPage{ constructor(page: Page) { this.page = page; + this.pageTitle = page.locator("//div[@class='MuiBox-root css-la96ob']/div") this.writeConfig_greenCheckXpath = page.locator('#card-init-security-progress-card svg.MuiSvgIcon-colorSuccess') this.uploadYaml_greenCheckXpath = page.locator('#card-download-progress-card svg.MuiSvgIcon-colorSuccess') this.init_security_greenCheckXpath = page.locator("#card-success-progress-card svg.MuiSvgIcon-colorSuccess") @@ -72,6 +74,10 @@ class SecurityPage{ } + async getSecurityPageTitle() { + return await this.pageTitle.textContent({ timeout: 2000 }); + } + async movetoSecurityPage(){ await this.click_security.click({timeout: 5000}) } diff --git a/playwright_test/Pages/stcs.page.ts b/playwright_test/Pages/stcs.page.ts index c450e81..9c8f450 100644 --- a/playwright_test/Pages/stcs.page.ts +++ b/playwright_test/Pages/stcs.page.ts @@ -14,7 +14,7 @@ class StcsPage{ previous_step_button = Locator; skip_button = Locator; editor_title_element = Locator; - STCS_TITLE = Locator; + STCS_TITLE : Locator; continueToComponentInstallation = Locator; view_yaml = Locator; viewAndSubmitJob = Locator; diff --git a/playwright_test/Pages/vsam.page.ts b/playwright_test/Pages/vsam.page.ts index 66a5b8c..8037a8f 100644 --- a/playwright_test/Pages/vsam.page.ts +++ b/playwright_test/Pages/vsam.page.ts @@ -8,7 +8,7 @@ class VsamPage{ previous_step_button = Locator; skip_button = Locator; editor_title_element = Locator; - VSAM_TITLE = Locator; + VSAM_TITLE : Locator; continueToComponentInstallation = Locator; view_yaml = Locator; viewAndSubmitJob = Locator; diff --git a/playwright_test/Tests/Review.spec.ts b/playwright_test/Tests/Review.spec.ts new file mode 100644 index 0000000..2de649c --- /dev/null +++ b/playwright_test/Tests/Review.spec.ts @@ -0,0 +1,242 @@ +import { test, ElectronApplication, expect, _electron as electron } from '@playwright/test'; +import TitlePage from '../Pages/title.page.ts'; +import ConnectionPage from '../Pages/connection.page.ts'; +import PlanningPage from '../Pages/planning.page.ts'; +import InstallationTypePage from '../Pages/installationType.page.ts'; +import InstallationPage from '../Pages/installation.page.ts'; +import NetworkingPage from '../Pages/networking.page.ts'; +import ApfAuthPage from '../Pages/ApfAuth.page.ts'; +import SecurityPage from '../Pages/security.page.ts'; +import StcsPage from '../Pages/stcs.page.ts'; +import CertificatesPage from '../Pages/certificates.page.ts'; +import VsamPage from '../Pages/vsam.page.ts'; +import LaunchConfigPage from '../Pages/launchConfig.page'; +import ReviewPage from '../Pages/review.page.ts'; +import config from '../utils/config.ts'; +import { prepareEnvironment } from '../prepare.js'; + +let electronApp: ElectronApplication +const CONNECTION_PAGE_TITLE = 'Connection'; +const PLANNING_PAGE_TITLE = 'Before you start'; +const INSTALLATION_TYPE_PAGE_TITLE = 'Installation Type'; +const INSTALLATION_PAGE_TITLE = 'Installation'; +const NETWORKING_PAGE_TITLE = 'Networking'; +const APF_AUTH_PAGE_TITLE = 'APF Authorize Load Libraries'; +const SECURITY_PAGE_TITLE = 'Security'; +const STCS_PAGE_TITLE = 'Stcs'; +const CERTIFICATES_PAGE_TITLE = 'Certificates'; +const CACHING_SERVICE_PAGE_TITLE = 'CachingService'; +const LAUNCH_CONFIGURATION_PAGE_TITLE = 'Configuration'; +const REVIEW_PAGE_TITLE = 'Review Installation'; + +test.describe('ReviewTab', () => { + let titlePage: TitlePage; + let connectionPage: ConnectionPage; + let planningPage: PlanningPage; + let installationTypePage: InstallationTypePage; + let installationPage: InstallationPage; + let networkingPage: NetworkingPage + let apfAuthPage: ApfAuthPage + let securityPage: SecurityPage + let stcsPage: StcsPage + let certificatesPage: CertificatesPage; + let vsamPage: VsamPage + let launchConfigPage: LaunchConfigPage; + let reviewPage: ReviewPage; + + test.beforeAll(async () => { + try { + await prepareEnvironment({ install: true, remove: false }); + } catch (error) { + console.error('Error during environment preparation:', error); + process.exit(1); + } + }); + + test.beforeEach(async ({ page }) => { + test.setTimeout(900000); + electronApp = await electron.launch({ args: ['.webpack/main/index.js'] }) + page = await electronApp.firstWindow() + titlePage = new TitlePage(page); + connectionPage = new ConnectionPage(page); + planningPage = new PlanningPage(page); + installationTypePage = new InstallationTypePage(page); + installationPage = new InstallationPage(page); + networkingPage = new NetworkingPage(page); + apfAuthPage = new ApfAuthPage(page); + securityPage = new SecurityPage(page); + stcsPage = new StcsPage(page); + certificatesPage = new CertificatesPage(page); + vsamPage = new VsamPage(page); + launchConfigPage = new LaunchConfigPage(page); + reviewPage = new ReviewPage(page); + titlePage.navigateToConnectionTab() + await connectionPage.fillConnectionDetails(config.SSH_HOST, config.SSH_PORT, config.SSH_USER, config.SSH_PASSWD); + await connectionPage.SubmitValidateCredential(); + await connectionPage.clickContinueButton(); + await page.waitForTimeout(2000); + reviewPage.clickReviewInstallationTab(); + await page.waitForTimeout(5000); + }) + + test.afterEach(async () => { + await electronApp.close() + }) + + test('Test Title and all required fields on the Review page', async ({ page }) => { + const review_title = await reviewPage.getReviewPageTitle(); + expect(review_title).toBe(REVIEW_PAGE_TITLE); + expect(reviewPage.connectionTab).toBeTruthy() + expect(reviewPage.planningTab).toBeTruthy() + expect(reviewPage.installationTypeTab).toBeTruthy() + expect(reviewPage.installationTab).toBeTruthy() + expect(reviewPage.networkingTab).toBeTruthy() + expect(reviewPage.apfAuthTab).toBeTruthy() + expect(reviewPage.securityTab).toBeTruthy() + expect(reviewPage.certificatesTab).toBeTruthy() + expect(reviewPage.launchConfigTab).toBeTruthy() + expect(reviewPage.viewEditYaml).toBeTruthy() + expect(reviewPage.viewJobOutput).toBeTruthy() + expect(reviewPage.saveAndClose).toBeTruthy() + expect(reviewPage.previousStep).toBeTruthy() + const is_Finish_Button_disable = await reviewPage.isFinishInstallationDisabled(); + expect(is_Finish_Button_disable).toBe(true); + }) + + test('Test Navigation to Connection page', async ({ page }) => { + reviewPage.clickConnectionTab(); + await page.waitForTimeout(1000); + const connection_title = await connectionPage.getConnectionPageTitle(); + expect(connection_title).toBe(CONNECTION_PAGE_TITLE); + }) + + test('Test Navigation to Planning page', async ({ page }) => { + reviewPage.clickPlanningTab(); + await page.waitForTimeout(1000); + const planning_title = await planningPage.getPlanningPageTitle(); + expect(planning_title).toBe(PLANNING_PAGE_TITLE); + }) + + test('Test Navigation to Installation Type page', async ({ page }) => { + reviewPage.clickInstallationTypeTab(); + await page.waitForTimeout(1000); + const installation_type_title = await installationTypePage.getInstallationTypePageTitle(); + expect(installation_type_title).toBe(INSTALLATION_TYPE_PAGE_TITLE); + }) + + test('Test Navigation to Installation page', async ({ page }) => { + reviewPage.clickInstallationTab(); + await page.waitForTimeout(1000); + const installation_title = await installationPage.getInstallationPageTitle(); + expect(installation_title).toBe(INSTALLATION_PAGE_TITLE); + }) + + test('Test Navigation to Networking page', async ({ page }) => { + reviewPage.clickNetworkingTab(); + await page.waitForTimeout(1000); + const networking_title = await networkingPage.returnTitleOfNetworkingPage(); + expect(networking_title).toBe(NETWORKING_PAGE_TITLE); + }) + + test('Test Navigation to Apf Auth page', async ({ page }) => { + reviewPage.clickApfAuthTab(); + await page.waitForTimeout(1000); + const apfAuth_title = await apfAuthPage.returnTitleOfApfAuthPage(); + expect(apfAuth_title).toBe(APF_AUTH_PAGE_TITLE); + }) + + test('Test Navigation to Security page', async ({ page }) => { + reviewPage.clickSecurityTab(); + await page.waitForTimeout(1000); + const security_title = await securityPage.getSecurityPageTitle(); + expect(security_title).toBe(SECURITY_PAGE_TITLE); + }) + + test('Test Navigation to Stcs page', async ({ page }) => { + reviewPage.clickStcsTab(); + await page.waitForTimeout(1000); + const stcs_title = await stcsPage.returnTitleOfStcsPage(); + expect(stcs_title).toBe(STCS_PAGE_TITLE); + }) + + test('Test Navigation to Certificates page', async ({ page }) => { + reviewPage.clickCertificatesTab(); + await page.waitForTimeout(1000); + const certificates_title = await certificatesPage.getCertificatesPageTitle(); + expect(certificates_title).toBe(CERTIFICATES_PAGE_TITLE); + }) + + test('Test Navigation to Caching Service page', async ({ page }) => { + reviewPage.clickCachingServiceTab(); + await page.waitForTimeout(1000); + const cachingService_title = await vsamPage.returnTitleOfVsamPage(); + expect(cachingService_title).toBe(CACHING_SERVICE_PAGE_TITLE); + }) + + test('Test Navigation to Launch Config page', async ({ page }) => { + reviewPage.clickLaunchConfigTab(); + await page.waitForTimeout(1000); + const launchConfig_title = await launchConfigPage.getLaunchConfigurationPageTitle(); + expect(launchConfig_title).toBe(LAUNCH_CONFIGURATION_PAGE_TITLE); + }) + + test('Test Successful and Pending Operations Tabs', async ({ page }) => { + expect(reviewPage.connectionTabSuccessfulIcon).toBeTruthy() + expect(reviewPage.planningTabPendingIcon).toBeTruthy() + expect(reviewPage.installationTypeTabPendingIcon).toBeTruthy() + expect(reviewPage.installationTabPendingIcon).toBeTruthy() + expect(reviewPage.networkingTabPendingIcon).toBeTruthy() + expect(reviewPage.apfAuthTabPendingIcon).toBeTruthy() + expect(reviewPage.securityTabPendingIcon).toBeTruthy() + expect(reviewPage.certificatesTabPendingIcon).toBeTruthy() + expect(reviewPage.launchConfigTabPendingIcon).toBeTruthy() + }) + + test('Test Finish Installation and Test Previous step', async ({ page }) => { + const is_Finish_Button_enable = await reviewPage.isFinishInstallationEnabled(); + expect(is_Finish_Button_enable).toBe(false); + reviewPage.clickPreviousStep(); + await page.waitForTimeout(2000); + const title = await launchConfigPage.getLaunchConfigurationPageTitle(); + expect(title).toBe(INSTALLATION_PAGE_TITLE); + }) + + test('Test View Yaml Button', async ({ page }) => { + reviewPage.clickViewEditYaml() + await page.waitForTimeout(2000); + expect(reviewPage.editorTitleElement).toBeTruthy(); + reviewPage.clickCloseEditor() + await page.waitForTimeout(2000); + }) + + test('Test If you can edit the Yaml', async ({ page }) => { + reviewPage.clickViewEditYaml() + await page.waitForTimeout(2000); + expect(reviewPage.editorTitleElement).toBeTruthy(); + try { + await reviewPage.readOnlyEditor.fill('Trying to update content'); + } catch (error) { + expect(error.message).toContain('Element is not an ,