diff options
author | 2023-06-29 18:48:51 +0200 | |
---|---|---|
committer | 2023-06-29 18:48:51 +0200 | |
commit | cf382b5a1040530a898c4f5079c294a69c8d163e (patch) | |
tree | 3c20f6235f8f3e53c43e5f34fca5fde01ef05961 /src/tools/otp-code-generator-and-validator/otp-code-generator.e2e.spec.ts | |
parent | 01525838e032a50b9641c404178e15812da8a821 (diff) | |
download | it-tools-cf382b5a1040530a898c4f5079c294a69c8d163e.tar.gz it-tools-cf382b5a1040530a898c4f5079c294a69c8d163e.tar.zst it-tools-cf382b5a1040530a898c4f5079c294a69c8d163e.zip |
chore(e2e): execute e2e against built app (#511)
Diffstat (limited to 'src/tools/otp-code-generator-and-validator/otp-code-generator.e2e.spec.ts')
-rw-r--r-- | src/tools/otp-code-generator-and-validator/otp-code-generator.e2e.spec.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/otp-code-generator-and-validator/otp-code-generator.e2e.spec.ts b/src/tools/otp-code-generator-and-validator/otp-code-generator.e2e.spec.ts index 40fb426..4f9933a 100644 --- a/src/tools/otp-code-generator-and-validator/otp-code-generator.e2e.spec.ts +++ b/src/tools/otp-code-generator-and-validator/otp-code-generator.e2e.spec.ts @@ -2,6 +2,9 @@ import { expect, test } from '@playwright/test'; test.describe('Tool - OTP code generator', () => { test.beforeEach(async ({ page }) => { + await page.addInitScript(() => { + Date.now = () => 1609477200000; // Jan 1, 2021 + }); await page.goto('/otp-generator'); }); @@ -18,10 +21,6 @@ test.describe('Tool - OTP code generator', () => { }); test('OTP a generated from the provided secret', async ({ page }) => { - page.evaluate(() => { - Date.now = () => 1609477200000; // Jan 1, 2021 - }); - await page.getByPlaceholder('Paste your TOTP secret...').fill('ITTOOLS'); const previousOtp = await page.getByTestId('previous-otp').innerText(); |