From 32ad800288ee54c50da134d40655163750ba9aff Mon Sep 17 00:00:00 2001 From: Quaid Bartolomei Date: Fri, 8 Oct 2021 15:05:29 -0700 Subject: [PATCH] fix: replaced mount with mountWithTheme --- src/common/TreeAge.cy.js | 7 ++++--- src/components/ImageShower.cy.js | 3 ++- src/components/InformationCard1.cy.js | 2 +- src/components/Logo.cy.js | 2 +- src/components/Navbar.cy.js | 3 ++- src/components/Share.cy.js | 3 ++- src/components/SidePanel.cy.js | 3 ++- src/components/Timeline.cy.js | 3 ++- src/components/VerifiedBadge.cy.js | 3 ++- src/models/mapTools.cy.js | 2 +- 10 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/common/TreeAge.cy.js b/src/common/TreeAge.cy.js index 05d349724..4280b3f17 100644 --- a/src/common/TreeAge.cy.js +++ b/src/common/TreeAge.cy.js @@ -1,12 +1,13 @@ import React from 'react'; -import { mount } from '@cypress/react'; + +import { mountWithTheme as mount } from '../models/test-utils'; import TreeAge from './TreeAge'; describe('TreeAge', () => { it('TreeAge', () => { - const treeAgeValue = "8 Years"; + const treeAgeValue = '8 Years'; function Test() { - return (); + return ; } mount(); }); diff --git a/src/components/ImageShower.cy.js b/src/components/ImageShower.cy.js index 46501e48f..ebac4ea58 100644 --- a/src/components/ImageShower.cy.js +++ b/src/components/ImageShower.cy.js @@ -1,5 +1,6 @@ import React from 'react'; -import { mount } from '@cypress/react'; + +import { mountWithTheme as mount } from '../models/test-utils'; import ImageShower from './ImageShower'; describe('ImageShower', () => { diff --git a/src/components/InformationCard1.cy.js b/src/components/InformationCard1.cy.js index dcdc5acde..69f582a43 100644 --- a/src/components/InformationCard1.cy.js +++ b/src/components/InformationCard1.cy.js @@ -1,5 +1,5 @@ import React from 'react'; -import { mount } from '@cypress/react'; +import { mountWithTheme as mount } from '../models/test-utils'; import InformationCard1 from './InformationCard1'; const info = { diff --git a/src/components/Logo.cy.js b/src/components/Logo.cy.js index 9975083ca..a1abe09d4 100644 --- a/src/components/Logo.cy.js +++ b/src/components/Logo.cy.js @@ -1,7 +1,7 @@ -import { mount } from '@cypress/react'; import React from 'react'; import logo from '../images/greenstand_logo_full.png'; +import { mountWithTheme as mount } from '../models/test-utils'; import Logo from './Logo'; describe('Logo', () => { diff --git a/src/components/Navbar.cy.js b/src/components/Navbar.cy.js index 33469736c..a07586dc7 100644 --- a/src/components/Navbar.cy.js +++ b/src/components/Navbar.cy.js @@ -1,5 +1,6 @@ -import { mount } from '@cypress/react'; import React from 'react'; + +import { mountWithTheme as mount } from '../models/test-utils'; import Navbar from './Navbar'; describe('Navbar tests', () => { diff --git a/src/components/Share.cy.js b/src/components/Share.cy.js index 05f47cb45..7061ceb36 100644 --- a/src/components/Share.cy.js +++ b/src/components/Share.cy.js @@ -1,5 +1,6 @@ -import { mount } from '@cypress/react'; import React from 'react'; + +import { mountWithTheme as mount } from '../models/test-utils'; import Share from './Share'; describe('Share', () => { diff --git a/src/components/SidePanel.cy.js b/src/components/SidePanel.cy.js index 590a66126..bc20eda77 100644 --- a/src/components/SidePanel.cy.js +++ b/src/components/SidePanel.cy.js @@ -1,5 +1,6 @@ -import { mount } from '@cypress/react'; import React from 'react'; + +import { mountWithTheme as mount } from '../models/test-utils'; import SidePanel from './SidePanel'; describe('SidePanel', () => { diff --git a/src/components/Timeline.cy.js b/src/components/Timeline.cy.js index e4a7ea30d..1ad4cef95 100644 --- a/src/components/Timeline.cy.js +++ b/src/components/Timeline.cy.js @@ -1,5 +1,6 @@ -import { mount } from '@cypress/react'; import React from 'react'; + +import { mountWithTheme as mount } from '../models/test-utils'; import Timeline from './Timeline'; describe('Timeline', () => { diff --git a/src/components/VerifiedBadge.cy.js b/src/components/VerifiedBadge.cy.js index a531913d7..9443d4362 100644 --- a/src/components/VerifiedBadge.cy.js +++ b/src/components/VerifiedBadge.cy.js @@ -1,5 +1,6 @@ import React from 'react'; -import { mount } from '@cypress/react'; + +import { mountWithTheme as mount } from '../models/test-utils'; import VerifiedBadge from './VerifiedBadge'; describe('Verified Badge', () => { diff --git a/src/models/mapTools.cy.js b/src/models/mapTools.cy.js index aa63c8b41..17ba9742c 100644 --- a/src/models/mapTools.cy.js +++ b/src/models/mapTools.cy.js @@ -1,8 +1,8 @@ -import { mount } from '@cypress/react'; import expectRuntime from 'expect-runtime'; import React from 'react'; import * as mapTools from './mapTools'; +import { mountWithTheme as mount } from './test-utils'; const google = { maps: {