diff options
Diffstat (limited to 'src/tools/password-strength-analyser/password-strength-analyser.e2e.spec.ts')
-rw-r--r-- | src/tools/password-strength-analyser/password-strength-analyser.e2e.spec.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tools/password-strength-analyser/password-strength-analyser.e2e.spec.ts b/src/tools/password-strength-analyser/password-strength-analyser.e2e.spec.ts new file mode 100644 index 0000000..a694c54 --- /dev/null +++ b/src/tools/password-strength-analyser/password-strength-analyser.e2e.spec.ts @@ -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'); + }); +}); |