/** * Auto-generated by @futdevpro/dynamo-e2e — FormSuite Generator * Form key: sb-date * Route: /c/date-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_DateFieldNew', (): void => { test.describe('Field: birthDate (date)', (): void => { test.beforeEach(async ({ page }): Promise => { const response = await page.goto('/c/date-field-new'); expect(response?.ok()).toBeTruthy(); await page.locator('dynamo-date-field-new').first().waitFor({ state: 'visible' }); }); test('field[birthDate] date:empty → valid — üres dátum', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-date-default'); await input.fill(''); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-date-default"]').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[birthDate] date:today → valid — mai dátum', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-date-default'); await input.fill('2026-06-10'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-date-default"]').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[birthDate] date:leap-feb29 → valid — szökőév feb 29.', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-date-default'); await input.fill('2024-02-29'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-date-default"]').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[birthDate] date:before-y2k → valid — Y2K előtti dátum', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-date-default'); await input.fill('1999-12-31'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-date-default"]').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[birthDate] date:before-unix-epoch → valid — Unix epoch előtt', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-date-default'); await input.fill('1969-12-31'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-date-default"]').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[birthDate] date:far-future → valid — messzi jövő', async ({ page }): Promise => { const input: Locator = page.getByTestId('sandbox-date-default'); await input.fill('2099-12-31'); await input.blur(); const fieldRoot: Locator = page.locator('[data-testid="sandbox-date-default"]').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); }); }); });