Skip to content

Commit 79ffe5a

Browse files
feat: improved accessibility skipping to main content
1 parent 9196e81 commit 79ffe5a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/courseware/course/sequence/sequence-navigation/UnitButton.test.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,13 @@ describe('Unit Button', () => {
134134
jest.useFakeTimers();
135135

136136
const { container } = render(<Component />, { wrapWithRouter: true });
137-
138137
const unitButton = container.querySelector('[role="tabpanel"]');
139138

140139
fireEvent.keyDown(unitButton, { key: 'Enter' });
141140

142-
jest.runAllTimers();
141+
await act(async () => {
142+
jest.runAllTimers();
143+
});
143144

144145
await waitFor(() => {
145146
expect(document.activeElement).toBe(document.getElementById('bookmark-button'));

0 commit comments

Comments
 (0)