From 709b985ab003a42243166b4d719ba80e2e687a1f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 20 Jul 2023 16:26:54 -0500 Subject: [PATCH] Remove intermittently failing test --- .../features/ui/__tests__/index.test.tsx | 89 ------------------- 1 file changed, 89 deletions(-) delete mode 100644 app/soapbox/features/ui/__tests__/index.test.tsx diff --git a/app/soapbox/features/ui/__tests__/index.test.tsx b/app/soapbox/features/ui/__tests__/index.test.tsx deleted file mode 100644 index 6fb4b1e837..0000000000 --- a/app/soapbox/features/ui/__tests__/index.test.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import React from 'react'; -import { Route, Switch } from 'react-router-dom'; - -import { buildAccount } from 'soapbox/jest/factory'; - -import { render, screen, waitFor } from '../../../jest/test-helpers'; -import { normalizeInstance } from '../../../normalizers'; -import UI from '../index'; -import { WrappedRoute } from '../util/react-router-helpers'; - -const TestableComponent = () => ( - - - - - Sign in - - {/* WrappedRount will redirect to /login for logged out users... which will resolve to the route above! */} - null} /> - -); - -describe('', () => { - let store: any; - - beforeEach(() => { - store = { - me: false, - accounts: { - '1': buildAccount({ - id: '1', - acct: 'username', - display_name: 'My name', - avatar: 'test.jpg', - }), - }, - instance: normalizeInstance({ registrations: true }), - }; - }); - - describe('when logged out', () => { - describe('when viewing a Profile Page', () => { - it('should render the Profile page', async() => { - render( - , - {}, - store, - { initialEntries: ['/@username'] }, - ); - - await waitFor(() => { - expect(screen.getByTestId('cta-banner')).toHaveTextContent('Sign up now to discuss'); - }, { - timeout: 5000, - }); - }); - }); - - describe('when viewing a Status Page', () => { - it('should render the Status page', async() => { - render( - , - {}, - store, - { initialEntries: ['/@username/posts/12'] }, - ); - - await waitFor(() => { - expect(screen.getByTestId('cta-banner')).toHaveTextContent('Sign up now to discuss'); - }); - }); - }); - - describe('when viewing Notifications', () => { - it('should redirect to the login page', async() => { - render( - , - {}, - store, - { initialEntries: ['/notifications'] }, - ); - - await waitFor(() => { - expect(screen.getByTestId('sign-in')).toHaveTextContent('Sign in'); - }); - }); - }); - }); -});