zonemaster-gui/e2e/FR23.e2e-spec.ts
2025-05-26 13:19:38 +02:00

28 lines
1 KiB
TypeScript

import { test, expect } from '@playwright/test';
import { setLang } from './utils/app.utils';
test.describe('Zonemaster test FR23 - [Provide a list of previous runs for the domain and should be paginated]', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/');
await setLang(page, 'en');
});
test('should display previous tests', async ({ page }) => {
await page.locator('input[name="domain"]').first().focus();
await page.keyboard.type('results.afNiC.Fr');
await page.keyboard.press('Enter');
const historyButton = page.locator('#zmHistoryButton');
await expect(historyButton).toBeVisible({ timeout: 10000 });
await expect(historyButton).toHaveText('History');
await historyButton.click();
await expect(page.locator('#historyDialog')).toBeVisible({ timeout: 10000 });
await expect(page.locator('#historyDialog li:first-child')).toHaveCount(1);
await expect(page.locator('#historyDialog footer')).toHaveCount(1);
});
});