From f63eaf1234da5412b0d5bb426085d4706acb7607 Mon Sep 17 00:00:00 2001 From: guijun13 Date: Thu, 4 Aug 2022 12:00:12 -0300 Subject: [PATCH] feat: remove unnecessary tests --- .../views/notFound/NotFoundPage.spec.tsx | 26 ------------------- 1 file changed, 26 deletions(-) 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 () => {