fix(tests): use native element clicks in layout dropdown spec #563
Reference in New Issue
Block a user
Delete Branch "fix/layout-dropdown-native-clicks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
locator.click()calls don't reliably trigger Svelte 5onclickhandlers — documented and fixed in commit0c765d81across 13 other specs; the layout dropdown tests were missed in that passawait page.getByRole('button', { name: /MM/ }).click()calls with((await locator.element()) as HTMLElement).click()(native DOM click)userEvent.keyboard('{Escape}')withbtnEl.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }))dispatched on the button so it bubbles to the parent div'sonkeydownhandleruserEventimportTest Plan
Layout – user dropdown > profile link points to /profileno longer fails intermittentlylayout.svelte.spec.tspass consistently