Add Prettier and ESLint tooling (Refs #77)
This commit is contained in:
@@ -11,14 +11,18 @@ it('connects the search field to a labelled option list and its selected result'
|
||||
expect(body).toContain('aria-expanded="true"');
|
||||
const list = /aria-controls="([^"]+)"/.exec(body)?.[1];
|
||||
const active = /aria-activedescendant="([^"]+)"/.exec(body)?.[1];
|
||||
expect(list).toBeTruthy(); expect(active).toBeTruthy();
|
||||
expect(list).toBeTruthy();
|
||||
expect(active).toBeTruthy();
|
||||
expect(body).toContain(`id="${list}" role="listbox"`);
|
||||
expect(body).toContain(`id="${active}" role="option" tabindex="-1" aria-selected="true"`);
|
||||
expect(body).toContain('Create server'); expect(body).not.toContain('Add host');
|
||||
expect(body).toContain('Create server');
|
||||
expect(body).not.toContain('Add host');
|
||||
});
|
||||
|
||||
it('keeps the navigation palette useful for viewers without offering write actions', () => {
|
||||
const body = render(CommandPalette, { props: { open: true, role: 'viewer' } }).body;
|
||||
expect(body).toContain('Campaigns'); expect(body).toContain('Leaderboard');
|
||||
expect(body).not.toContain('Create server'); expect(body).not.toContain('Add host');
|
||||
expect(body).toContain('Campaigns');
|
||||
expect(body).toContain('Leaderboard');
|
||||
expect(body).not.toContain('Create server');
|
||||
expect(body).not.toContain('Add host');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user