diff --git a/apps/meteor/tests/unit/client/views/notFound/NotFoundPage.spec.tsx b/apps/meteor/tests/unit/client/views/notFound/NotFoundPage.spec.tsx index af504e1c8bd8..e59b7b4315cc 100644 --- a/apps/meteor/tests/unit/client/views/notFound/NotFoundPage.spec.tsx +++ b/apps/meteor/tests/unit/client/views/notFound/NotFoundPage.spec.tsx @@ -26,37 +26,11 @@ describe.skip('views/notFound/NotFoundPage', () => { expect(document.body).to.have.focus; userEvent.tab(); - expect(screen.getByRole('button', { name: 'Return_to_previous_page' })).to.have.focus; - userEvent.tab(); expect(screen.getByRole('button', { name: 'Return_to_home' })).to.have.focus; userEvent.tab(); expect(document.body).to.have.focus; }); - context('"Return to previous page" button', () => { - context('when clicked', () => { - const listener = spy(); - - before(() => { - window.history.pushState('404-page', '', 'http://localhost:3000/404'); - window.addEventListener('popstate', listener); - }); - - after(() => { - window.removeEventListener('popstate', listener); - }); - - it('should go back on history', async () => { - render(); - const button = screen.getByRole('button', { name: 'Return_to_previous_page' }); - - userEvent.click(button); - await waitFor(() => expect(listener).to.have.been.called(), { timeout: 2000 }); - expect(window.history.state).to.not.be.eq('404-page'); - }); - }); - }); - context('"Return to home" button', () => { context('when clicked', () => { it('should go back on history', async () => {