it-tools/src/tools/password-strength-analyser/password-strength-analyser.e2e.spec.ts
Mark Townsend 8a30b6bdb3
refactor(spelling): minor corrections to phrasing/spelling (#596)
* Minor corrections to phrasing/spelling.

* Corrected 'millennia'.

* Corrected tests.

---------

Co-authored-by: Corentin THOMASSET <corentin.thomasset74@gmail.com>
2023-09-04 14:51:04 +02:00

20 lines
654 B
TypeScript

import { expect, test } from '@playwright/test';
test.describe('Tool - Password strength analyser', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/password-strength-analyser');
});
test('Has correct title', async ({ page }) => {
await expect(page).toHaveTitle('Password strength analyser - IT Tools');
});
test('Computes the brute force attack time of a password', async ({ page }) => {
await page.getByTestId('password-input').fill('ABCabc123!@#');
const crackDuration = await page.getByTestId('crack-duration').textContent();
expect(crackDuration).toEqual('15,091 millennia, 3 centuries');
});
});