fix: useSyncExternalStore backward compatibility #283
Annotations
10 errors, 2 warnings, and 1 notice
Run pnpm test || exit 1:
test/basic.test.ts#L26
1) [webkit] › basic.test.ts:23:7 › basic behavior › item onSelect is called on click ─────────────
Error: expect(received).toEqual(expected) // deep equality
Expected: "Item selected"
Received: "[HMR] connected"
24 | const item = page.locator(`[cmdk-item][data-value="Item"]`)
25 | const [message] = await Promise.all([page.waitForEvent('console'), item.click()])
> 26 | expect(message.text()).toEqual('Item selected')
| ^
27 | })
28 |
29 | test('first item is selected by default', async ({ page }) => {
at /home/runner/work/cmdk/cmdk/test/basic.test.ts:26:28
|
Run pnpm test || exit 1:
test/basic.test.ts#L1
2) [webkit] › basic.test.ts:34:7 › basic behavior › first item is selected when search changes ───
Test timeout of 5000ms exceeded.
|
Run pnpm test || exit 1:
test/basic.test.ts#L38
2) [webkit] › basic.test.ts:34:7 › basic behavior › first item is selected when search changes ───
Error: expect(locator).toHaveText(expected)
Locator: locator('[cmdk-item][aria-selected="true"]')
Expected string: "Value"
Received string: "Item"
Call log:
- expect.toHaveText with timeout 5000ms
- waiting for locator('[cmdk-item][aria-selected="true"]')
- locator resolved to <div class="item" cmdk-item="" role="option" id="radi…>Item</div>
- unexpected value "Item"
- locator resolved to <div class="item" cmdk-item="" role="option" id="radi…>Item</div>
- unexpected value "Item"
- locator resolved to <div class="item" cmdk-item="" role="option" id="radi…>Item</div>
- unexpected value "Item"
- locator resolved to <div class="item" cmdk-item="" role="option" id="radi…>Item</div>
- unexpected value "Item"
- locator resolved to <div class="item" cmdk-item="" role="option" id="radi…>Item</div>
- unexpected value "Item"
- locator resolved to <div class="item" cmdk-item="" role="option" id="radi…>Item</div>
- unexpected value "Item"
36 | await input.type('x')
37 | const selected = page.locator(`[cmdk-item][aria-selected="true"]`)
> 38 | await expect(selected).toHaveText('Value')
| ^
39 | })
40 |
41 | test('items filter when searching', async ({ page }) => {
at /home/runner/work/cmdk/cmdk/test/basic.test.ts:38:28
|
Run pnpm test || exit 1:
test/basic.test.ts#L1
3) [webkit] › basic.test.ts:59:7 › basic behavior › empty component renders when there are no results
Test timeout of 5000ms exceeded.
|
Run pnpm test || exit 1:
test/basic.test.ts#L62
3) [webkit] › basic.test.ts:59:7 › basic behavior › empty component renders when there are no results
Error: expect(locator).toHaveCount(expected)
Locator: locator('[cmdk-item]')
Expected: 0
Received: 2
Call log:
- expect.toHaveCount with timeout 5000ms
- waiting for locator('[cmdk-item]')
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
60 | const input = page.locator('[cmdk-input]')
61 | await input.type('z')
> 62 | await expect(page.locator(`[cmdk-item]`)).toHaveCount(0)
| ^
63 | await expect(page.locator(`[cmdk-empty]`)).toHaveText('No results.')
64 | })
65 |
at /home/runner/work/cmdk/cmdk/test/basic.test.ts:62:47
|
Run pnpm test || exit 1:
test/item.test.ts#L1
4) [webkit] › item.test.ts:15:7 › item › mounted item does not match search ──────────────────────
Test timeout of 5000ms exceeded.
|
Run pnpm test || exit 1:
test/item.test.ts#L17
4) [webkit] › item.test.ts:15:7 › item › mounted item does not match search ──────────────────────
Error: expect(locator).toHaveCount(expected)
Locator: locator('[cmdk-item]')
Expected: 0
Received: 1
Call log:
- expect.toHaveCount with timeout 5000ms
- waiting for locator('[cmdk-item]')
- locator resolved to 1 element
- unexpected value "1"
- locator resolved to 1 element
- unexpected value "1"
- locator resolved to 1 element
- unexpected value "1"
- locator resolved to 1 element
- unexpected value "1"
- locator resolved to 1 element
- unexpected value "1"
- locator resolved to 1 element
- unexpected value "1"
- locator resolved to 1 element
- unexpected value "1"
- locator resolved to 1 element
- unexpected value "1"
15 | test('mounted item does not match search', async ({ page }) => {
16 | await page.locator(`[cmdk-input]`).type('z')
> 17 | await expect(page.locator(`[cmdk-item]`)).toHaveCount(0)
| ^
18 | await page.locator(`data-testid=mount`).click()
19 | await expect(page.locator(`[cmdk-item]`)).toHaveCount(0)
20 | })
at /home/runner/work/cmdk/cmdk/test/item.test.ts:17:47
|
Run pnpm test || exit 1:
test/item.test.ts#L1
5) [webkit] › item.test.ts:63:7 › item advanced › re-rendering re-matches implicit textContent value
Test timeout of 5000ms exceeded.
|
Run pnpm test || exit 1:
test/item.test.ts#L68
5) [webkit] › item.test.ts:63:7 › item advanced › re-rendering re-matches implicit textContent value
Error: expect(locator).toHaveCount(expected)
Locator: locator('[cmdk-item]')
Expected: 0
Received: 2
Call log:
- expect.toHaveCount with timeout 5000ms
- waiting for locator('[cmdk-item]')
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
- locator resolved to 2 elements
- unexpected value "2"
66 | const button = page.locator(`data-testid=increment`)
67 | await button.click()
> 68 | await expect(page.locator(`[cmdk-item]`)).toHaveCount(0)
| ^
69 | await button.click()
70 | await expect(page.locator(`[cmdk-item]`)).toHaveCount(2)
71 | })
at /home/runner/work/cmdk/cmdk/test/item.test.ts:68:47
|
Run pnpm test || exit 1:
test/props.test.ts#L14
6) [webkit] › props.test.ts:11:7 › props › results match against custom filter ───────────────────
Error: expect.toHaveAttribute: Error: strict mode violation: locator('[cmdk-item]') resolved to 2 elements:
1) <div cmdk-item="" role="option" id="radix-:Rqqm:" ari…>ant</div> aka getByLabel('Suggestions').getByText('ant', { exact: true })
2) <div cmdk-item="" role="option" id="radix-:R1aqm:" ar…>anteater</div> aka getByText('anteater')
Call log:
- expect.toHaveAttribute with timeout 5000ms
- waiting for locator('[cmdk-item]')
12 | await page.goto('/props?customFilter=true')
13 | await page.locator(`[cmdk-input]`).type(`ant`)
> 14 | await expect(page.locator(`[cmdk-item]`)).toHaveAttribute('data-value', 'ant')
| ^
15 | })
16 |
17 | test('controlled value', async ({ page }) => {
at /home/runner/work/cmdk/cmdk/test/props.test.ts:14:47
|
Run pnpm test || exit 1:
[webkit] › basic.test.ts#L1
[webkit] › basic.test.ts took 21.4s
|
Run pnpm test || exit 1:
[webkit] › item.test.ts#L1
[webkit] › item.test.ts took 18.2s
|
Run pnpm test || exit 1
6 flaky
[webkit] › basic.test.ts:23:7 › basic behavior › item onSelect is called on click ──────────────
[webkit] › basic.test.ts:34:7 › basic behavior › first item is selected when search changes ────
[webkit] › basic.test.ts:59:7 › basic behavior › empty component renders when there are no results
[webkit] › item.test.ts:15:7 › item › mounted item does not match search ───────────────────────
[webkit] › item.test.ts:63:7 › item advanced › re-rendering re-matches implicit textContent value
[webkit] › props.test.ts:11:7 › props › results match against custom filter ────────────────────
35 passed (42.1s)
|
Loading