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

nmarklund10/ add home page testing; refactor home page component by breaking it out into separate modules #278

Merged

Conversation

nmarklund10
Copy link
Contributor

Description

I implemented initial testing of the Home page or where the user logins. There are 7 tests:

  1. An error message shows when the postLogin fails (and the $router is not called to switch components)
  2. No error message shows when the postLogin succeeds (and the $router is called to switch components)
  3. The modal is visible when the user clicks the "Forgot Password" link
  4. The Welcome message is rendered on the home page
  5. The Tutorial and its slides are rendered on the home page
  6. An error message shows in the password reset modal when postReset fails
  7. A success message shows in the password reset modal when postReset succeeds

As I was building the tests, I noticed that there were opportunities to break out the component into smaller modules to prevent the messy code with showing alerts and the modal.

Related Issues

List related Issues:

link
#275

Todos

  • Determine if this is the proper skeleton code for frontend testing

Steps to Test or Reproduce

Outline the steps to test or reproduce the PR here.

npm test

Impacted Areas in Application

List general components of the application that this PR will affect:

  • Homepage

@blakenan-bellese blakenan-bellese self-requested a review March 31, 2022 12:43
Copy link
Contributor

@blakenan-bellese blakenan-bellese left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks for the tests and the proactive refactor.

@blakenan-bellese blakenan-bellese merged commit 8c10b76 into CodeForBaltimore:master Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants