fix(ui): align semantic headings contrast and Settings panels
This commit is contained in:
@@ -102,6 +102,22 @@ afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
test('each selected Settings section has a named panel linked to its tab and remains selectable on phones', async () => {
|
||||
renderView();
|
||||
await screen.findByText(/AI privacy/i);
|
||||
const tabs = screen.getAllByRole('tab');
|
||||
for (const tab of tabs) {
|
||||
await act(async () => { fireEvent.click(tab); });
|
||||
const panel = screen.getByRole('tabpanel', { name: tab.textContent! });
|
||||
expect(tab.id).not.toBe('');
|
||||
expect(tab).toHaveAttribute('aria-controls', panel.id);
|
||||
expect(panel).toHaveAttribute('aria-labelledby', tab.id);
|
||||
}
|
||||
fireEvent.mouseDown(screen.getByRole('combobox', { name: 'Settings section' }));
|
||||
fireEvent.click(screen.getByRole('option', { name: 'General' }));
|
||||
expect(screen.getByRole('tabpanel', { name: 'General' })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('settings view has no accent picker and uses one follow-up section, one notification section', async () => {
|
||||
renderView();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user