Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

Commit cc250db

Browse files
committed
feat(app-contact.spec.js): refactor mobile navigation
1 parent 97f0208 commit cc250db

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

cypress/integration/app-contact.spec.js

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ describe('Contact Page', function () {
1616
cy.get('.navbar').contains('Development').click()
1717
cy.url().should('include', '/app-developer')
1818
cy.contains('Your Go-To App Developer')
19-
2019
})
2120
it('Services should drop down to display UI/UX Design and navigate to design page', function(){
2221
cy.get('.navbar').contains('Services').click()
@@ -56,75 +55,57 @@ describe('Contact Page', function () {
5655
})
5756
})
5857
describe('Nav Bar Navigation (Mobile)', function(){
59-
it('Nav menu should expand', function(){
60-
cy.viewport(960,600)
61-
cy.get('.navbar-toggler').click()
58+
beforeEach(() => {
59+
cy.viewport(960,600) // Sets view to large to enable nav menu
60+
cy.get('.navbar-toggler').click() //expands nav menu before each test
6261
})
6362
it('Nav menu should collapse', function(){
64-
cy.viewport(960,600)
65-
cy.get('.navbar-toggler').click()
6663
cy.wait(2000)
6764
cy.get('.navbar-toggler').click()
6865
//cy.get('.navbar').should('not.be.visible', 'About')
6966
})
7067
it('Home on nav Bar should redirect to home page', function(){
71-
cy.viewport(960,600)
72-
cy.get('.navbar-toggler').click()
7368
cy.get('.navbar').contains('Home').click()
7469
cy.url().should('include', '/')
7570
cy.contains('Creating Digital Experiences')
7671
})
7772
it('Services should drop down to display Development and navigate to developer page', function(){
78-
cy.viewport(960,600)
79-
cy.get('.navbar-toggler').click()
8073
cy.get('.navbar').contains('Services').click()
8174
cy.get('.navbar').contains('Development').click()
8275
cy.url().should('include', '/app-developer')
8376
cy.contains('Your Go-To App Developer')
8477
})
8578
it('Services should drop down to display UI/UX Design and navigate to design page', function(){
86-
cy.viewport(960,600)
87-
cy.get('.navbar-toggler').click()
8879
cy.get('.navbar').contains('Services').click()
8980
cy.get('.navbar').contains('UX/UI Design').click()
9081
cy.url().should('include', '/app-designer')
9182
cy.contains('UI/UX App Designer')
9283
})
9384
it('Services should drop down to display Consulting and navigate to consulting page', function(){
94-
cy.viewport(960,600)
95-
cy.get('.navbar-toggler').click()
9685
cy.get('.navbar').contains('Services').click()
9786
cy.get('.navbar').contains('Consulting').click()
9887
cy.url().should('include', '/startup-consulting')
9988
cy.contains('Consulting for all Industries')
10089
})
10190
it('About should drop down to display Meet the team and navigate to about page', function(){
102-
cy.viewport(960,600)
103-
cy.get('.navbar-toggler').click()
10491
cy.get('.navbar').contains('About').click()
10592
cy.get('.navbar').contains('Meet the team').click()
10693
cy.url().should('include', '/about')
10794
cy.contains('We Are Passionate About Technology and Design')
10895
})
10996
it('About should drop down to display Juntoscope Case Study and navigate to juntoscope page', function(){
110-
cy.viewport(960,600)
111-
cy.get('.navbar-toggler').click()
11297
cy.get('.navbar').contains('About').click()
11398
cy.get('.navbar').contains('Juntoscope Case Study').click()
11499
cy.url().should('include', '/juntoscope')
115100
cy.contains('Case Study')
116101
})
117102
it('About should drop down to display Toolbox and navigate to Toolbox page', function(){
118-
cy.viewport(960,600)
119-
cy.get('.navbar-toggler').click()
120103
cy.get('.navbar').contains('About').click()
121104
cy.get('.navbar').contains('Toolbox').click()
122105
cy.url().should('include', '/toolbox')
123106
cy.contains('Here are some of the tools we use')
124107
})
125108
it('About should drop down to display PWA White Paper and navigate to PWA White Paper page', function(){
126-
cy.viewport(960,600)
127-
cy.get('.navbar-toggler').click()
128109
cy.get('.navbar').contains('About').click()
129110
cy.get('.navbar').contains('PWA White Paper').click()
130111
cy.url().should('include', '/resources/pwa-white-paper')
@@ -219,5 +200,5 @@ describe('Contact Page', function () {
219200
//it('Open native mail to contact Hello@openforge.io', function () {
220201
//cy.contains('hello@openforge.io').click()
221202
//})
222-
})
203+
})
223204
})

0 commit comments

Comments
 (0)