Compare commits
1 Commits
9b1d4de426
...
0d95e1304e
| Author | SHA1 | Date | |
|---|---|---|---|
| 0d95e1304e |
@ -58,10 +58,16 @@ test('mode hidden: rows disappear, notes mark the hiding, a11y clean', async ({
|
||||
// hidden — the row stays visible with its marking.
|
||||
await expect(page.locator('#vs-nfd-mark-feeds\\.enabled')).toBeVisible();
|
||||
|
||||
// api.enabled/mcp.enabled default to false = compliant: their rows
|
||||
// disappear (2 of 4 master-switch rows remain) and the section carries
|
||||
// the accessible policy note.
|
||||
await expect(page.locator('.api-opt-in__label')).toHaveCount(2);
|
||||
// Master switches: compliant (false) rows disappear, violating (true)
|
||||
// rows stay — derive the expectation from the actual instance settings,
|
||||
// the seed state differs between local and CI databases.
|
||||
const settings = (await (
|
||||
await context.request.get(`${BASE_URL}/api/v1/admin/settings`)
|
||||
).json()) as Record<string, boolean>;
|
||||
const masterKeys = ['api.enabled', 'mcp.enabled', 'feeds.enabled', 'plugins.enabled'] as const;
|
||||
const visible = masterKeys.filter((key) => settings[key] === true).length;
|
||||
expect(visible).toBeLessThan(masterKeys.length); // at least one row is hidden
|
||||
await expect(page.locator('.api-opt-in__label')).toHaveCount(visible);
|
||||
await expect(page.locator('.vs-nfd-hidden-note').first()).toBeVisible();
|
||||
|
||||
// Value-listed control: the compliant registration mode keeps only its
|
||||
|
||||
Loading…
Reference in New Issue
Block a user