diff --git a/components/Nav.js b/components/Nav.js index 2069bb2..51fc9dc 100644 --- a/components/Nav.js +++ b/components/Nav.js @@ -40,11 +40,15 @@ const Nav = (props) => { )} - Pricing + + Pricing + - Contact Us + + Contact Us + {props.user ? ( @@ -55,7 +59,9 @@ const Nav = (props) => { ) : ( - Login + + Login + )} @@ -72,7 +78,7 @@ const Nav = (props) => {
{NavMenu}
-
+
diff --git a/components/Pricing.js b/components/Pricing.js index 605dd59..c052ecb 100644 --- a/components/Pricing.js +++ b/components/Pricing.js @@ -119,8 +119,8 @@ const Pricing = () => {
)} -
-
+
+

Personal

@@ -159,7 +159,7 @@ const Pricing = () => {

-
+

Team

@@ -208,7 +208,7 @@ const Pricing = () => {

-
+

Pro

diff --git a/cypress.json b/cypress.json index 2e10227..0db2347 100644 --- a/cypress.json +++ b/cypress.json @@ -1,3 +1,5 @@ { - "baseUrl": "http://localhost:3000" + "baseUrl": "http://localhost:3000", + "viewportWidth": 1280, + "viewportHeight": 800 } \ No newline at end of file diff --git a/cypress/integration/basic.spec.js b/cypress/integration/basic.spec.js index 4c728c5..4ba32da 100644 --- a/cypress/integration/basic.spec.js +++ b/cypress/integration/basic.spec.js @@ -1,9 +1,33 @@ -describe('Homepage Test', () => { - it('Visits the homepage', () => { - cy.visit('') - }) - it('Visits the pricing page', () => { - cy.visit('/pricing') - }) - }) - \ No newline at end of file +describe("Basic Test", () => { + context("Desktop resolution", () => { + // run these tests as if in a desktop + // browser with a 720p monitor + + it("Visits the homepage and nav links", () => { + cy.viewport(1280, 720); + cy.visit(""); + + cy.get("nav").contains("Pricing").click(); + cy.url().should("include", "/pricing"); + + cy.get("nav").contains("Contact").click(); + cy.url().should("include", "/contact"); + }); + }); + + context("Mobile resolution", () => { + // run these tests as if in a desktop + // browser with a 720p monitor + + it("Visits the homepage and nav links", () => { + cy.viewport(680, 720); + cy.visit(""); + cy.get("[data-cy=dropdown]").click(); + cy.get("[data-cy=dropdown]").contains("Pricing").click(); + cy.url().should("include", "/pricing"); + cy.get("[data-cy=dropdown]").click(); + cy.get("[data-cy=dropdown]").contains("Contact").click(); + cy.url().should("include", "/contact"); + }); + }); +});