feat: support custom trigger keys #232
Open
Annotations
8 errors, 5 warnings, and 1 notice
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
|
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.
|
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
|
test/item.test.ts#L1
3) [webkit] › item.test.ts:8:7 › item › mounted item matches search ──────────────────────────────
Test timeout of 5000ms exceeded.
|
test/item.test.ts#L10
3) [webkit] › item.test.ts:8:7 › item › mounted item matches 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"
8 | test('mounted item matches search', async ({ page }) => {
9 | await page.locator(`[cmdk-input]`).type('b')
> 10 | await expect(page.locator(`[cmdk-item]`)).toHaveCount(0)
| ^
11 | await page.locator(`data-testid=mount`).click()
12 | await expect(page.locator(`[cmdk-item]`)).toHaveText('B')
13 | })
at /home/runner/work/cmdk/cmdk/test/item.test.ts:10:47
|
test/keybind.test.ts#L1
4) [webkit] › keybind.test.ts:110:7 › no-vim keybinds › ctrl j/k does nothing ────────────────────
Test timeout of 5000ms exceeded.
|
test/keybind.test.ts#L113
4) [webkit] › keybind.test.ts:110:7 › no-vim keybinds › ctrl j/k does nothing ────────────────────
Error: expect(locator).toHaveAttribute(expected)
Locator: locator('[cmdk-item][aria-selected="true"]')
Expected string: "first"
Received string: "A"
Call log:
- expect.toHaveAttribute with timeout 5000ms
- waiting for locator('[cmdk-item][aria-selected="true"]')
- locator resolved to <div cmdk-item="" role="option" data-value="A" id="ra…>A</div>
- unexpected value "A"
- locator resolved to <div cmdk-item="" role="option" data-value="A" id="ra…>A</div>
- unexpected value "A"
- locator resolved to <div cmdk-item="" role="option" data-value="A" id="ra…>A</div>
- unexpected value "A"
- locator resolved to <div cmdk-item="" role="option" data-value="A" id="ra…>A</div>
- unexpected value "A"
- locator resolved to <div cmdk-item="" role="option" data-value="A" id="ra…>A</div>
- unexpected value "A"
- locator resolved to <div cmdk-item="" role="option" data-value="A" id="ra…>A</div>
- unexpected value "A"
- locator resolved to <div cmdk-item="" role="option" data-value="A" id="ra…>A</div>
- unexpected value "A"
- locator resolved to <div cmdk-item="" role="option" data-value="A" id="ra…>A</div>
- unexpected value "A"
111 | await expect(page.locator(`[cmdk-item][aria-selected="true"]`)).toHaveAttribute('data-value', 'first')
112 | await page.locator(`[cmdk-input]`).press('Control+j')
> 113 | await expect(page.locator(`[cmdk-item][aria-selected="true"]`)).toHaveAttribute('data-value', 'first')
| ^
114 | await page.locator(`[cmdk-input]`).press('Control+k')
115 | await expect(page.locator(`[cmdk-item][aria-selected="true"]`)).toHaveAttribute('data-value', 'first')
116 | })
at /home/runner/work/cmdk/cmdk/test/keybind.test.ts:113:69
|
test/props.test.ts#L14
5) [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" data-value="ant" id="…>ant</div> aka getByRole('option', { name: 'ant', exact: true })
2) <div cmdk-item="" role="option" id="radix-:R1aqm:" ar…>anteater</div> aka getByRole('option', { name: '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
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, pnpm/action-setup@v2, actions/setup-node@v3, actions/upload-artifact@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/upload-artifact@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
[webkit] › basic.test.ts#L1
[webkit] › basic.test.ts took 16.1s
|
[webkit] › keybind.test.ts#L1
[webkit] › keybind.test.ts took 15.4s
|
The following artifacts were uploaded using a version of actions/upload-artifact that is scheduled for deprecation: "playwright-report".
Please update your workflow to use v4 of the artifact actions.
Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
|
5 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] › item.test.ts:8:7 › item › mounted item matches search ───────────────────────────────
[webkit] › keybind.test.ts:110:7 › no-vim keybinds › ctrl j/k does nothing ─────────────────────
[webkit] › props.test.ts:11:7 › props › results match against custom filter ────────────────────
36 passed (42.2s)
|
This job succeeded
Loading