feat: add full Zonemaster stack with Docker and Spanish UI
- Clone all 5 Zonemaster component repos (LDNS, Engine, CLI, Backend, GUI) - Dockerfile.backend: 8-stage multi-stage build LDNS→Engine→CLI→Backend - Dockerfile.gui: Astro static build served via nginx - docker-compose.yml: backend (internal) + frontend (port 5353) - nginx.conf: root redirects to /es/, /api/ proxied to backend - zonemaster-gui/config.ts: defaultLanguage set to 'es' (Spanish) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
55
zonemaster-gui/e2e/FR21.e2e-spec.ts
Normal file
55
zonemaster-gui/e2e/FR21.e2e-spec.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { test, expect } from './global-setup';
|
||||
import { goToHome, setLang, setupApiMocks } from './utils/app.utils';
|
||||
import type { Page } from '@playwright/test';
|
||||
|
||||
test.describe.serial('Zonemaster test FR21 - [Able to provide a summarized result of the test being run ' +
|
||||
'(possibility in different colours for error, warning, success etc.)]', () => {
|
||||
|
||||
let page: Page;
|
||||
|
||||
// Keep the same page between tests
|
||||
test.beforeAll(async ({ browser }) => {
|
||||
page = await browser.newPage();
|
||||
await setupApiMocks(page);
|
||||
await goToHome(page);
|
||||
await setLang(page, 'en');
|
||||
await page.waitForLoadState('networkidle');
|
||||
});
|
||||
|
||||
test('should display summary', async () => {
|
||||
await expect(page.locator('.zm-domain-test__progress-bar')).toHaveCount(0);
|
||||
await page.locator('input[name="domain"]').first().focus();
|
||||
|
||||
await page.keyboard.type('results.afNiC.Fr');
|
||||
await page.keyboard.press('Enter');
|
||||
|
||||
await expect(page.locator('.zm-result')).toBeVisible({ timeout: 10000 });
|
||||
|
||||
const messageCountBadges = page.locator('.zm-filter-toggle');
|
||||
const expectedLabels = ['All', 'Info', 'Notice', 'Warning', 'Error', 'Critical'];
|
||||
|
||||
await expect(messageCountBadges).toHaveCount(expectedLabels.length);
|
||||
|
||||
for (const [idx, label] of expectedLabels.entries()) {
|
||||
await expect(messageCountBadges.nth(idx)).toContainText(label);
|
||||
}
|
||||
});
|
||||
|
||||
test('should display number of each level', async () => {
|
||||
await expect(page.locator('.zm-filter-toggle__badge:not(:empty)')).toHaveCount(6);
|
||||
});
|
||||
|
||||
test('should display summary with good colors', async () => {
|
||||
const filterButtons = page.locator('.zm-filter-toggle input[type="checkbox"]');
|
||||
|
||||
for (const idx of [1, 2, 3, 4, 5]) {
|
||||
await filterButtons.nth(idx).click();
|
||||
}
|
||||
|
||||
// wait for .2 second (color transition)
|
||||
await page.waitForTimeout(200);
|
||||
|
||||
|
||||
expect(await page.screenshot()).toMatchSnapshot('results.png');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user