Files
CartoLite-Server/web/e2e/mapControls.ts
T
n30nex abfcebb5e8 Refine map layers and cross-view UI usability (#16)
* Refine layer controls and cross-view UI accessibility

* Complete cumulative labels and landscape layer usability checks

* Keep inactive layer labels readable on light scenes

* Check cumulative observation wording in route inspection
2026-09-13 10:09:11 -04:00

12 lines
602 B
TypeScript

import type { Page } from '@playwright/test';
export async function openMapOptions(page: Page): Promise<void> {
const summary = page.locator('#layers-summary');
if (await summary.count() && await summary.getAttribute('aria-expanded') !== 'true') await summary.click();
// Interaction tests need the complete options; the layer UX test checks the collapsed default.
for (const id of ['terrain-options', 'map-appearance']) {
const group = page.locator('#' + id);
if (await group.count() && await group.getAttribute('open') === null) await group.locator('summary').first().click();
}
}