feat(new-tool): password strength analyzer (#502)

This commit is contained in:
Corentin THOMASSET 2023-06-25 10:26:29 +02:00 committed by GitHub
parent 6bda2caa04
commit a9c7b89193
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 223 additions and 1 deletions

View file

@ -0,0 +1,19 @@
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 milleniums, 3 centurys');
});
});