Skip to content

Commit c139832

Browse files
committed
chore: apply hook-driven e2e formatting updates
Include biome formatting changes automatically generated by pre-commit so the branch state matches hook expectations. Made-with: Cursor
1 parent d2e9eba commit c139832

5 files changed

Lines changed: 25 additions & 11 deletions

File tree

apps/element-demo/test/e2e/math-algebra-quadratic.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ test.describe('Math Algebra Quadratic Demo - Multiple Choice Element', () => {
238238
const incorrectIndicator = page.locator('.incorrect, [data-correct="false"]');
239239
const hasIncorrectIndicator = (await incorrectIndicator.count()) > 0;
240240
const hasScoringSignal =
241-
(await page.locator('[data-testid="score-value"], [data-testid="scoring-panel"]').count()) > 0;
241+
(await page.locator('[data-testid="score-value"], [data-testid="scoring-panel"]').count()) >
242+
0;
242243
expect(hasIncorrectIndicator || hasScoringSignal || score !== null).toBeTruthy();
243244
});
244245

@@ -279,7 +280,8 @@ test.describe('Math Algebra Quadratic Demo - Multiple Choice Element', () => {
279280
const correctIndicator = page.locator('.correct, [data-correct="true"]');
280281
const hasCorrectIndicator = (await correctIndicator.count()) > 0;
281282
const hasScoringSignal =
282-
(await page.locator('[data-testid="score-value"], [data-testid="scoring-panel"]').count()) > 0;
283+
(await page.locator('[data-testid="score-value"], [data-testid="scoring-panel"]').count()) >
284+
0;
283285
expect(hasCorrectIndicator || hasScoringSignal || score !== null).toBeTruthy();
284286
});
285287

apps/element-demo/test/e2e/phase1-spatial-dnd.spec.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,7 @@ async function runSpatialInteraction(page: Page, element: string, root: Locator)
109109
}
110110
}
111111

112-
if (
113-
element === 'graphing' ||
114-
element === 'graphing-solution-set'
115-
) {
112+
if (element === 'graphing' || element === 'graphing-solution-set') {
116113
const toolbarButton = root
117114
.locator(
118115
'button.MuiButtonBase-root, button[aria-label*="tool" i], button[aria-label*="line" i], button[aria-label*="point" i]'

apps/element-demo/test/e2e/phase3-text-and-hardening.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ import {
1010
waitForSessionMutation,
1111
} from './test-helpers';
1212

13-
async function selectMultipleChoiceValue(root: ReturnType<typeof deliveryContainer>, value: string) {
13+
async function selectMultipleChoiceValue(
14+
root: ReturnType<typeof deliveryContainer>,
15+
value: string
16+
) {
1417
const label = root.locator(`label[data-value="${value}"]`).first();
1518
if (await label.isVisible().catch(() => false)) {
1619
await label.click({ force: true });

apps/element-demo/test/e2e/simple-cloze-svelte.spec.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,16 @@ test.describe('Simple Cloze (Svelte 5) - Author and Delivery', () => {
3535
await expect(page).toHaveURL(/\/author/);
3636
const configureRoot = page.locator('.author-view .configure-container').first();
3737
await expect(configureRoot).toBeVisible();
38-
await expect(configureRoot.locator('input, textarea, [contenteditable="true"]').first()).toBeVisible();
38+
await expect(
39+
configureRoot.locator('input, textarea, [contenteditable="true"]').first()
40+
).toBeVisible();
3941
});
4042

4143
test('3. EditableHtml toolbar buttons work correctly', async ({ page }) => {
4244
await switchTab(page, 'author');
43-
const editable = page.locator('.author-view [contenteditable="true"], .author-view textarea').first();
45+
const editable = page
46+
.locator('.author-view [contenteditable="true"], .author-view textarea')
47+
.first();
4448
await expect(editable).toBeVisible();
4549
await editable.click();
4650
await page.keyboard.type(`author-edit-${Date.now()}`);
@@ -74,7 +78,9 @@ test.describe('Simple Cloze (Svelte 5) - Author and Delivery', () => {
7478
await switchTab(page, 'author');
7579
await page.waitForTimeout(500);
7680
await switchTab(page, 'deliver');
77-
const inputAfter = page.locator(`${ELEMENT_NAME} input[type="text"], ${ELEMENT_NAME} input`).first();
81+
const inputAfter = page
82+
.locator(`${ELEMENT_NAME} input[type="text"], ${ELEMENT_NAME} input`)
83+
.first();
7884
expect(await inputAfter.inputValue()).toBeTruthy();
7985
const after = await getSessionState(page);
8086
expect(JSON.stringify(after ?? {})).toBe(JSON.stringify(before ?? {}));

apps/element-demo/test/e2e/test-helpers.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,13 @@ export async function waitForElementReady(page: Page, elementName: string) {
195195
);
196196

197197
for (const candidate of candidates) {
198-
if (await page.locator(candidate).first().isVisible().catch(() => false)) {
198+
if (
199+
await page
200+
.locator(candidate)
201+
.first()
202+
.isVisible()
203+
.catch(() => false)
204+
) {
199205
return;
200206
}
201207
}

0 commit comments

Comments
 (0)