diff --git a/README.md b/README.md index 9157978..124d732 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ -# FEC -Front End Capstone for Hack Reactor +# FEC - Threads +An online clothing store application with a modern design and responsive UX + +# Video Demo +https://bit.ly/3j5nzra ## Getting a Copy of the Repo If you haven't already, fork the repository on GitHub and clone your newly created repo down to your computer. diff --git a/client/src/relatedItems/Carousel/__test__/Carousel.test.js b/client/src/relatedItems/Carousel/__test__/Carousel.test.js index f100098..e4eaec0 100644 --- a/client/src/relatedItems/Carousel/__test__/Carousel.test.js +++ b/client/src/relatedItems/Carousel/__test__/Carousel.test.js @@ -11,7 +11,7 @@ afterEach(() => { cleanup(); }); -it ('renders the Related Carousel without crashing', () => { +test('renders the Related Carousel without crashing', () => { render( { expect(carouselElement).toBeInTheDocument(); }); -it ('renders Outfit Carousel without crashing', () => { +test('renders Outfit Carousel without crashing', () => { render( { />); const carouselElement = screen.getByTestId('carousel-1'); expect(carouselElement).toBeInTheDocument(); +}); + +test('related carousel matches snapshot', () => { + const relatedTree = renderer.create().toJSON(); + expect(relatedTree).toMatchSnapshot(); +}); + +test('outfit carousel matches snapshot', () => { + const outfitTree = renderer.create().toJSON(); + expect(outfitTree).toMatchSnapshot(); }); \ No newline at end of file diff --git a/client/src/relatedItems/Carousel/__test__/__snapshots__/Carousel.test.js.snap b/client/src/relatedItems/Carousel/__test__/__snapshots__/Carousel.test.js.snap new file mode 100644 index 0000000..f759d1f --- /dev/null +++ b/client/src/relatedItems/Carousel/__test__/__snapshots__/Carousel.test.js.snap @@ -0,0 +1,14 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`related carousel matches snapshot 1`] = ` +
+
+
+
+
+`; diff --git a/client/src/relatedItems/CompareModal/__test__/CompareModal.test.js b/client/src/relatedItems/CompareModal/__test__/CompareModal.test.js index 7a00a80..7d9c72b 100644 --- a/client/src/relatedItems/CompareModal/__test__/CompareModal.test.js +++ b/client/src/relatedItems/CompareModal/__test__/CompareModal.test.js @@ -2,7 +2,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import CompareModal from '../CompareModal.jsx'; -it ('renders without crashing', () => { +test('renders without crashing', () => { const div = document.createElement('div'); ReactDOM.render(, div); }); \ No newline at end of file diff --git a/client/src/relatedItems/OutfitCard/__test__/OutfitCard.test.js b/client/src/relatedItems/OutfitCard/__test__/OutfitCard.test.js index 8e455eb..dceb517 100644 --- a/client/src/relatedItems/OutfitCard/__test__/OutfitCard.test.js +++ b/client/src/relatedItems/OutfitCard/__test__/OutfitCard.test.js @@ -1,7 +1,7 @@ import React from 'react'; import { render, screen, cleanup } from '@testing-library/react'; import OutfitCard from '../OutfitCard.jsx'; -import {renderer, act } from 'react-test-renderer'; +import renderer from 'react-test-renderer'; import sampleOutfits from '../../../../../data/sampleOutfits.js'; import '@testing-library/jest-dom/extend-expect'; @@ -9,10 +9,13 @@ afterEach(() => { cleanup(); }); -it ('renders without crashing', () => { - act(() => { - render(); - }); +test('renders an outfit card without crashing', () => { + render(); const outfitElement = screen.getByTestId('outfit-13023'); expect(outfitElement).toBeInTheDocument(); }); + +test('outfit card matches snapshot', () => { + const outfitTree = renderer.create().toJSON(); + expect(outfitTree).toMatchSnapshot(); +}); \ No newline at end of file diff --git a/client/src/relatedItems/OutfitCard/__test__/__snapshots__/OutfitCard.test.js.snap b/client/src/relatedItems/OutfitCard/__test__/__snapshots__/OutfitCard.test.js.snap new file mode 100644 index 0000000..c4936b3 --- /dev/null +++ b/client/src/relatedItems/OutfitCard/__test__/__snapshots__/OutfitCard.test.js.snap @@ -0,0 +1,203 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`outfit card matches snapshot 1`] = ` +
+ + + + +
+
+ outfit-card +
+
+ JACKETS +
+
+ Camo Onesie +
+
+ $ +
+
+
+