Skip to content

Commit 557e7b3

Browse files
author
DevBot
committed
style(ui-dogfood): apply repo-root deno fmt/lint to fixture e2e (#1226)
The fixture-local deno.json excludes e2e/ from fixture-rooted invocations (same pattern as the request-time fixture), but repo-root deno fmt/lint walk the whole tree under root config. The specs were only ever checked fixture-locally, so they drifted; run 33808083057 caught it.
1 parent 6054cc9 commit 557e7b3

7 files changed

Lines changed: 17 additions & 38 deletions

File tree

packages/adapter-vite/__fixtures__/ui-dogfood/e2e/helpers.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
* page.evaluate. The walker functions come from tools/lib/shadow-walker.ts
77
* (single-sourced with the www e2e suite) and serialize into page context.
88
*/
9-
import { deepQueryAllInPage, deepQueryFirstInPage } from '../../../../../tools/lib/shadow-walker.ts';
9+
import {
10+
deepQueryAllInPage,
11+
deepQueryFirstInPage,
12+
} from '../../../../../tools/lib/shadow-walker.ts';
1013

1114
/** Raw source of the shadow-piercing first-match walker, for embedding. */
1215
export const deepQueryFirstFn = deepQueryFirstInPage.toString();

packages/adapter-vite/__fixtures__/ui-dogfood/e2e/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* deno run -A server.ts --port 4190 --dir ../dist
1111
*/
1212

13-
import { join, resolve } from 'node:path';
13+
import { resolve } from 'node:path';
1414
import { dispatchRequest } from '../../../src/internal/static-serve.ts';
1515

1616
const args: Record<string, string> = {};

packages/adapter-vite/__fixtures__/ui-dogfood/e2e/ui-boundaries.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ import { deepFirstExpr, deepQueryFirstFn } from './helpers.ts';
2424
const PORT = process.env.UI_DOGFOOD_E2E_PORT ?? '4197';
2525

2626
test.describe('root boundaries', () => {
27-
test('open ui primitive exposes its shadow root; light and closed roots hold their contracts', async ({
28-
page,
29-
}) => {
27+
test('open ui primitive exposes its shadow root; light and closed roots hold their contracts', async ({ page }) => {
3028
await page.goto('/boundaries');
3129
await page.waitForFunction(() => customElements.get('open-badge') !== undefined);
3230

packages/adapter-vite/__fixtures__/ui-dogfood/e2e/ui-dialog.spec.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ test.describe('open-dialog', () => {
6969
await waitForDialogs(page);
7070
});
7171

72-
test('SSR-rendered open attribute becomes a top-layer modal at hydration (#1030)', async ({
73-
page,
74-
}) => {
72+
test('SSR-rendered open attribute becomes a top-layer modal at hydration (#1030)', async ({ page }) => {
7573
const host = page.locator('#ssr-open-dialog');
7674
await expect
7775
.poll(() =>
@@ -99,9 +97,7 @@ test.describe('open-dialog', () => {
9997
expect(closed).toEqual({ stateClosed: true, modal: false, open: false });
10098
});
10199

102-
test('trigger opens a modal dialog; Tab stays contained; Escape closes and returns focus', async ({
103-
page,
104-
}) => {
100+
test('trigger opens a modal dialog; Tab stays contained; Escape closes and returns focus', async ({ page }) => {
105101
await closeSsrOpenDialog(page);
106102
const trigger = page.locator('#dialog-trigger');
107103
await trigger.focus();
@@ -142,9 +138,7 @@ test.describe('open-dialog', () => {
142138
expect(await page.evaluate(deepActiveDescriptor)).toBe('dialog-trigger');
143139
});
144140

145-
test('close affordance closes once and dispatches exactly one open-dialog-close', async ({
146-
page,
147-
}) => {
141+
test('close affordance closes once and dispatches exactly one open-dialog-close', async ({ page }) => {
148142
await closeSsrOpenDialog(page);
149143
await page.evaluate(() => {
150144
(window as unknown as { __closeEvents: number }).__closeEvents = 0;

packages/adapter-vite/__fixtures__/ui-dogfood/e2e/ui-form.spec.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ test.describe('open-input / open-button form participation', () => {
3939
await waitForForm(page);
4040
});
4141

42-
test('FormData carries open-input values, including the activation-time initial value', async ({
43-
page,
44-
}) => {
42+
test('FormData carries open-input values, including the activation-time initial value', async ({ page }) => {
4543
// syncFormValue ran at activation: the SSR'd initial value participates
4644
// without any typing.
4745
expect(await page.evaluate(formDataJsonExpr)).toEqual({
@@ -90,9 +88,7 @@ test.describe('open-input / open-button form participation', () => {
9088
expect(await page.evaluate(formDataJsonExpr)).toEqual({ username: '', email: '' });
9189
});
9290

93-
test('disabled fieldset mirrors through formDisabledCallback and drops out of FormData', async ({
94-
page,
95-
}) => {
91+
test('disabled fieldset mirrors through formDisabledCallback and drops out of FormData', async ({ page }) => {
9692
const locked = await page.evaluate(`(() => {
9793
const host = ${deepFirstExpr('#locked')};
9894
const inner = host?.shadowRoot?.querySelector('input');
@@ -110,16 +106,12 @@ test.describe('open-input / open-button form participation', () => {
110106
// property — an own `disabled` attribute would lock the state).
111107
await page.evaluate(`${deepFirstExpr('#locked-group')}?.removeAttribute('disabled')`);
112108
await expect
113-
.poll(() =>
114-
page.evaluate(`${deepFirstExpr('#locked')}?.matches(':state(disabled)') ?? true`)
115-
)
109+
.poll(() => page.evaluate(`${deepFirstExpr('#locked')}?.matches(':state(disabled)') ?? true`))
116110
.toBe(false);
117111
expect(await page.evaluate(formDataJsonExpr)).toHaveProperty('locked', '');
118112
});
119113

120-
test('delegatesFocus lands host focus on the inner control; open-input fires per input', async ({
121-
page,
122-
}) => {
114+
test('delegatesFocus lands host focus on the inner control; open-input fires per input', async ({ page }) => {
123115
await page.evaluate(`(() => {
124116
const w = window;
125117
w.__inputEvents = [];

packages/adapter-vite/__fixtures__/ui-dogfood/e2e/ui-ssr.spec.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ test.describe('ui dogfood SSR/DSD output', () => {
3838
expect(html).toContain('<div slot="panel">Gamma panel content</div>');
3939
});
4040

41-
test('/dropdown emits open-dropdown DSD with a native popover content region', async ({
42-
request,
43-
}) => {
41+
test('/dropdown emits open-dropdown DSD with a native popover content region', async ({ request }) => {
4442
const response = await request.get('/dropdown');
4543
expect(response.ok()).toBe(true);
4644
const html = await response.text();
@@ -49,9 +47,7 @@ test.describe('ui dogfood SSR/DSD output', () => {
4947
expect(html).toContain('<button slot="trigger" id="dropdown-trigger" type="button">');
5048
});
5149

52-
test('/form emits open-input DSD with the form contract markup and the island entry', async ({
53-
request,
54-
}) => {
50+
test('/form emits open-input DSD with the form contract markup and the island entry', async ({ request }) => {
5551
const response = await request.get('/form');
5652
expect(response.ok()).toBe(true);
5753
const html = await response.text();

packages/adapter-vite/__fixtures__/ui-dogfood/e2e/ui-tabs.spec.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ test.describe('open-tabs', () => {
9292
await expect(page.locator('#main-tabs [slot="panel"]', { hasText: 'Alpha' })).toBeHidden();
9393
});
9494

95-
test('keyboard: ArrowRight/ArrowLeft wrap, Home/End jump, focus follows selection', async ({
96-
page,
97-
}) => {
95+
test('keyboard: ArrowRight/ArrowLeft wrap, Home/End jump, focus follows selection', async ({ page }) => {
9896
await page.locator('#main-tabs [slot="tab"]', { hasText: 'Alpha' }).focus();
9997
await page.keyboard.press('ArrowRight');
10098
expect((await page.evaluate(readTabStateExpr))?.selected).toEqual(['false', 'true', 'false']);
@@ -115,9 +113,7 @@ test.describe('open-tabs', () => {
115113
expect(await page.evaluate(deepActiveTabIs, 2)).toBe(true);
116114
});
117115

118-
test('reconnect/dispose: effects switch off while detached and re-sync on reconnect', async ({
119-
page,
120-
}) => {
116+
test('reconnect/dispose: effects switch off while detached and re-sync on reconnect', async ({ page }) => {
121117
// Detach, write the selection while the decorate effect is disposed, and
122118
// observe the ARIA wiring stay stale; reconnect must re-sync exactly once.
123119
const stale = await page.evaluate(`(() => {

0 commit comments

Comments
 (0)