/** * Auto-generated by @futdevpro/dynamo-e2e — FormSuite Generator * Form key: sb-number * Route: /c/number-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_NumberFieldNew', (): void => { test.describe('Field: age (number)', (): void => { test.beforeEach(async ({ page }): Promise => { const response = await page.goto('/c/number-field-new'); expect(response?.ok()).toBeTruthy(); await page.locator('dynamo-number-field-new').first().waitFor({ state: 'visible' }); }); test('field[age] number:empty → valid — üres input', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-number-required'); await input.fill(''); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-number-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[age] number:zero → valid — 0', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-number-required'); await input.fill('0'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-number-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[age] number:one → valid — 1', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-number-required'); await input.fill('1'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-number-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[age] number:negative-one → valid — -1', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-number-required'); await input.fill('-1'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-number-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[age] number:positive-sign → valid — +5 (explicit pozitív előjel)', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-number-required'); await input.fill('+5'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-number-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[age] number:decimal-when-int → valid — 3.14 — tört érték', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-number-required'); await input.fill('3.14'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-number-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[age] number:scientific → valid — 1e10 — tudományos jelölés', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-number-required'); await input.fill('1e10'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-number-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[age] number:very-large → valid — Number.MAX_SAFE_INTEGER', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-number-required'); await input.fill('9007199254740991'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-number-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[age] number:very-small → valid — Number.MIN_SAFE_INTEGER', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-number-required'); await input.fill('-9007199254740991'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-number-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[age] number:below-min → invalid:min — a Settings.min alatt', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-number-required'); await input.fill('12'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-number-required"]').locator('xpath=ancestor-or-self::*[starts-with(local-name(),"dynamo-")]').first(); await expect(fieldRoot.locator('.text-red-400.mt-1').first()).toBeVisible(); // expectedErrorKey: min }); test('field[age] number:above-max → invalid:max — a Settings.max fölött', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-number-required'); await input.fill('121'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-number-required"]').locator('xpath=ancestor-or-self::*[starts-with(local-name(),"dynamo-")]').first(); await expect(fieldRoot.locator('.text-red-400.mt-1').first()).toBeVisible(); // expectedErrorKey: max }); }); });