/** * Auto-generated by @futdevpro/dynamo-e2e — FormSuite Generator * Form key: sb-pwd * Route: /c/password-field-new * Built at: WAVE-1-STAMP * * DO NOT EDIT BY HAND. Re-emit via `dc e2e generate-form-suite` or * `DyE2E_FormSuite_Generator.emit({...})` consumer-script. */ import { test, expect, Locator } from '@playwright/test'; test.describe('Sandbox: DyNX_PasswordFieldNew (Required)', (): void => { test.describe('Field: password (password)', (): void => { test.beforeEach(async ({ page }): Promise => { const response = await page.goto('/c/password-field-new'); expect(response?.ok()).toBeTruthy(); await page.locator('dynamo-password-field-new').first().waitFor({ state: 'visible' }); }); test('field[password] pw:empty → valid — üres jelszó', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-pwd-required'); await input.fill(''); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-pwd-required"]').locator('xpath=ancestor-or-self::*[contains(@class,"field") or starts-with(local-name(),"dynamo-")]').first(); await expect(fieldRoot.locator('.text-red-400.mt-1')).toHaveCount(0); }); test('field[password] pw:ascii → valid — tipikus ASCII jelszó', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-pwd-required'); await input.fill('SecurePw123!'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-pwd-required"]').locator('xpath=ancestor-or-self::*[contains(@class,"field") or starts-with(local-name(),"dynamo-")]').first(); await expect(fieldRoot.locator('.text-red-400.mt-1')).toHaveCount(0); }); test('field[password] pw:unicode-basic → valid — unicode jelszó', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-pwd-required'); await input.fill('JelszóBiztos123'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-pwd-required"]').locator('xpath=ancestor-or-self::*[contains(@class,"field") or starts-with(local-name(),"dynamo-")]').first(); await expect(fieldRoot.locator('.text-red-400.mt-1')).toHaveCount(0); }); test('field[password] pw:unicode-emoji → valid — emoji jelszóban', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-pwd-required'); await input.fill('Pw🔐Strong'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-pwd-required"]').locator('xpath=ancestor-or-self::*[contains(@class,"field") or starts-with(local-name(),"dynamo-")]').first(); await expect(fieldRoot.locator('.text-red-400.mt-1')).toHaveCount(0); }); test('field[password] pw:short → invalid:minLength — < 8 char (default minLength)', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-pwd-required'); await input.fill('aaaaaaa'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-pwd-required"]').locator('xpath=ancestor-or-self::*[starts-with(local-name(),"dynamo-")]').first(); await expect(fieldRoot.locator('.text-red-400.mt-1').first()).toBeVisible(); // expectedErrorKey: minLength }); test('field[password] pw:single-whitespace → valid — space-only password (some sites reject)', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-pwd-required'); await input.fill(' '); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-pwd-required"]').locator('xpath=ancestor-or-self::*[contains(@class,"field") or starts-with(local-name(),"dynamo-")]').first(); await expect(fieldRoot.locator('.text-red-400.mt-1')).toHaveCount(0); }); test('field[password] pw:xss-tag → valid — XSS-tag jelszóban', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-pwd-required'); await input.fill(''); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-pwd-required"]').locator('xpath=ancestor-or-self::*[contains(@class,"field") or starts-with(local-name(),"dynamo-")]').first(); await expect(fieldRoot.locator('.text-red-400.mt-1')).toHaveCount(0); }); test('field[password] pw:sql-injection-shape → valid — SQL-injection-szerű jelszó', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-pwd-required'); await input.fill('\' OR \'1\'=\'1\' --'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-pwd-required"]').locator('xpath=ancestor-or-self::*[contains(@class,"field") or starts-with(local-name(),"dynamo-")]').first(); await expect(fieldRoot.locator('.text-red-400.mt-1')).toHaveCount(0); }); test('field[password] pw:oversize → invalid:maxLength — 256+ char jelszó', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-pwd-required'); await input.fill('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-pwd-required"]').locator('xpath=ancestor-or-self::*[starts-with(local-name(),"dynamo-")]').first(); await expect(fieldRoot.locator('.text-red-400.mt-1').first()).toBeVisible(); // expectedErrorKey: maxLength }); }); });