diff --git a/f2/src/__tests__/BusinessPage.test.js b/f2/src/__tests__/BusinessPage.test.js index a17c76acb..d569cac48 100644 --- a/f2/src/__tests__/BusinessPage.test.js +++ b/f2/src/__tests__/BusinessPage.test.js @@ -13,19 +13,20 @@ i18n.load('en', { en }) i18n.activate('en') describe('', () => { - afterEach(cleanup) + beforeEach(() => (global.scrollTo = jest.fn())) + afterEach(cleanup) - it('renders', () => { - render( - - - - - - - - - , - ) - }) + it('renders', () => { + render( + + + + + + + + + , + ) + }) }) diff --git a/f2/src/__tests__/CancelPage.test.js b/f2/src/__tests__/CancelPage.test.js index 1880bb0ca..f6ff180ad 100644 --- a/f2/src/__tests__/CancelPage.test.js +++ b/f2/src/__tests__/CancelPage.test.js @@ -13,6 +13,7 @@ i18n.load('en', { en }) i18n.activate('en') describe('', () => { + beforeEach(() => (global.scrollTo = jest.fn())) afterEach(cleanup) it('renders', () => { diff --git a/f2/src/__tests__/ConfirmCancelPage.test.js b/f2/src/__tests__/ConfirmCancelPage.test.js index f90fc5461..081d09f61 100644 --- a/f2/src/__tests__/ConfirmCancelPage.test.js +++ b/f2/src/__tests__/ConfirmCancelPage.test.js @@ -13,6 +13,7 @@ i18n.load('en', { en }) i18n.activate('en') describe('', () => { + beforeEach(() => (global.scrollTo = jest.fn())) afterEach(cleanup) it('renders', () => { diff --git a/f2/src/__tests__/ConfirmationSummary.test.js b/f2/src/__tests__/ConfirmationSummary.test.js index ff44f0031..620fbecf8 100644 --- a/f2/src/__tests__/ConfirmationSummary.test.js +++ b/f2/src/__tests__/ConfirmationSummary.test.js @@ -13,6 +13,7 @@ i18n.load('en', { en }) i18n.activate('en') describe('', () => { + beforeEach(() => (global.scrollTo = jest.fn())) afterEach(cleanup) it('renders', () => { diff --git a/f2/src/__tests__/ContactInfoPage.test.js b/f2/src/__tests__/ContactInfoPage.test.js index e07ebe0de..c4cbbee8b 100644 --- a/f2/src/__tests__/ContactInfoPage.test.js +++ b/f2/src/__tests__/ContactInfoPage.test.js @@ -13,6 +13,7 @@ i18n.load('en', { en }) i18n.activate('en') describe('', () => { + beforeEach(() => (global.scrollTo = jest.fn())) afterEach(cleanup) it('renders', () => { diff --git a/f2/src/__tests__/DevicesPage.test.js b/f2/src/__tests__/DevicesPage.test.js index 79e467601..0da7d7e5f 100644 --- a/f2/src/__tests__/DevicesPage.test.js +++ b/f2/src/__tests__/DevicesPage.test.js @@ -13,6 +13,7 @@ i18n.load('en', { en }) i18n.activate('en') describe('', () => { + beforeEach(() => (global.scrollTo = jest.fn())) afterEach(cleanup) it('renders', () => { @@ -28,4 +29,4 @@ describe('', () => { , ) }) -}) \ No newline at end of file +}) diff --git a/f2/src/__tests__/FeedbackPage.test.js b/f2/src/__tests__/FeedbackPage.test.js index 109f05a3a..9db3fe72a 100644 --- a/f2/src/__tests__/FeedbackPage.test.js +++ b/f2/src/__tests__/FeedbackPage.test.js @@ -13,6 +13,7 @@ i18n.load('en', { en }) i18n.activate('en') describe('', () => { + beforeEach(() => (global.scrollTo = jest.fn())) afterEach(cleanup) it('renders', () => { diff --git a/f2/src/__tests__/InformationPage.test.js b/f2/src/__tests__/InformationPage.test.js index 8afcaba33..efc1e20a5 100644 --- a/f2/src/__tests__/InformationPage.test.js +++ b/f2/src/__tests__/InformationPage.test.js @@ -13,19 +13,20 @@ i18n.load('en', { en }) i18n.activate('en') describe('', () => { - afterEach(cleanup) + beforeEach(() => (global.scrollTo = jest.fn())) + afterEach(cleanup) - it('renders', () => { - render( - - - - - - - - - , - ) - }) + it('renders', () => { + render( + + + + + + + + + , + ) + }) }) diff --git a/f2/src/__tests__/LandingPage.test.js b/f2/src/__tests__/LandingPage.test.js index b13732343..10f21163c 100644 --- a/f2/src/__tests__/LandingPage.test.js +++ b/f2/src/__tests__/LandingPage.test.js @@ -13,6 +13,7 @@ i18n.load('en', { en }) i18n.activate('en') describe('', () => { + beforeEach(() => (global.scrollTo = jest.fn())) afterEach(cleanup) it('renders', () => { diff --git a/f2/src/__tests__/LocationPage.test.js b/f2/src/__tests__/LocationPage.test.js index 50c56c3ca..3ae1fafb5 100644 --- a/f2/src/__tests__/LocationPage.test.js +++ b/f2/src/__tests__/LocationPage.test.js @@ -13,6 +13,7 @@ i18n.load('en', { en }) i18n.activate('en') describe('', () => { + beforeEach(() => (global.scrollTo = jest.fn())) afterEach(cleanup) it('renders', () => { diff --git a/f2/src/__tests__/PrivacyConsentPage.test.js b/f2/src/__tests__/PrivacyConsentPage.test.js index d513fecd7..88b03e34c 100644 --- a/f2/src/__tests__/PrivacyConsentPage.test.js +++ b/f2/src/__tests__/PrivacyConsentPage.test.js @@ -13,6 +13,7 @@ i18n.load('en', { en }) i18n.activate('en') describe('', () => { + beforeEach(() => (global.scrollTo = jest.fn())) afterEach(cleanup) it('renders', () => { @@ -28,4 +29,4 @@ describe('', () => { , ) }) -}) \ No newline at end of file +}) diff --git a/f2/src/__tests__/WhatHappenedPage.test.js b/f2/src/__tests__/WhatHappenedPage.test.js index 2968b47f3..67737768c 100644 --- a/f2/src/__tests__/WhatHappenedPage.test.js +++ b/f2/src/__tests__/WhatHappenedPage.test.js @@ -13,6 +13,7 @@ i18n.load('en', { en }) i18n.activate('en') describe('', () => { + beforeEach(() => (global.scrollTo = jest.fn())) afterEach(cleanup) it('renders', () => { diff --git a/f2/src/__tests__/WhatWasAffectedPage.test.js b/f2/src/__tests__/WhatWasAffectedPage.test.js index 9e193e47e..bcce6a746 100644 --- a/f2/src/__tests__/WhatWasAffectedPage.test.js +++ b/f2/src/__tests__/WhatWasAffectedPage.test.js @@ -13,6 +13,7 @@ i18n.load('en', { en }) i18n.activate('en') describe('', () => { + beforeEach(() => (global.scrollTo = jest.fn())) afterEach(cleanup) it('renders', () => { diff --git a/f2/src/components/footer/__tests__/Footer.test.js b/f2/src/components/footer/__tests__/Footer.test.js index a4881e12d..2e95a3770 100644 --- a/f2/src/components/footer/__tests__/Footer.test.js +++ b/f2/src/components/footer/__tests__/Footer.test.js @@ -11,6 +11,7 @@ i18n.load('en', { en }) i18n.activate('en') describe('