Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions tests/e2e/spec-coverage/suite-wizard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,17 @@ async function fillDetails(page: Page): Promise<void> {
/** Attach one seeded module through the real NcSelect multi-picker. */
async function attachApplication(page: Page, name: string): Promise<void> {
const w = wizard(page)
const picker = w.locator('.suite-wizard-step2 .vs__search').first()
// `.vs__search` no longer identifies the input on its own: the component
// library now also puts that class on a wrapper, so `.first()` resolved to
// <div class="input-field input-field--label-outside vs__search">
// and `fill()` refused it with "Element is not an <input>, <textarea>,
// <select> or [contenteditable]". Demand an actual input, whether the class
// sits on it or on an ancestor, so this survives the markup moving again.
const picker = w
.locator(
'.suite-wizard-step2 input.vs__search, .suite-wizard-step2 .vs__search input',
)
.first()
await picker.click()
await picker.fill(name)
// The option list is teleported to body by vue-select, so it is queried on
Expand Down Expand Up @@ -176,7 +186,17 @@ test('suite wizard: the applications step offers existing modules and no create
// The picker offers a module that genuinely exists in the register — the
// one this run seeded. If the step invented its own options, or fetched
// nothing, this fails.
const picker = w.locator('.suite-wizard-step2 .vs__search').first()
// `.vs__search` no longer identifies the input on its own: the component
// library now also puts that class on a wrapper, so `.first()` resolved to
// <div class="input-field input-field--label-outside vs__search">
// and `fill()` refused it with "Element is not an <input>, <textarea>,
// <select> or [contenteditable]". Demand an actual input, whether the class
// sits on it or on an ancestor, so this survives the markup moving again.
const picker = w
.locator(
'.suite-wizard-step2 input.vs__search, .suite-wizard-step2 .vs__search input',
)
.first()
await picker.click()
await picker.fill(APP_A)
await expect(
Expand Down
Loading