mirror of
https://github.com/n30nex/CartoLite-Server.git
synced 2026-10-17 09:19:55 +00:00
12 lines
602 B
TypeScript
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();
|
|
}
|
|
}
|