refactor: don't call created if it doesn't exist #5796
Annotations
2 errors and 1 notice
Run tests:
e2e/models/tags-input.model.ts#L70
1) tags-input.e2e.ts:26:7 › tags-input › deletes tag with backspace when input value is empty ────
Error: Timed out 10000ms waiting for expect(locator).toHaveAttribute(expected)
Locator: locator('[data-testid=svelte-tag]')
Expected string: ""
Received string: serializes to the same string
Call log:
- expect.toHaveAttribute with timeout 10000ms
- waiting for locator('[data-testid=svelte-tag]')
14 × locator resolved to <div dir="ltr" data-value="Svelte" data-scope="tags-input" data-testid="svelte-tag" data-part="item-preview" id="tags-input::R6m::tag:Svelte:2">…</div>
- unexpected value "null"
at models/tags-input.model.ts:70
68 |
69 | async seeTagIsHighlighted(value: string) {
> 70 | await expect(this.getTag(value)).toHaveAttribute("data-highlighted", "")
| ^
71 | }
72 |
73 | async seeTag(value: string) {
at TagsInputModel.seeTagIsHighlighted (/home/runner/work/zag/zag/e2e/models/tags-input.model.ts:70:38)
at /home/runner/work/zag/zag/e2e/tags-input.e2e.ts:30:13
|
Run tests:
e2e/models/tags-input.model.ts#L90
2) tags-input.e2e.ts:117:7 › tags-input › edit tag with enter key ────────────────────────────────
Error: Timed out 10000ms waiting for expect(locator).toBeFocused()
Locator: locator('[data-testid=svelte-input]')
Expected: focused
Received: inactive
Call log:
- expect.toBeFocused with timeout 10000ms
- waiting for locator('[data-testid=svelte-input]')
14 × locator resolved to <input value="" dir="ltr" hidden="" tabindex="-1" aria-hidden="true" data-part="item-input" data-scope="tags-input" data-testid="svelte-input" id="tags-input::R6m::tag:Svelte:2:input" aria-label="Editing tag Svelte. Press enter to save or escape to cancel."/>
- unexpected value "not focused"
at models/tags-input.model.ts:90
88 |
89 | async seeTagInputIsFocused(value: string) {
> 90 | await expect(this.getTagInput(value)).toBeFocused()
| ^
91 | }
92 |
93 | async dontSeeTagInput(value: string) {
at TagsInputModel.seeTagInputIsFocused (/home/runner/work/zag/zag/e2e/models/tags-input.model.ts:90:43)
at /home/runner/work/zag/zag/e2e/tags-input.e2e.ts:124:13
|
Run tests
2 flaky
tags-input.e2e.ts:26:7 › tags-input › deletes tag with backspace when input value is empty ─────
tags-input.e2e.ts:117:7 › tags-input › edit tag with enter key ─────────────────────────────────
11 skipped
16 passed (51.2s)
|
Loading