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

Minichallenge5 #98

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

Conversation

oscarfiend
Copy link

@oscarfiend oscarfiend commented Aug 26, 2021

The application's authentication has been developed using firebase services. the login credentials are: email: [email protected] password: Rocks!

preview link: https://minichallenge5-wizeline-oscar.netlify.app/

Test coverage:
Screenshot_314

@@ -26,6 +26,7 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<div id="modal"></div>
Copy link

Choose a reason for hiding this comment

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

It's ok this div for the modal portal but normally this can be implemented as part of a React component itself

Promise.resolve({
data: { ...videosMock },
})
);
Copy link

Choose a reason for hiding this comment

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

axios.mockReturnValue(
      Promise.resolve({
        data: { ...videosMock },
      })

If this code is duplicated on another tests, you could figure it out how to reuse it

Layout.propTypes = {
children: PropTypes.element.isRequired,
};

export default Layout;
Copy link

Choose a reason for hiding this comment

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

Good use of Layout component

UPDATE_QUERY_VIDEO,
ADD_TO_FAVORITES,
REMOVE_FROM_FAVORITES,
} from '../../utils/constants';
Copy link

Choose a reason for hiding this comment

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

good use of constants


firebase.initializeApp(firebaseConfig);

export { firebase };
Copy link

Choose a reason for hiding this comment

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

Remember to never put credentials on the code.

Try to use Env vars instead always. Please fix this.

Copy link

Choose a reason for hiding this comment

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

This is because with this credentials, I can use them and access to your firebase data.

@ghost
Copy link

ghost commented Aug 29, 2021

Acceptance Criteria

  • All the sections have their own route.
  • Navigation across the sections is implemented correctly.
  • The Global State is persistent across all the sections.
  • The "Mocked Authentication" mechanism works correctly.
  • The "session data" is stored in the Global Context correctly.
  • Videos can be added to the Favorites list.
  • Videos can be removed from the Favorites list.
  • Navigation to Favorite Videos View using a private route is implemented correctly (only authenticated users should access this section).
  • Navigation to the Favorite Video Details View using a private route is implemented correctly (only authenticated users should access this section).
  • Information for the selected favorite video is displayed correctly
  • The list of other favorite videos in the Favorite Video Details View is displayed.
  • Testing coverage is above 70%. (Please include a screenshot of the code coverage report in your PR description).

Bonus Points

  • The Add/remove from favorites button should appear when the user passes the mouse over the video card in the list.
  • Integrate with a real authentication provider (such as Auth0, OAuth or Firebase).
  • A 404 section is shown when a route is not found.
  • The Login View is implemented as a modal using React Portals.

@ghost
Copy link

ghost commented Aug 29, 2021

Congrats! good job 😄

I leave some comments in order to improve some aspects.

Generally it's ok 👌

Try to reach the 70% of test coverage, you almost do it!

@ghost ghost mentioned this pull request Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant