Skip to content

Commit

Permalink
[#7] Add basic test for login page
Browse files Browse the repository at this point in the history
  • Loading branch information
liamstevens111 committed Feb 15, 2023
1 parent b150416 commit 694e8e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions cypress/integration/UserAuthentication/login.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
describe('User authentication', () => {
context('upon naivation to /login', () => {
it('displays login page', () => {
cy.visit('/login');

cy.findByTestId('login-header').should('be.visible');
});
});
});
4 changes: 3 additions & 1 deletion src/screens/Home/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ function LoginScreen() {
return (
<>
<img className="inline-block" src={logo} alt="logo" />
<p className="text-white opacity-50 my-8">{t('login.sign_in')} to Nimble</p>
<p data-test-id="login-header" className="text-white opacity-50 my-8">
{t('login.sign_in')} to Nimble
</p>
<form>
<Input name="email" label={t('login.email')} type="text" className="block h-14 w-80 my-3" onInputChange={tempHandler} />
<div className="relative w-80">
Expand Down

0 comments on commit 694e8e8

Please sign in to comment.