From 28c539856a541a101d262f72d419930acb343c24 Mon Sep 17 00:00:00 2001 From: Ashmit Jagtap Date: Sun, 17 Nov 2024 02:55:14 +0530 Subject: [PATCH 1/2] feat: add cypress (#386) * Added cypress - Initial commit * added landing page test * added nav link tests * merge head * test * feat: update agenda times (#354) * feat: add postman logo in financial support section (#357) Co-authored-by: V Thulisile Sibanda <66913810+thulieblack@users.noreply.github.com>%0ACo-authored-by: asyncapi-bot %0ACo-authored-by: prashantrai-30 * add-ticket-link (#358) * feat: update agenda (#361) * feat: update ticket cards (#359) Co-authored-by: acethecreator * feat: added the CFP form (#348) * initial commit for CFP and speakers form * changes to the form * removed comments * added example env * changes to apply btn * configured the speakers register API * changed path for CFP * url correction * added Online conference in the Navbar * Made CFP banner and details json dependent * update cfp page * Update dates * Update eventDetails.js * test commit * configured to build * temp changes to form * changes to form style * changed email message * changed the email message * changed cfp dates * changes to cfp css * changes to online page * deleted useless components * Update README.md * Update README.md * added speakers guideline component * changes to guidelines * changed carousel image * changes for production * changes to env names * testing changes * test 2 * test 3 * test 4 * test 5 * test 6 * changes to netlify.toml * test 1 * test 2 * test 3 * test 4 --------- Co-authored-by: asyncapi-bot Co-authored-by: V Thulisile Sibanda <66913810+thulieblack@users.noreply.github.com> Co-authored-by: Ace <40604284+AceTheCreator@users.noreply.github.com> Co-authored-by: acethecreator * chore(deps): bump axios from 1.6.0 to 1.7.4 (#368) * Revert "feat: update ticket cards (#359)" This reverts commit 066c265efd450829accb10f1a0c77545322205ad. * revert netlify * ticket update * fix-button (#369) * fix: added online cfp form (#371) * added online cfp form * testing different toml configuration * ehanced config * testing new config * fixed typo * fixed cfp date * fixed smtp pass typo (#372) * fix issue #356 (#374) * Dropdown bug fixed (#353) Co-authored-by: Cody's Dad <40604284+AceTheCreator@users.noreply.github.com> * feat: update speakers.json (#383) * Merge master * package lock changes * changes to package lock * fix bug in home * added navbar mobile tests * added base venue tests * added cfp test * package-lock changes * added cypress test * changes to setup versions * changes to regex * test commit --------- Co-authored-by: V Thulisile Sibanda <66913810+thulieblack@users.noreply.github.com> Co-authored-by: prashantrai-30 Co-authored-by: V Thulisile Sibanda <66913810+thulieblack@users.noreply.github.com>%0ACo-authored-by: asyncapi-bot %0ACo-authored-by: prashantrai-30 Co-authored-by: acethecreator Co-authored-by: asyncapi-bot Co-authored-by: Ace <40604284+AceTheCreator@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Saurbh Kumar Co-authored-by: Ujjwal Tyagi --- .github/workflows/cypress-test.yml | 27 + components/About/about.js | 4 +- components/Agenda/agenda.js | 2 +- components/Buttons/button.js | 3 +- components/Footer/footer.js | 10 +- components/Form/Cfp/stepFour.js | 4 +- components/Form/Cfp/stepOne.js | 10 +- components/Form/Cfp/stepThree.js | 5 +- components/Form/Cfp/stepTwo.js | 13 +- components/Form/paper.js | 2 +- components/Form/select.js | 3 +- components/Form/subscription.js | 4 +- components/Header/header.js | 3 +- components/Navbar/navDrop.js | 10 +- components/Navbar/navbar.js | 16 +- components/Speaker/guideline.js | 2 +- components/Speaker/speaker.js | 1 + components/Sponsors/sponsors.js | 2 +- cypress.config.js | 14 + cypress/e2e/Footer.cy.js | 55 + cypress/e2e/Landing.cy.js | 43 + cypress/e2e/Navbar.cy.js | 155 ++ cypress/e2e/Venue.cy.js | 59 + cypress/fixtures/example.json | 5 + cypress/support/commands.js | 29 + cypress/support/e2e.js | 20 + package-lock.json | 3043 ++++++++++++++++------------ package.json | 4 +- pages/index.js | 2 + pages/venue/[id].js | 2 +- 30 files changed, 2169 insertions(+), 1383 deletions(-) create mode 100644 .github/workflows/cypress-test.yml create mode 100644 cypress.config.js create mode 100644 cypress/e2e/Footer.cy.js create mode 100644 cypress/e2e/Landing.cy.js create mode 100644 cypress/e2e/Navbar.cy.js create mode 100644 cypress/e2e/Venue.cy.js create mode 100644 cypress/fixtures/example.json create mode 100644 cypress/support/commands.js create mode 100644 cypress/support/e2e.js diff --git a/.github/workflows/cypress-test.yml b/.github/workflows/cypress-test.yml new file mode 100644 index 00000000..8a6b5981 --- /dev/null +++ b/.github/workflows/cypress-test.yml @@ -0,0 +1,27 @@ +name: Cypress End-to-End test + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + cypress-run: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Cypress run + uses: cypress-io/github-action@v6 + with: + build: npm run build + start: npm start diff --git a/components/About/about.js b/components/About/about.js index 6e330421..dea613ba 100644 --- a/components/About/about.js +++ b/components/About/about.js @@ -6,7 +6,7 @@ import Button from '../Buttons/button'; import Image from 'next/image'; function About() { return ( -
+
@@ -27,7 +27,7 @@ function About() { We are currently looking for sponsors, for more details please read our Sponsorship Prospectus. -
+
+
diff --git a/components/Buttons/button.js b/components/Buttons/button.js index 72545ef8..aa2d4405 100644 --- a/components/Buttons/button.js +++ b/components/Buttons/button.js @@ -1,9 +1,10 @@ import React from 'react' -function Button({className, children, overlay, onClick, type, disabled}) { +function Button({className, children, overlay, onClick, type, disabled,test}) { return (
diff --git a/components/Form/Cfp/stepOne.js b/components/Form/Cfp/stepOne.js index 2086f073..1b0093ab 100644 --- a/components/Form/Cfp/stepOne.js +++ b/components/Form/Cfp/stepOne.js @@ -4,7 +4,7 @@ import Button from "../../Buttons/button"; function StepOne({ setStep, setForm, data }) { return ( -
setStep(e, 2)}> + setStep(e, 2)} data-test="step-one">

Let's start with your name

@@ -21,6 +21,7 @@ function StepOne({ setStep, setForm, data }) { border: "1px solid #E50E99", }} onChange={(e) => setForm({ ...data, Fullname: e.target.value })} + data-test="step-one-name" />
Email address
setForm({ ...data, Email: e.target.value })} + data-test="step-one-email" />
Bio