diff --git a/.github/workflows/ui_tests.yml b/.github/workflows/ui_tests.yml index be2ec2df6f..190aa157a6 100644 --- a/.github/workflows/ui_tests.yml +++ b/.github/workflows/ui_tests.yml @@ -92,6 +92,12 @@ jobs: CI: true working-directory: ./apps/laboratory/ run: npm run ${{ inputs.command }} + - name: Run canary with minimal environment config + env: + NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }} + CI: true + working-directory: ./apps/laboratory/ + run: npm run playwright:test:canary - uses: actions/upload-artifact@v3 if: always() with: diff --git a/apps/laboratory/tests/shared/fixtures/w3m-email-fixture.ts b/apps/laboratory/tests/shared/fixtures/w3m-email-fixture.ts index 257d05cf65..81070c0225 100644 --- a/apps/laboratory/tests/shared/fixtures/w3m-email-fixture.ts +++ b/apps/laboratory/tests/shared/fixtures/w3m-email-fixture.ts @@ -18,7 +18,7 @@ export const testMEmail = base.extend({ const email = new Email(mailsacApiKey) const tempEmail = email.getEmailAddressToUse(testInfo.parallelIndex) - await modalPage.emailFlow(tempEmail, context) + await modalPage.emailFlow(tempEmail, context, mailsacApiKey) await use(modalPage) }, modalValidator: async ({ modalPage }, use) => { diff --git a/apps/laboratory/tests/shared/fixtures/w3m-smart-account-fixture.ts b/apps/laboratory/tests/shared/fixtures/w3m-smart-account-fixture.ts index 4e09552833..64b8960d3f 100644 --- a/apps/laboratory/tests/shared/fixtures/w3m-smart-account-fixture.ts +++ b/apps/laboratory/tests/shared/fixtures/w3m-smart-account-fixture.ts @@ -21,7 +21,7 @@ export const testModalSmartAccount = base.extend { + async emailFlow( + emailAddress: string, + context: BrowserContext, + mailsacApiKey: string + ): Promise { await this.load() const email = new Email(mailsacApiKey) diff --git a/apps/laboratory/tests/smart-account.spec.ts b/apps/laboratory/tests/smart-account.spec.ts index a1efa3a038..dd8ec2c039 100644 --- a/apps/laboratory/tests/smart-account.spec.ts +++ b/apps/laboratory/tests/smart-account.spec.ts @@ -3,6 +3,12 @@ import type { ModalWalletPage } from './shared/pages/ModalWalletPage' import type { ModalWalletValidator } from './shared/validators/ModalWalletValidator' const NOT_ENABLED_SMART_ACCOUNT_INDEX = 10 +const NOT_ENABLED_SMART_ACCOUNT = 'web3modal-smart-account@mailsac.com' + +const mailsacApiKey = process.env['MAILSAC_API_KEY'] +if (!mailsacApiKey) { + throw new Error('MAILSAC_API_KEY is not set') +} testModalSmartAccount.beforeEach(async ({ modalValidator }) => { await modalValidator.expectConnected() @@ -63,7 +69,7 @@ testModalSmartAccount( await walletModalPage.disconnect() await walletModalPage.page.waitForTimeout(2500) - await walletModalPage.emailFlow('web3modal-smart-account@mailsac.com', context) + await walletModalPage.emailFlow(NOT_ENABLED_SMART_ACCOUNT, context, mailsacApiKey) await walletModalPage.switchNetwork('Sepolia') await walletModalPage.openSettings()