From b15709af78a19cc63d56fbfaad4f44811586191f Mon Sep 17 00:00:00 2001 From: Aahna Ashina <95955389+aahna-ashina@users.noreply.github.com> Date: Tue, 27 Aug 2024 11:02:52 +0700 Subject: [PATCH] test: add cypress test for ipfs agreement link #276 --- ui/components/GradientLink.tsx | 3 ++- ui/cypress/e2e/join.cy.ts | 14 ++++++++++++++ ui/pages/join.tsx | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 ui/cypress/e2e/join.cy.ts diff --git a/ui/components/GradientLink.tsx b/ui/components/GradientLink.tsx index 688637e..7065d3d 100644 --- a/ui/components/GradientLink.tsx +++ b/ui/components/GradientLink.tsx @@ -1,9 +1,10 @@ import Link from 'next/link' import React from 'react' -export default function GradientLink({ text, href, textSize }: any) { +export default function GradientLink({ id, text, href, textSize }: any) { return ( { + + it('click agreement link', () => { + cy.visit('/join') + + cy.get('#agreementLink').click(); + + // Expect the IPFS agreement text to be opened in a new browser window + // Expected text: "By becoming a Nation3 citizen, I hereby agree to ..." + // TO DO + }) +}) + +export {} diff --git a/ui/pages/join.tsx b/ui/pages/join.tsx index da9b5d8..f86ecad 100644 --- a/ui/pages/join.tsx +++ b/ui/pages/join.tsx @@ -150,6 +150,7 @@ export default function Join() {
{nationPassportAgreementStatement}:{' '}