mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-24 08:46:15 -04:00
chore(e2e): execute e2e against built app (#511)
This commit is contained in:
parent
01525838e0
commit
cf382b5a10
4 changed files with 29 additions and 7 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue