From ca9ee1af97603eb901df0cbb49b2fb73fed06e71 Mon Sep 17 00:00:00 2001 From: icycoldveins Date: Thu, 21 Aug 2025 03:46:36 -0400 Subject: [PATCH 1/2] test: add mobile sidebar navigation test for Join Team page - Implements Cypress test for mobile sidebar navigation to Join Team view - Test clicks hamburger menu, selects Join Team, and verifies header text - Uses data-cy attributes for reliable element targeting Closes #491 --- cypress/e2e/mobile/menuNavigation.cy.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/mobile/menuNavigation.cy.js b/cypress/e2e/mobile/menuNavigation.cy.js index 0f87311e..33cd1d00 100644 --- a/cypress/e2e/mobile/menuNavigation.cy.js +++ b/cypress/e2e/mobile/menuNavigation.cy.js @@ -13,7 +13,16 @@ describe("menu navigation", () => { }); it("should successfully show the join team content", () => { - // TODO + cy.viewport('iphone-x'); + + // Click the hamburger menu button + cy.get('[data-cy=head-sidebar-button]').click(); + + // Click the "Join the team" button + cy.get('[data-cy=sidebar-jointeam-button]').click(); + + // Verify the header text displays "Join the team" + cy.get('[data-cy=jointeam-header]').should('have.text', 'Join the team'); }); it("should successfully show the contact form and send feedback", () => { From e4f33578a44b9c2fddff5d8383f48a80c8263aa2 Mon Sep 17 00:00:00 2001 From: icycoldveins Date: Mon, 15 Sep 2025 16:26:01 -0700 Subject: [PATCH 2/2] test: implement sidebar navigation tests for mobile and desktop Implements Cypress tests for sidebar navigation functionality on both mobile and desktop views. Tests verify navigation to About Us, Join Team, and Contact Form pages. Addresses: - #490 Mobile - Sidebar Navigation to About Us - #491 Mobile - Sidebar Navigation to Join Team - #492 Mobile - Sidebar Navigation to Contact Form - #482 Desktop - Sidebar Navigation to Join Team - #483 Desktop - Sidebar Navigation to Contact Form --- cypress/e2e/desktop/menuNavigation.cy.js | 15 ++++++++++---- cypress/e2e/mobile/menuNavigation.cy.js | 26 ++++++++++++++++++++---- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/cypress/e2e/desktop/menuNavigation.cy.js b/cypress/e2e/desktop/menuNavigation.cy.js index a659f8c2..bec13120 100644 --- a/cypress/e2e/desktop/menuNavigation.cy.js +++ b/cypress/e2e/desktop/menuNavigation.cy.js @@ -19,11 +19,18 @@ describe('menu navigation', () => { }); it('should successfully show the join team content', () => { - // TODO + // Click the join team sidebar button + cy.get('[data-cy=sidebar-jointeam-button]').click(); + + cy.get('[data-cy=jointeam-header]').should('have.text', 'Join the team'); }); - it('should successfully show the contact form and send feedback', () => { - // TODO - // Make form submission send to a test destination for validation + it('should successfully show the contact form', () => { + // Click the contact sidebar button + cy.get('[data-cy=sidebar-contact-button]').click(); + + // Verify the iframe is present + cy.get('iframe[title="Contact Us"]').should('exist'); + cy.get('iframe[title="Contact Us"]').should('have.attr', 'src').and('include', 'airtable.com'); }); }); diff --git a/cypress/e2e/mobile/menuNavigation.cy.js b/cypress/e2e/mobile/menuNavigation.cy.js index 33cd1d00..a7f37d15 100644 --- a/cypress/e2e/mobile/menuNavigation.cy.js +++ b/cypress/e2e/mobile/menuNavigation.cy.js @@ -9,7 +9,16 @@ describe("menu navigation", () => { }); it("should successfully show about us content", () => { - // TODO + cy.viewport('iphone-x'); + + // Click the hamburger menu button + cy.get('[data-cy=head-sidebar-button]').click(); + + // Click the "About" button + cy.get('[data-cy=sidebar-about-button]').click(); + + // Verify the header text displays "About PHLASK" + cy.get('[data-cy=about-header]').should('have.text', 'About PHLASK'); }); it("should successfully show the join team content", () => { @@ -25,8 +34,17 @@ describe("menu navigation", () => { cy.get('[data-cy=jointeam-header]').should('have.text', 'Join the team'); }); - it("should successfully show the contact form and send feedback", () => { - // TODO - // Make form submission send to a test destination for validation + it("should successfully show the contact form", () => { + cy.viewport('iphone-x'); + + // Click the hamburger menu button + cy.get('[data-cy=head-sidebar-button]').click(); + + // Click the "Contact" button + cy.get('[data-cy=sidebar-contact-button]').click(); + + // Verify the iframe is present + cy.get('iframe[title="Contact Us"]').should('exist'); + cy.get('iframe[title="Contact Us"]').should('have.attr', 'src').and('include', 'airtable.com'); }); });