Skip to content
Snippets Groups Projects
Commit 298ddbef authored by heikkkk's avatar heikkkk
Browse files

test: add e2e tests for not found views

parent 815b3603
No related branches found
No related tags found
1 merge request!70Test/e2e
Pipeline #282019 passed with warnings
describe('NotFound Test', () => {
beforeEach(() => {
cy.visit('/login');
cy.get('#emailInput input').type('user@example.com');
cy.get('#passwordInput input').type('John1');
cy.get('form').submit();
cy.wait(1000);
cy.visit('/')
})
it('redirects user when page is not found, then go home', () => {
cy.visit('/non-existent-page')
cy.get('[data-cy="404-error"]').should('exist')
cy.get('[data-cy="to-home"]').click()
cy.url().should('include', '/')
})
})
\ No newline at end of file
......@@ -5,13 +5,13 @@
<div class="error-template text-center"> <!-- 'text-center' for centering text content -->
<h1>
Oops!</h1>
<h2>
<h2 data-cy="404-error">
404 Not Found</h2>
<div class="error-details">
Sorry, an error has occurred, Requested page not found!
</div>
<div class="error-actions">
<Button1 button-text="Take Me Home" @click="home" />
<Button1 data-cy="to-home" button-text="Take Me Home" @click="home" />
</div>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment