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");
+ });
+ });
+});