@@ -40,19 +40,13 @@ reduxHooks.usePlatformSettingsData.mockReturnValue({ supportEmail });
4040
4141describe ( 'App router component' , ( ) => {
4242 describe ( 'component' , ( ) => {
43- const runBasicTests = ( ) => {
44- it ( 'displays title in helmet component' , async ( ) => {
45- await waitFor ( ( ) => expect ( document . title ) . toEqual ( messages . pageTitle . defaultMessage ) ) ;
46- } ) ;
47- } ;
4843 describe ( 'no network failure' , ( ) => {
4944 beforeEach ( ( ) => {
5045 jest . clearAllMocks ( ) ;
5146 reduxHooks . useRequestIsFailed . mockReturnValue ( false ) ;
5247 getConfig . mockReturnValue ( { } ) ;
5348 render ( < IntlProvider locale = "en" > < App /> </ IntlProvider > ) ;
5449 } ) ;
55- runBasicTests ( ) ;
5650 it ( 'loads dashboard' , ( ) => {
5751 const dashboard = screen . getByText ( 'Dashboard' ) ;
5852 expect ( dashboard ) . toBeInTheDocument ( ) ;
@@ -65,7 +59,6 @@ describe('App router component', () => {
6559 getConfig . mockReturnValue ( { OPTIMIZELY_URL : 'fake.url' } ) ;
6660 render ( < IntlProvider locale = "en" > < App /> </ IntlProvider > ) ;
6761 } ) ;
68- runBasicTests ( ) ;
6962 it ( 'loads dashboard' , ( ) => {
7063 const dashboard = screen . getByText ( 'Dashboard' ) ;
7164 expect ( dashboard ) . toBeInTheDocument ( ) ;
@@ -78,7 +71,6 @@ describe('App router component', () => {
7871 getConfig . mockReturnValue ( { OPTIMIZELY_PROJECT_ID : 'fakeId' } ) ;
7972 render ( < IntlProvider locale = "en" > < App /> </ IntlProvider > ) ;
8073 } ) ;
81- runBasicTests ( ) ;
8274 it ( 'loads dashboard' , ( ) => {
8375 const dashboard = screen . getByText ( 'Dashboard' ) ;
8476 expect ( dashboard ) . toBeInTheDocument ( ) ;
@@ -91,7 +83,6 @@ describe('App router component', () => {
9183 getConfig . mockReturnValue ( { } ) ;
9284 render ( < IntlProvider locale = "en" messages = { messages } > < App /> </ IntlProvider > ) ;
9385 } ) ;
94- runBasicTests ( ) ;
9586 it ( 'loads error page' , ( ) => {
9687 const alert = screen . getByRole ( 'alert' ) ;
9788 expect ( alert ) . toBeInTheDocument ( ) ;
@@ -105,7 +96,6 @@ describe('App router component', () => {
10596 getConfig . mockReturnValue ( { } ) ;
10697 render ( < IntlProvider locale = "en" > < App /> </ IntlProvider > ) ;
10798 } ) ;
108- runBasicTests ( ) ;
10999 it ( 'loads error page' , ( ) => {
110100 const alert = screen . getByRole ( 'alert' ) ;
111101 expect ( alert ) . toBeInTheDocument ( ) ;
0 commit comments