Skip to content

Commit bae40da

Browse files
author
Tim Berners-Lee
committed
delete buttons were missing from autocomplete tests
1 parent 6c27acd commit bae40da

3 files changed

Lines changed: 72 additions & 5 deletions

File tree

package-lock.json

Lines changed: 29 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/widgets/buttons.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ export function faviconOrDefault (dom: HTMLDocument, x: NamedNode) {
441441
*/
442442
export function deleteButtonWithCheck (
443443
dom: HTMLDocument,
444-
container?: HTMLElement, // Used to interfere with style of this
444+
container: HTMLElement | null, // Used to interfere with style of this
445445
noun: string,
446446
deleteFunction: () => any
447447
) {

test/unit/widgets/forms/autocomplete/__snapshots__/autocomplete.test.ts.snap

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,20 @@ exports[`autocompleteField clicking on row of greenn table then accecpt button s
9595
title="Edit"
9696
/>
9797
</button>
98-
<div />
98+
<div>
99+
<div
100+
class="hoverControl"
101+
data-testid="delete-button"
102+
style="margin: 0.3em; border-radius: 0;"
103+
>
104+
<img
105+
class="hoverControlHide"
106+
src="https://solid.github.io/solid-ui/src/icons/noun_2188_red.svg"
107+
style="margin: 0.2em; width: 1em; height:1em"
108+
title="Remove this Q6881511"
109+
/>
110+
</div>
111+
</div>
99112
</div>
100113
</div>
101114
</div>
@@ -176,7 +189,20 @@ exports[`autocompleteField creates a autocomplete field 1`] = `
176189
title="Edit"
177190
/>
178191
</button>
179-
<div />
192+
<div>
193+
<div
194+
class="hoverControl"
195+
data-testid="delete-button"
196+
style="margin: 0.3em; border-radius: 0;"
197+
>
198+
<img
199+
class="hoverControlHide"
200+
src="https://solid.github.io/solid-ui/src/icons/noun_2188_red.svg"
201+
style="margin: 0.2em; width: 1em; height:1em"
202+
title="Remove this Q6881511"
203+
/>
204+
</div>
205+
</div>
180206
</div>
181207
</div>
182208
</div>
@@ -292,7 +318,20 @@ exports[`autocompleteField typing more search term till unique selects the whole
292318
title="Edit"
293319
/>
294320
</button>
295-
<div />
321+
<div>
322+
<div
323+
class="hoverControl"
324+
data-testid="delete-button"
325+
style="margin: 0.3em; border-radius: 0;"
326+
>
327+
<img
328+
class="hoverControlHide"
329+
src="https://solid.github.io/solid-ui/src/icons/noun_2188_red.svg"
330+
style="margin: 0.2em; width: 1em; height:1em"
331+
title="Remove this Q6881511"
332+
/>
333+
</div>
334+
</div>
296335
</div>
297336
</div>
298337
</div>

0 commit comments

Comments
 (0)