/** * Auto-generated by @futdevpro/dynamo-e2e — FormSuite Generator * Form key: sb-text * Route: /c/text-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_TextFieldNew (Required)', (): void => { test.describe('Field: name (text)', (): void => { test.beforeEach(async ({ page }): Promise => { const response = await page.goto('/c/text-field-new'); expect(response?.ok()).toBeTruthy(); await page.locator('dynamo-text-field-new').first().waitFor({ state: 'visible' }); }); test('field[name] text:empty → valid — üres input', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill(''); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:single-whitespace → valid — egyetlen szóköz', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill(' '); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:only-whitespace → valid — csak whitespace karakterek', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill(' \t '); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:single-char → valid — egyetlen karakter', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill('a'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:ascii → valid — ASCII string', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill('Hello World 123'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:unicode-basic → valid — magyar / unicode-basic karakterek', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill('Árvíztűrő tükörfúrógép'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:unicode-emoji → valid — emoji', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill('🚀 hello 🎉'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:unicode-rtl → valid — RTL (jobbról-balra) karakterek', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill('مرحبا بالعالم'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:html-entities → valid — HTML-entitas', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill('<script>&'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:xss-tag → valid — XSS-tag (sanitization-check)', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill(''); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:sql-injection-shape → valid — SQL-injection-szerű string', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill('\' OR \'1\'=\'1\' --'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:control-chars → valid — control-karakterek (NUL / BS / DEL)', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill('abcdef'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:leading-spaces → valid — kezdő szóközök', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill(' value'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:trailing-spaces → valid — végző szóközök', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill('value '); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:sentence → valid — normál mondat', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill('The quick brown fox jumps over the lazy dog.'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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[name] text:oversize → invalid:maxLength — a maxLength-en túl (256+ char)', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-text-required'); await input.fill('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-text-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 }); }); });