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

Test Login page #87

Closed
wants to merge 1 commit into from
Closed

Test Login page #87

wants to merge 1 commit into from

Conversation

xsarahyu
Copy link
Collaborator

@xsarahyu xsarahyu commented Feb 5, 2024

No description provided.

Copy link
Collaborator

@ZrybeaWhitfield ZrybeaWhitfield left a comment

Choose a reason for hiding this comment

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

Can we remove the commented out code and move it to a WIP branch

const passwordInput = screen.getByPlaceholderText('Password')
const loginButton = screen.getByRole('button', { name: 'Login' })

expect(usernameInput).toBeInTheDocument()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure about these assertions, its testing the rendering of the login form component which already has its own render tests. A better test could be rending the Login page with the image, LoginForm component mocked, and

then assert that all of those elements are present in the rendered Login page

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also adding I think it should all be in 1 test. So a "good" Login page has to be rendered with all three- the Logo, , and and the para. This should be 1 test that asserts that all 3 are present.

@wadedesir wadedesir closed this Feb 6, 2024
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.

4 participants