Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steve rivera #83

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ test('target dropdown', async ()=>{
const placeholder = screen.queryAllByPlaceholderText('Select an option');
console.log(placeholder);
});
});

});
2 changes: 1 addition & 1 deletion src/components/tests/Display.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
21 changes: 17 additions & 4 deletions src/components/tests/Episode.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(<Episode episode={[]} />)
});

test("renders the summury test passed as prop", ()=>{
test("renders the summary test passed as prop", ()=>{
render(<Episode episode={testEpisode} />)
const summary = screen.queryAllByText(testEpisode.summary)

expect(summary).toBeTruthy()

});

test("renders default image when image is not defined", ()=>{

render(<Episode episode={testEpisodeWithoutImage} />)
const image = screen.queryAllByText(testEpisodeWithoutImage.image)

expect(image).toBeInTheDocument()
})

//Tasks
Expand Down