Skip to content

Commit 3615ddc

Browse files
committed
Add Cypress Test
1 parent b257545 commit 3615ddc

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/// <reference types="cypress" />
2+
3+
4+
Cypress.on('uncaught:exception', (err, runnable) => {
5+
// returning false here prevents Cypress from
6+
// failing the test
7+
return false
8+
});
9+
10+
context('Navigation Test', () => {
11+
beforeEach(() => {
12+
cy.visit('http://127.0.0.1:8000/')
13+
});
14+
15+
describe('Navigation Test', () => {
16+
17+
it('Home page has activated', () => {
18+
cy.get('body').type('{alt}{c}{h}');
19+
cy.contains('Hello');
20+
});
21+
22+
it('Profile page has activated', () => {
23+
cy.get('body').type('{alt}{c}{p}');
24+
cy.contains('Explore');
25+
});
26+
27+
it('Agenda page has activated', () => {
28+
cy.get('body').type('{alt}{c}{a}');
29+
cy.contains('Next Week');
30+
});
31+
32+
it('Invitations page has activated', () => {
33+
cy.get('body').type('{alt}{c}{i}');
34+
cy.contains('You don\'t have any invitations.');
35+
});
36+
37+
it('Search page has activated', () => {
38+
cy.get('body').type('{alt}{c}{s}');
39+
cy.contains('Hello');
40+
});
41+
42+
it('Keyboard shortcuts page has activated', () => {
43+
cy.get('body').type('{ctrl}.');
44+
cy.contains('General');
45+
});
46+
});
47+
});

0 commit comments

Comments
 (0)