mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-28 18:46:15 -04:00
feat(new tool): numeronym generator (#729)
This commit is contained in:
parent
fe1de8c5c9
commit
e07e2ae5bc
8 changed files with 87 additions and 1 deletions
|
@ -0,0 +1,25 @@
|
|||
import { expect, test } from '@playwright/test';
|
||||
|
||||
test.describe('Tool - Numeronym generator', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto('/numeronym-generator');
|
||||
});
|
||||
|
||||
test('Has correct title', async ({ page }) => {
|
||||
await expect(page).toHaveTitle('Numeronym generator - IT Tools');
|
||||
});
|
||||
|
||||
test('a numeronym is generated when a word is entered', async ({ page }) => {
|
||||
await page.getByTestId('word-input').fill('internationalization');
|
||||
const numeronym = await page.getByTestId('numeronym').inputValue();
|
||||
|
||||
expect(numeronym).toEqual('i18n');
|
||||
});
|
||||
|
||||
test('when a word has 3 letters or less, the numeronym is the word itself', async ({ page }) => {
|
||||
await page.getByTestId('word-input').fill('abc');
|
||||
const numeronym = await page.getByTestId('numeronym').inputValue();
|
||||
|
||||
expect(numeronym).toEqual('abc');
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue