|
8 | 8 | SingleTabStopNavigationAPI, |
9 | 9 | SingleTabStopNavigationContext, |
10 | 10 | SingleTabStopNavigationProvider, |
11 | | - SingleTabStopNavigationReset, |
12 | 11 | useSingleTabStopNavigation, |
13 | 12 | } from '../'; |
14 | 13 | import { renderWithSingleTabStopNavigation } from './utils'; |
@@ -248,42 +247,4 @@ describe('nested contexts', () => { |
248 | 247 | expect(findGroupButton('inner', 0)).toHaveAttribute('tabindex', '0'); |
249 | 248 | expect(findGroupButton('inner', 1)).toHaveAttribute('tabindex', '-1'); |
250 | 249 | }); |
251 | | - |
252 | | - test('ignores parent context when reset is used', () => { |
253 | | - const { rerender } = render( |
254 | | - <Group id="outer-most" navigationActive={true}> |
255 | | - <SingleTabStopNavigationReset> |
256 | | - <Group id="outer" navigationActive={true}> |
257 | | - <Group id="inner" navigationActive={true}> |
258 | | - {null} |
259 | | - </Group> |
260 | | - </Group> |
261 | | - </SingleTabStopNavigationReset> |
262 | | - </Group> |
263 | | - ); |
264 | | - expect(findGroupButton('outer-most', 0)).toHaveAttribute('tabindex', '0'); |
265 | | - expect(findGroupButton('outer-most', 1)).toHaveAttribute('tabindex', '-1'); |
266 | | - expect(findGroupButton('outer', 0)).toHaveAttribute('tabindex', '0'); |
267 | | - expect(findGroupButton('outer', 1)).toHaveAttribute('tabindex', '-1'); |
268 | | - expect(findGroupButton('inner', 0)).toHaveAttribute('tabindex', '-1'); |
269 | | - expect(findGroupButton('inner', 1)).toHaveAttribute('tabindex', '-1'); |
270 | | - |
271 | | - rerender( |
272 | | - <Group id="outer-most" navigationActive={true}> |
273 | | - <Group id="outer" navigationActive={true}> |
274 | | - <SingleTabStopNavigationReset> |
275 | | - <Group id="inner" navigationActive={true}> |
276 | | - {null} |
277 | | - </Group> |
278 | | - </SingleTabStopNavigationReset> |
279 | | - </Group> |
280 | | - </Group> |
281 | | - ); |
282 | | - expect(findGroupButton('outer-most', 0)).toHaveAttribute('tabindex', '0'); |
283 | | - expect(findGroupButton('outer-most', 1)).toHaveAttribute('tabindex', '-1'); |
284 | | - expect(findGroupButton('outer', 0)).toHaveAttribute('tabindex', '-1'); |
285 | | - expect(findGroupButton('outer', 1)).toHaveAttribute('tabindex', '-1'); |
286 | | - expect(findGroupButton('inner', 0)).toHaveAttribute('tabindex', '0'); |
287 | | - expect(findGroupButton('inner', 1)).toHaveAttribute('tabindex', '-1'); |
288 | | - }); |
289 | 250 | }); |
0 commit comments