fix(web/test): MobileNavDrawer inert + integrations Save mocks Test first
MobileNavDrawer: Svelte 5 + jsdom binds `inert` as a property, not always
an attribute. Mirror the QueueDrawer.test.ts pattern that accepts either.
Integrations Save tests: Per commit bca8622 (Save runs Test first), the
two existing Save tests need to mock testLidarrConnection before clicking
Save — otherwise the Test step returns undefined, fails the ok check,
and putLidarrConfig is never reached. The newer 'Lidarr first-time
setup' suite already does this; just bringing the older two tests in
line. Also wrapped the assertions in waitFor since the put-config call
now resolves async after the test promise.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,11 @@ describe('MobileNavDrawer', () => {
|
||||
render(MobileNavDrawer);
|
||||
const aside = screen.getByLabelText('Main navigation');
|
||||
expect(aside.getAttribute('aria-hidden')).toBe('true');
|
||||
expect(aside.hasAttribute('inert')).toBe(true);
|
||||
// Svelte 5 + jsdom binds `inert` as a property, not always as an
|
||||
// attribute. Mirror the pattern used in QueueDrawer.test.ts.
|
||||
const inertProp = (aside as unknown as { inert?: boolean }).inert === true;
|
||||
const inertAttr = aside.hasAttribute('inert');
|
||||
expect(inertProp || inertAttr).toBe(true);
|
||||
});
|
||||
|
||||
it('flips to visible when mobileNav opens', async () => {
|
||||
|
||||
Reference in New Issue
Block a user