11describe ( 'Contact Page' , function ( ) {
22 var env = 'http://localhost:3333' ;
33 beforeEach ( ( ) => {
4- cy . visit ( env + '/contact' )
4+ cy . visit ( env + '/contact' )
55 cy . get ( 'button[type=submit]' ) . as ( 'submitBtn' )
66 } )
77
8- describe ( 'Nav Bar Navigation (Desktop)' , function ( ) {
9- it ( 'Home on nav Bar should redirect to home page' , function ( ) {
8+ describe ( 'Nav Bar Navigation (Desktop)' , function ( ) {
9+ // TODO -> Test suite for the blog link in nav bar.
10+ it ( 'Home on nav bar should redirect to home page' , function ( ) {
1011 cy . get ( '.navbar' ) . contains ( 'Home' ) . click ( )
1112 cy . url ( ) . should ( 'include' , '/' )
12- cy . contains ( 'Creating Digital Experiences' )
13- } )
14- it ( 'Services should drop down to display Development and navigate to developer page' , function ( ) {
15- cy . get ( '.navbar' ) . contains ( 'Services' ) . click ( )
16- cy . get ( '.navbar' ) . contains ( 'Development' ) . click ( )
17- cy . url ( ) . should ( 'include' , '/app-developer' )
18- cy . contains ( 'Your Go-To App Developer' )
19- } )
20- it ( 'Services should drop down to display UI/UX Design and navigate to design page' , function ( ) {
21- cy . get ( '.navbar' ) . contains ( 'Services' ) . click ( )
22- cy . get ( '.navbar' ) . contains ( 'UX/UI Design' ) . click ( )
23- cy . url ( ) . should ( 'include' , '/app-designer' )
24- cy . contains ( 'UI/UX App Designer' )
25- } )
26- it ( 'Services should drop down to display Consulting and navigate to consulting page' , function ( ) {
27- cy . get ( '.navbar' ) . contains ( 'Services' ) . click ( )
28- cy . get ( '.navbar' ) . contains ( 'Consulting' ) . click ( )
29- cy . url ( ) . should ( 'include' , '/startup-consulting' )
30- cy . contains ( 'Consulting for all Industries' )
31- } )
32- it ( 'About should drop down to display Meet the team and navigate to about page' , function ( ) {
33- cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
34- cy . get ( '.navbar' ) . contains ( 'Meet the team' ) . click ( )
35- cy . url ( ) . should ( 'include' , '/about' )
36- cy . contains ( 'We Are Passionate About Technology and Design' )
37- } )
38- it ( 'About should drop down to display Juntoscope Case Study and navigate to juntoscope page' , function ( ) {
39- cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
40- cy . get ( '.navbar' ) . contains ( 'Juntoscope Case Study' ) . click ( )
41- cy . url ( ) . should ( 'include' , '/juntoscope' )
42- cy . contains ( 'Case Study' )
43- } )
44- it ( 'About should drop down to display Toolbox and navigate to Toolbox page' , function ( ) {
45- cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
46- cy . get ( '.navbar' ) . contains ( 'Toolbox' ) . click ( )
47- cy . url ( ) . should ( 'include' , '/toolbox' )
48- cy . contains ( 'Here are some of the tools we use' )
49- } )
50- it ( 'About should drop down to display PWA White Paper and navigate to PWA White Paper page' , function ( ) {
51- cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
52- cy . get ( '.navbar' ) . contains ( 'PWA White Paper' ) . click ( )
53- cy . url ( ) . should ( 'include' , '/resources/pwa-white-paper' )
54- cy . contains ( 'What is a PWA and is it right for you?' )
5513 } )
14+ describe ( 'Services' , function ( ) {
15+ beforeEach ( ( ) => {
16+ // Gets Services text
17+ cy . get ( '.container > #navbarSupportedContent' ) . contains ( 'Services' ) ;
18+ // Clicks services dropdown arrow
19+ cy . get ( '.container > #navbarSupportedContent > .navbar-nav > .nav-item > #navbarDropdown' ) . click ( ) ;
20+ } )
21+ it ( 'Services should drop down to display Development and navigate to developer page' , function ( ) {
22+ cy . get ( '.navbar-nav > .nav-item:nth-child(2) > .dropdown-menu > .hydrated:nth-child(1) > .nav-link' ) . contains ( 'Development' ) . click ( )
23+ cy . url ( ) . should ( 'include' , '/app-developer' )
24+ } )
25+ it ( 'Services should drop down to display Design and navigate to design page' , function ( ) {
26+ cy . get ( '.navbar-nav > .nav-item:nth-child(2) > .dropdown-menu > .hydrated:nth-child(2) > .nav-link' ) . contains ( 'Design' ) . click ( ) ;
27+ cy . url ( ) . should ( 'include' , '/app-designer' ) ;
28+ } )
29+ it ( 'Services should drop down to display Consulting and navigate to consulting page' , function ( ) {
30+ cy . get ( '.navbar-nav > .nav-item:nth-child(2) > .dropdown-menu > .hydrated:nth-child(3) > .nav-link' ) . contains ( 'Consulting' ) . click ( )
31+ cy . url ( ) . should ( 'include' , '/startup-consulting' )
32+ } ) ;
33+ } ) ;
34+
35+ describe ( 'About' , function ( ) {
36+ it ( 'About should drop down to display Meet the team and navigate to about page' , function ( ) {
37+ cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
38+ cy . get ( '.navbar' ) . contains ( 'Meet the team' ) . click ( )
39+ cy . url ( ) . should ( 'include' , '/about' )
40+ cy . contains ( 'We Are Passionate About Technology and Design' )
41+ } )
42+ it ( 'About should drop down to display Juntoscope Case Study and navigate to juntoscope page' , function ( ) {
43+ cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
44+ cy . get ( '.navbar' ) . contains ( 'Juntoscope Case Study' ) . click ( )
45+ cy . url ( ) . should ( 'include' , '/juntoscope' )
46+ cy . contains ( 'Case Study' )
47+ } )
48+ it ( 'About should drop down to display Toolbox and navigate to Toolbox page' , function ( ) {
49+ cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
50+ cy . get ( '.navbar' ) . contains ( 'Toolbox' ) . click ( )
51+ cy . url ( ) . should ( 'include' , '/toolbox' )
52+ cy . contains ( 'Here are some of the tools we use' )
53+ } )
54+ it ( 'About should drop down to display PWA White Paper and navigate to PWA White Paper page' , function ( ) {
55+ cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
56+ cy . get ( '.navbar' ) . contains ( 'PWA White Paper' ) . click ( )
57+ cy . url ( ) . should ( 'include' , '/resources/pwa-white-paper' )
58+ cy . contains ( 'What is a PWA and is it right for you?' )
59+ } )
60+ } ) ;
5661 } )
57- describe ( 'Nav Bar Navigation (Mobile)' , function ( ) {
62+
63+ describe ( 'Nav Bar Navigation (Mobile)' , function ( ) {
5864 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
65+ cy . viewport ( 960 , 600 ) // Sets view to large to enable nav menu
66+ cy . get ( '.navbar-toggler' ) . click ( ) // expands nav menu before each test
6167 } )
62- it ( 'Nav menu should collapse' , function ( ) {
68+ it ( 'Nav menu should collapse' , function ( ) {
6369 cy . wait ( 2000 )
6470 cy . get ( '.navbar-toggler' ) . click ( )
65- //cy.get('.navbar').should('not.be.visible', 'About')
6671 } )
67- it ( 'Home on nav Bar should redirect to home page' , function ( ) {
72+ it ( 'Home on nav Bar should redirect to home page' , function ( ) {
6873 cy . get ( '.navbar' ) . contains ( 'Home' ) . click ( )
6974 cy . url ( ) . should ( 'include' , '/' )
70- cy . contains ( 'Creating Digital Experiences' )
71- } )
72- it ( 'Services should drop down to display Development and navigate to developer page' , function ( ) {
73- cy . get ( '.navbar' ) . contains ( 'Services' ) . click ( )
74- cy . get ( '.navbar' ) . contains ( 'Development' ) . click ( )
75- cy . url ( ) . should ( 'include' , '/app-developer' )
76- cy . contains ( 'Your Go-To App Developer' )
77- } )
78- it ( 'Services should drop down to display UI/UX Design and navigate to design page' , function ( ) {
79- cy . get ( '.navbar' ) . contains ( 'Services' ) . click ( )
80- cy . get ( '.navbar' ) . contains ( 'UX/UI Design' ) . click ( )
81- cy . url ( ) . should ( 'include' , '/app-designer' )
82- cy . contains ( 'UI/UX App Designer' )
83- } )
84- it ( 'Services should drop down to display Consulting and navigate to consulting page' , function ( ) {
85- cy . get ( '.navbar' ) . contains ( 'Services' ) . click ( )
86- cy . get ( '.navbar' ) . contains ( 'Consulting' ) . click ( )
87- cy . url ( ) . should ( 'include' , '/startup-consulting' )
88- cy . contains ( 'Consulting for all Industries' )
89- } )
90- it ( 'About should drop down to display Meet the team and navigate to about page' , function ( ) {
91- cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
92- cy . get ( '.navbar' ) . contains ( 'Meet the team' ) . click ( )
93- cy . url ( ) . should ( 'include' , '/about' )
94- cy . contains ( 'We Are Passionate About Technology and Design' )
95- } )
96- it ( 'About should drop down to display Juntoscope Case Study and navigate to juntoscope page' , function ( ) {
97- cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
98- cy . get ( '.navbar' ) . contains ( 'Juntoscope Case Study' ) . click ( )
99- cy . url ( ) . should ( 'include' , '/juntoscope' )
100- cy . contains ( 'Case Study' )
101- } )
102- it ( 'About should drop down to display Toolbox and navigate to Toolbox page' , function ( ) {
103- cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
104- cy . get ( '.navbar' ) . contains ( 'Toolbox' ) . click ( )
105- cy . url ( ) . should ( 'include' , '/toolbox' )
106- cy . contains ( 'Here are some of the tools we use' )
107- } )
108- it ( 'About should drop down to display PWA White Paper and navigate to PWA White Paper page' , function ( ) {
109- cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
110- cy . get ( '.navbar' ) . contains ( 'PWA White Paper' ) . click ( )
111- cy . url ( ) . should ( 'include' , '/resources/pwa-white-paper' )
112- cy . contains ( 'What is a PWA and is it right for you?' )
11375 } )
114- } )
11576
116- describe ( 'Header' , function ( ) {
117- it ( 'Header should display with appropriate text content within it' , function ( ) {
118- const h2Content = 'Let\'s Work Together'
77+ describe ( 'Services' , function ( ) {
78+ beforeEach ( ( ) => {
79+ cy . get ( '.container > #navbarSupportedContent' ) . contains ( 'Services' ) ;
80+ cy . get ( '.container > #navbarSupportedContent > .navbar-nav > .nav-item > #navbarDropdown' ) . click ( ) ;
81+ } )
82+ it ( 'Services should drop down to display Development and navigate to developer page' , function ( ) {
83+ cy . get ( '.navbar-nav > .nav-item:nth-child(2) > .dropdown-menu > .hydrated:nth-child(1) > .nav-link' ) . contains ( 'Development' ) . click ( )
84+ cy . url ( ) . should ( 'include' , '/app-developer' )
85+ } )
86+ it ( 'Services should drop down to display Design and navigate to design page' , function ( ) {
87+ cy . get ( '.navbar-nav > .nav-item:nth-child(2) > .dropdown-menu > .hydrated:nth-child(2) > .nav-link' ) . contains ( 'Design' ) . click ( )
88+ cy . url ( ) . should ( 'include' , '/app-designer' )
89+ } )
90+ it ( 'Services should drop down to display Consulting and navigate to consulting page' , function ( ) {
91+ cy . get ( '.navbar-nav > .nav-item:nth-child(2) > .dropdown-menu > .hydrated:nth-child(3) > .nav-link' ) . contains ( 'Consulting' ) . click ( ) ;
92+ cy . url ( ) . should ( 'include' , '/startup-consulting' ) ;
93+ } )
94+ } ) ;
95+
96+ describe ( 'About' , function ( ) {
97+ it ( 'About should drop down to display Meet the team and navigate to about page' , function ( ) {
98+ cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
99+ cy . get ( '.navbar' ) . contains ( 'Meet the team' ) . click ( )
100+ cy . url ( ) . should ( 'include' , '/about' )
101+ cy . contains ( 'We Are Passionate About Technology and Design' )
102+ } )
103+ it ( 'About should drop down to display Juntoscope Case Study and navigate to juntoscope page' , function ( ) {
104+ cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
105+ cy . get ( '.navbar' ) . contains ( 'Juntoscope Case Study' ) . click ( )
106+ cy . url ( ) . should ( 'include' , '/juntoscope' )
107+ cy . contains ( 'Case Study' )
108+ } )
109+ it ( 'About should drop down to display Toolbox and navigate to Toolbox page' , function ( ) {
110+ cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
111+ cy . get ( '.navbar' ) . contains ( 'Toolbox' ) . click ( )
112+ cy . url ( ) . should ( 'include' , '/toolbox' )
113+ cy . contains ( 'Here are some of the tools we use' )
114+ } )
115+ it ( 'About should drop down to display PWA White Paper and navigate to PWA White Paper page' , function ( ) {
116+ cy . get ( '.navbar' ) . contains ( 'About' ) . click ( )
117+ cy . get ( '.navbar' ) . contains ( 'PWA White Paper' ) . click ( )
118+ cy . url ( ) . should ( 'include' , '/resources/pwa-white-paper' )
119+ cy . contains ( 'What is a PWA and is it right for you?' )
120+ } )
121+ } ) ;
122+ } ) ;
123+
124+ describe ( 'Header' , function ( ) {
125+ it ( 'Header should display with appropriate text content within it' , function ( ) {
126+ const h2Content = 'Let\'s Work Together'
119127 const pContent = 'Request Free Quote'
120128
121129 cy . get ( 'header' ) . should ( 'exist' ) . and ( 'be.visible' )
122130 cy . get ( '.hero' ) . contains ( h2Content ) . and ( 'be.visible' )
123131 cy . get ( '.hero' ) . contains ( pContent ) . and ( 'be.visible' )
124132 } )
125133
126- it ( 'Should contain a Request Now button that scrolls to the form on click' , function ( ) {
134+ it ( 'Should contain a Request Now button that scrolls to the form on click' , function ( ) {
127135 cy . get ( 'header' )
128136 . find ( '.btn' )
129137 . should ( 'exist' )
@@ -134,7 +142,7 @@ describe('Contact Page', function () {
134142 } )
135143 } )
136144
137- describe ( 'Contact Form' , function ( ) {
145+ describe ( 'Contact Form' , function ( ) {
138146 let nameField ;
139147 let emailField ;
140148 let phoneField ;
@@ -149,56 +157,56 @@ describe('Contact Page', function () {
149157 cy . get ( '@submitBtn' ) . click ( )
150158 } )
151159
152- it ( 'Should show a success message on submit when all form values have been filled out' , function ( ) {
160+ it ( 'Should show a success message on submit when all form values have been filled out' , function ( ) {
153161 cy . wait ( 2000 )
154162 cy . contains ( 'Thank you' )
155163 } )
156164
157- it ( 'All fields should be clear after successful form submission' , function ( ) {
165+ it ( 'All fields should be clear after successful form submission' , function ( ) {
158166 cy . get ( 'input[name=name]' ) . should ( 'have.value' , 'Testing' )
159167 cy . get ( 'input[name=email]' ) . should ( 'have.value' , 'testEmail@gmail.com' )
160168 cy . get ( 'input[name=phone]' ) . should ( 'have.value' , '1459341234' )
161169 cy . get ( 'input[name=message]' ) . should ( 'have.value' , 'This is a test message' )
162170 } )
163171 } )
164- describe ( 'Unsucessful form submission' , function ( ) {
172+ describe ( 'Unsucessful form submission' , function ( ) {
165173 it ( 'DOM should not show success message when all fields of the form are not filled out' , function ( ) {
166174 nameField = cy . get ( 'input[name=name]' ) . type ( 'Test Name' )
167175 cy . get ( '@submitBtn' ) . should ( 'be.disabled' )
168176 } )
169177 } )
170178 } )
171179
172- describe ( 'Footer Navigation' , function ( ) {
180+ describe ( 'Footer Navigation' , function ( ) {
173181 it ( 'Navigate to SLA page' , function ( ) {
174182 cy . contains ( 'Read our SLA' ) . click ( )
175183 cy . url ( ) . should ( 'include' , '/service-level-agreement' )
176184 } )
177185 it ( 'Navigate to Developer page' , function ( ) {
178- cy . contains ( 'I\'m a developer' ) . click ( )
179- cy . url ( ) . should ( 'include' , '/opportunities/develop' )
186+ // cy.contains('I\'m a developer').click()
187+ // cy.url().should('include', '/opportunities/develop')
180188 } )
181189 it ( 'Navigate to Design page' , function ( ) {
182- cy . contains ( 'I\'m a designer' ) . click ( )
183- cy . url ( ) . should ( 'include' , '/opportunities/design' )
190+ // cy.contains('I\'m a designer').click()
191+ // cy.url().should('include', '/opportunities/design')
184192 } )
185193 it ( 'Navigates to StartupJunto Registration Page' , function ( ) {
186- cy . contains ( 'Register Today!' ) . click ( )
194+ // cy.contains('Register Today!').click()
187195 } )
188196 it ( 'Navigates to OpenForge Twitter' , function ( ) {
189197 cy . contains ( '@OpenForge_US' ) . click ( )
190198 } )
191199 it ( 'Navigates to OpenForge Facebook' , function ( ) {
192- cy . contains ( 'OpenForge_US' ) . click ( )
200+ cy . contains ( 'OpenForge_US' ) . click ( )
193201 } )
194202 it ( 'Navigates to OpenForge Linkedin' , function ( ) {
195- cy . contains ( 'OpenForge_US' ) . click ( )
203+ cy . contains ( 'OpenForge_US' ) . click ( )
196204 } )
197205 it ( 'Navigates to OpenForge Instagram' , function ( ) {
198- cy . contains ( '@OpenForgeTeam' ) . click ( )
206+ cy . contains ( '@OpenForgeTeam' ) . click ( )
199207 } )
200208 //it('Open native mail to contact Hello@openforge.io', function () {
201- //cy.contains('hello@openforge.io').click()
202- //})
203- } )
204- } )
209+ //cy.contains('hello@openforge.io').click()
210+ //})
211+ } )
212+ } )
0 commit comments