From 94a0f9cbc4c8333e6b2b47ccf7f8808014e0ddac Mon Sep 17 00:00:00 2001 From: qlrd <106913782+qlrd@users.noreply.github.com> Date: Thu, 7 Sep 2023 16:02:03 -0300 Subject: [PATCH] added test for click back button on already downloaded pem --- ...loaded-selfcustody-release-zip-sig.spec.ts | 1 - ...-selfcustody-pem-click-back-button.spec.ts | 94 +++++++++++++++++++ 2 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 test/e2e/specs/034.already-downloaded-selfcustody-pem-click-back-button.spec.ts diff --git a/test/e2e/specs/027.already-downloaded-selfcustody-release-zip-sig.spec.ts b/test/e2e/specs/027.already-downloaded-selfcustody-release-zip-sig.spec.ts index d80bcd09..e1b318f9 100644 --- a/test/e2e/specs/027.already-downloaded-selfcustody-release-zip-sig.spec.ts +++ b/test/e2e/specs/027.already-downloaded-selfcustody-release-zip-sig.spec.ts @@ -122,5 +122,4 @@ describe('KruxInstaller SelectVersion page (already downloaded release signatur await expectWDIO(instance.warningDownloadBackButtonText).toHaveText('Back') }) - }) diff --git a/test/e2e/specs/034.already-downloaded-selfcustody-pem-click-back-button.spec.ts b/test/e2e/specs/034.already-downloaded-selfcustody-pem-click-back-button.spec.ts new file mode 100644 index 00000000..fa5f89ab --- /dev/null +++ b/test/e2e/specs/034.already-downloaded-selfcustody-pem-click-back-button.spec.ts @@ -0,0 +1,94 @@ +const expectChai = require('chai').expect +const expectWDIO = require('@wdio/globals').expect +const { join } = require('path') +const { homedir } = require('os') +const { osLangSync } = require('os-lang') +const { describe, it } = require('mocha') + +const App = require('../pageobjects/app.page') + +describe('KruxInstaller SelectVersion page (already downloaded public key certificate - click back button)', () => { + + let instance: any; + + before(async function () { + instance = new App() + await instance.app.waitForExist() + await instance.main.waitForExist() + await instance.logo.waitForExist() + await instance.logo.waitForExist({ reverse: true }) + await instance.loadingDataMsg.waitForExist() + await instance.verifyingOpensslMsg.waitForExist() + if (process.platform === 'linux') { + await instance.opensslForLinuxFound.waitForExist() + } else if (process.platform === 'darwin') { + await instance.opensslForDarwinFound.waitForExist() + } else if (process.platform === 'win32') { + await instance.opensslForWin32Found.waitForExist() + } + await instance.loadingDataMsg.waitForExist({ reverse: true }) + await instance.verifyingOpensslMsg.waitForExist({ reverse: true }) + await instance.opensslForLinuxFound.waitForExist({ reverse: true }) + await instance.mainPage.waitForExist() + await instance.mainSelectDeviceButton.waitForExist() + await instance.mainSelectVersionButton.waitForExist() + await instance.mainSelectVersionButton.click() + await instance.mainPage.waitForExist({ reverse: true }) + await instance.githubOctocatCheckerLogo.waitForExist({ timeout: 3000 }) + await instance.selectVersionPage.waitForExist() + await instance.selectVersionSelfcustodyButton.waitForExist() + await instance.selectVersionSelfcustodyText.waitForExist() + await instance.selectVersionOdudexButton.waitForExist() + await instance.selectVersionOdudexText.waitForExist() + await instance.selectVersionSelfcustodyButton.click() + await instance.selectVersionPage.waitForExist({ reverse: true }) + await instance.checkingReleaseZipMsg.waitForExist() + await instance.foundReleaseZipMsg.waitForExist() + await instance.warningDownloadPage.waitForExist() + await instance.warningAlreadyDownloadedText.waitForExist() + await instance.warningDownloadProceedButton.waitForExist() + await instance.warningDownloadProceedButtonText.waitForExist() + await instance.warningDownloadAgainButton.waitForExist() + await instance.warningDownloadAgainButtonText.waitForExist() + await instance.warningDownloadShowDetailsButton.waitForExist() + await instance.warningDownloadShowDetailsButtonText.waitForExist() + await instance.warningDownloadBackButton.waitForExist() + await instance.warningDownloadBackButtonText.waitForExist() + await instance.warningDownloadProceedButton.click() + await instance.warningDownloadPage.waitForExist({ reverse: true }) + await instance.checkingReleaseZipSha256txtMsg.waitForExist() + await instance.foundReleaseZipSha256txtMsg.waitForExist() + await instance.warningDownloadPage.waitForExist() + await instance.warningDownloadProceedButton.waitForExist() + await instance.warningDownloadProceedButtonText.waitForExist() + await instance.warningDownloadProceedButton.click() + await instance.warningDownloadPage.waitForExist({ reverse: true }) + await instance.checkingReleaseZipSigMsg.waitForExist() + await instance.foundReleaseZipSigMsg.waitForExist() + await instance.warningDownloadPage.waitForExist() + await instance.warningDownloadProceedButton.waitForExist() + await instance.warningDownloadProceedButtonText.waitForExist() + await instance.warningDownloadProceedButton.click() + await instance.warningDownloadPage.waitForExist({ reverse: true }) + await instance.checkingReleasePemMsg.waitForExist() + await instance.foundReleasePemMsg.waitForExist() + await instance.warningDownloadPage.waitForExist() + }) + + it ('should click \'Back\' button and go out from WarningDownload page', async () => { + await instance.warningDownloadBackButton.click() + await instance.warningDownloadPage.waitForExist({ reverse: true }) + await expectWDIO(instance.warningDownloadPage).not.toBeDisplayed() + }) + + it('should Main Page be displayed', async () => { + await instance.mainPage.waitForExist() + await expectWDIO(instance.mainPage).toBeDisplayed() + }) + + it('should \'Select version\' button changed to \'Version: selfcustody/krux/releases/tag/v22.08.2\'', async () => { + await instance.mainSelectVersionText.waitForExist() + await expectWDIO(instance.mainSelectVersionText).toBeDisplayed() + await expectWDIO(instance.mainSelectVersionText).toHaveText('Version: selfcustody/krux/releases/tag/v22.08.2') + }) +})