diff --git a/README.md b/README.md index 06fd745b..96cdd0d6 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,11 @@ Get the project fired up and start using it as a user would. Try to go through t ## Instructions ### Task 1: Project Set Up -* [ ] Create a forked copy of this project. -* [ ] Clone your OWN version of the repository in your terminal -* [ ] cd into the project base directory `cd web-module-project-reducer-pattern` -* [ ] Download project dependencies by running `npm install` -* [ ] Start up the app using `npm start` +* [x] Create a forked copy of this project. +* [x] Clone your OWN version of the repository in your terminal +* [x] cd into the project base directory `cd web-module-project-reducer-pattern` +* [x] Download project dependencies by running `npm install` +* [x] Start up the app using `npm start` - [ ] With each saved change in your editor, the test runner will re-run all the tests - [ ] **IMPORTANT** If a test fails, use the test runner's error messages to find out why it is failing diff --git a/src/App.test.js b/src/App.test.js index c972892c..1811bd78 100644 --- a/src/App.test.js +++ b/src/App.test.js @@ -9,5 +9,5 @@ test('target dropdown', async ()=>{ const placeholder = screen.queryAllByPlaceholderText('Select an option'); console.log(placeholder); }); - -}); \ No newline at end of file + +}); diff --git a/src/components/tests/Display.test.js b/src/components/tests/Display.test.js index 5a01416b..cf33bb56 100644 --- a/src/components/tests/Display.test.js +++ b/src/components/tests/Display.test.js @@ -14,7 +14,7 @@ ///Tasks: -//1. Add in nessisary imports and values to establish the testing suite. +//1. Add in necessary imports and values to establish the testing suite. //2. Test that the Display component renders without any passed in props. //3. Rebuild or copy a show test data element as used in the previous set of tests. //4. Test that when the fetch button is pressed, the show component will display. Make sure to account for the api call and change of state in building your test. diff --git a/src/components/tests/Episode.test.js b/src/components/tests/Episode.test.js index 24b4c2dc..cb7c7aeb 100644 --- a/src/components/tests/Episode.test.js +++ b/src/components/tests/Episode.test.js @@ -13,19 +13,32 @@ const testEpisode = { } const testEpisodeWithoutImage = { - //Add in approprate test data structure here. + id: 2, + name: "", + image: '', + season: 2, + number: 2, + summary: "", + runtime: 1 } test("renders without error", () => { - + render() }); -test("renders the summury test passed as prop", ()=>{ +test("renders the summary test passed as prop", ()=>{ + render() + const summary = screen.queryAllByText(testEpisode.summary) + + expect(summary).toBeTruthy() }); test("renders default image when image is not defined", ()=>{ - + render() + const image = screen.queryAllByText(testEpisodeWithoutImage.image) + + expect(image).toBeInTheDocument() }) //Tasks