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

Feat/mini challenge 4 #84

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

lesliedayann
Copy link

No description provided.

it('should to take snapshop', () => {
expect(wrapper).toMatchSnapshot();
});
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is on this test the App component fetching the real YouTube Api? seems like that. Remember to avoid real YouTube api calls on tests.

const history = useHistory();
const { search, setSearch, darkMode, setDarkMode } = useContext(AppContext);
const [anchorEl, setAnchorEl] = useState(null);
// const [darkMode, setDarkMode] = useState(false);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always remove commented code

const darkMode = screen.getByText(/Dark Mode/i);
expect(darkMode).toBeInTheDocument();
});
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good test :)

const thumbnail = screen.getByRole('img');
expect(thumbnail).toHaveAttribute('src', props.imageURL);
});
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good test :D

test('Render RelatedVideo component', () => {
expect(wrapper).not.toBeNull();
});
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could add more expects like a related video values

const descriptionElement = screen.getByText(correctProps.description);
expect(descriptionElement).toBeInTheDocument();
});
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good test

test('Render Home Page', () => {
expect(wrapper).not.toBeNull();
});
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is on this test fetching the real YouTube api?

test('Render Video Template Page', () => {
expect(wrapper).not.toBeNull();
});
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is on this test fetching the real YouTube api?

@ghost
Copy link

ghost commented Aug 21, 2021

Acceptance Criteria

  • The search term is stored and retrieved from the Global Context correctly.
  • The appearance theme is stored on the Global Context and applied correctly to the App UI.
  • useReducer hook is implemented correctly to manage the Global State.

Bonus Points

  • Testing coverage is above 70%. (Please include a screenshot of the code coverage report in your PR description).

Seems like is not present the useReducer, if there is, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants