@@ -123,169 +123,4 @@ describe('Contact Page', function() {
123123 . and ( 'be.visible' ) ;
124124 } ) ;
125125 } ) ;
126- /*describe('Nav Bar Navigation (Desktop)', function () {
127- // TODO -> Test suite for the blog link in nav bar.
128- it('Home on nav bar should redirect to home page', function () {
129- cy.get('.navbar').contains('Home').click()
130- cy.url().should('include', '/')
131- })
132- describe('Services', function () {
133- beforeEach(() => {
134- // Gets Services text
135- cy.get('.container > #navbarSupportedContent').contains('Services');
136- // Clicks services dropdown arrow
137- cy.get('.container > #navbarSupportedContent > .navbar-nav > .nav-item > #navbarDropdown').click();
138- })
139- it('Services should drop down to display Development and navigate to developer page', function () {
140- cy.get('.navbar-nav > .nav-item:nth-child(2) > .dropdown-menu > .hydrated:nth-child(1) > .nav-link').contains('Development').click()
141- cy.url().should('include', '/app-developer')
142- })
143- it('Services should drop down to display Design and navigate to design page', function () {
144- cy.get('.navbar-nav > .nav-item:nth-child(2) > .dropdown-menu > .hydrated:nth-child(2) > .nav-link').contains('Design').click();
145- cy.url().should('include', '/app-designer');
146- })
147- it('Services should drop down to display Consulting and navigate to consulting page', function () {
148- cy.get('.navbar-nav > .nav-item:nth-child(2) > .dropdown-menu > .hydrated:nth-child(3) > .nav-link').contains('Consulting').click()
149- cy.url().should('include', '/startup-consulting')
150- });
151- });
152-
153- describe('About', function () {
154- it('About should drop down to display Meet the team and navigate to about page', function () {
155- cy.get('.navbar').contains('About').click()
156- cy.get('.navbar').contains('Meet the team').click()
157- cy.url().should('include', '/about')
158- cy.contains('We Are Passionate About Technology and Design')
159- })
160- it('About should drop down to display Juntoscope Case Study and navigate to juntoscope page', function () {
161- cy.get('.navbar').contains('About').click()
162- cy.get('.navbar').contains('Juntoscope Case Study').click()
163- cy.url().should('include', '/juntoscope')
164- cy.contains('Case Study')
165- })
166- it('About should drop down to display Toolbox and navigate to Toolbox page', function () {
167- cy.get('.navbar').contains('About').click()
168- cy.get('.navbar').contains('Toolbox').click()
169- cy.url().should('include', '/toolbox')
170- cy.contains('Here are some of the tools we use')
171- })
172- it('About should drop down to display PWA White Paper and navigate to PWA White Paper page', function () {
173- cy.get('.navbar').contains('About').click()
174- cy.get('.navbar').contains('PWA White Paper').click()
175- cy.url().should('include', '/resources/pwa-white-paper')
176- cy.contains('What is a PWA and is it right for you?')
177- })
178- });
179- })
180-
181- describe('Nav Bar Navigation (Mobile)', function () {
182- beforeEach(() => {
183- cy.viewport(960, 600) // Sets view to large to enable nav menu
184- cy.get('.navbar-toggler').click() // expands nav menu before each test
185- })
186- it('Nav menu should collapse', function () {
187- cy.wait(2000)
188- cy.get('.navbar-toggler').click()
189- })
190- it('Home on nav Bar should redirect to home page', function () {
191- cy.get('.navbar').contains('Home').click()
192- cy.url().should('include', '/')
193- })
194-
195- describe('Services', function () {
196- beforeEach(() => {
197- cy.get('.container > #navbarSupportedContent').contains('Services');
198- cy.get('.container > #navbarSupportedContent > .navbar-nav > .nav-item > #navbarDropdown').click();
199- })
200- it('Services should drop down to display Development and navigate to developer page', function () {
201- cy.get('.navbar-nav > .nav-item:nth-child(2) > .dropdown-menu > .hydrated:nth-child(1) > .nav-link').contains('Development').click()
202- cy.url().should('include', '/app-developer')
203- })
204- it('Services should drop down to display Design and navigate to design page', function () {
205- cy.get('.navbar-nav > .nav-item:nth-child(2) > .dropdown-menu > .hydrated:nth-child(2) > .nav-link').contains('Design').click()
206- cy.url().should('include', '/app-designer')
207- })
208- it('Services should drop down to display Consulting and navigate to consulting page', function () {
209- cy.get('.navbar-nav > .nav-item:nth-child(2) > .dropdown-menu > .hydrated:nth-child(3) > .nav-link').contains('Consulting').click();
210- cy.url().should('include', '/startup-consulting');
211- })
212- });
213-
214- describe('About', function () {
215- it('About should drop down to display Meet the team and navigate to about page', function () {
216- cy.get('.navbar').contains('About').click()
217- cy.get('.navbar').contains('Meet the team').click()
218- cy.url().should('include', '/about')
219- cy.contains('We Are Passionate About Technology and Design')
220- })
221- it('About should drop down to display Juntoscope Case Study and navigate to juntoscope page', function () {
222- cy.get('.navbar').contains('About').click()
223- cy.get('.navbar').contains('Juntoscope Case Study').click()
224- cy.url().should('include', '/juntoscope')
225- cy.contains('Case Study')
226- })
227- it('About should drop down to display Toolbox and navigate to Toolbox page', function () {
228- cy.get('.navbar').contains('About').click()
229- cy.get('.navbar').contains('Toolbox').click()
230- cy.url().should('include', '/toolbox')
231- cy.contains('Here are some of the tools we use')
232- })
233- it('About should drop down to display PWA White Paper and navigate to PWA White Paper page', function () {
234- cy.get('.navbar').contains('About').click()
235- cy.get('.navbar').contains('PWA White Paper').click()
236- cy.url().should('include', '/resources/pwa-white-paper')
237- cy.contains('What is a PWA and is it right for you?')
238- })
239- });
240- });
241-
242- describe('Header', function () {
243- it('Header should display with appropriate text content within it', function () {
244- const h2Content = 'Let\'s Work Together'
245- const pContent = 'Request Free Quote'
246-
247- cy.get('header').should('exist').and('be.visible')
248- cy.get('.hero').contains(h2Content).and('be.visible')
249- cy.get('.hero').contains(pContent).and('be.visible')
250- })
251-
252- it('Should contain a Request Now button that scrolls to the form on click', function () {
253- cy.get('header')
254- .find('.btn')
255- .should('exist')
256- .and('be.visible')
257- .and('contain', 'Request Free Quote')
258- .click()
259- cy.get('#second-content').click()
260- })
261- })*/
262-
263- // describe('Contact Form', function () {
264- // let nameField;
265- // let emailField;
266- // let phoneField;
267- // let messageField;
268-
269- // describe('Successful form submission', function () {
270- // beforeEach(() => {
271- // nameField = cy.get('input[name=name]').type('Testing');
272- // emailField = cy.get('input[name=email]').type('testEmail@gmail.com');
273- // phoneField = cy.get('input[name=phone]').type('1459341234');
274- // messageField = cy.get('input[name=message]').type('This is a test message');
275- // cy.get('@submitBtn').click();
276- // });
277-
278- // it('Should show a success message on submit when all form values have been filled out', function () {
279- // cy.wait(9000);
280- // cy.get('[data-cy=sub]').screenshot('exist'); //if the image is rendered the submit is done
281- // });
282-
283- // });
284- // describe('Unsucessful form submission', function () {
285- // it('DOM should not show success message when all fields of the form are not filled out', function () {
286- // nameField = cy.get('input[name=name]').type('Test Name');
287- // cy.get('@submitBtn').should('be.disabled');
288- // });
289- // });
290- // });
291126} ) ;
0 commit comments