Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add cypress #386

Merged
merged 52 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
73ffa1e
Added cypress - Initial commit
ashmit-coder Jun 8, 2024
41c6a8c
Merge branch 'master' of https://github.com/asyncapi/conference-websi…
ashmit-coder Jun 24, 2024
9f7515e
Merge branch 'master' of https://github.com/asyncapi/conference-websi…
ashmit-coder Jun 30, 2024
6ea026f
added landing page test
ashmit-coder Jul 12, 2024
3f48b9c
Merge branch 'master' of https://github.com/asyncapi/conference-websi…
ashmit-coder Aug 5, 2024
4d7905b
added nav link tests
ashmit-coder Aug 7, 2024
e7ed087
merge head
ashmit-coder Aug 11, 2024
299c6e8
test
ashmit-coder Aug 11, 2024
15e3de7
feat: update agenda times (#354)
thulieblack Aug 19, 2024
2fe6351
feat: add postman logo in financial support section (#357)
prashantrai-30 Aug 21, 2024
5ba09d9
add-ticket-link (#358)
thulieblack Aug 21, 2024
35d4d6a
feat: update agenda (#361)
thulieblack Aug 22, 2024
dcc8619
feat: update ticket cards (#359)
thulieblack Aug 23, 2024
7cb8ec0
feat: added the CFP form (#348)
ashmit-coder Aug 30, 2024
48cfd5d
chore(deps): bump axios from 1.6.0 to 1.7.4 (#368)
dependabot[bot] Aug 30, 2024
cad076c
Revert "feat: update ticket cards (#359)"
AceTheCreator Aug 30, 2024
f4e2876
revert netlify
AceTheCreator Aug 30, 2024
10822a4
ticket update
AceTheCreator Aug 30, 2024
48b86ca
fix-button (#369)
thulieblack Sep 2, 2024
fed3737
fix: added online cfp form (#371)
AceTheCreator Sep 2, 2024
709ec56
fixed smtp pass typo (#372)
AceTheCreator Sep 4, 2024
a136c8c
fix issue #356 (#374)
Saurabhchaudhary9799 Sep 5, 2024
9e76f58
Dropdown bug fixed (#353)
ujjwal105 Sep 5, 2024
5338df0
feat: update speakers.json (#383)
thulieblack Sep 6, 2024
b808f3d
Merge master
ashmit-coder Sep 9, 2024
9250c46
package lock changes
ashmit-coder Sep 9, 2024
4350254
Merge branch 'master' of https://github.com/asyncapi/conference-websi…
ashmit-coder Sep 9, 2024
df52147
changes to package lock
ashmit-coder Sep 9, 2024
4498898
fix bug in home
ashmit-coder Sep 9, 2024
e5ba790
Merge branch 'master' into feat/add-testing-framework
AceTheCreator Sep 16, 2024
4d522ab
added navbar mobile tests
ashmit-coder Sep 16, 2024
c0b297c
Merge branch 'master' of https://github.com/asyncapi/conference-websi…
ashmit-coder Sep 16, 2024
8f0c446
Merge branch 'feat/add-testing-framework' of https://github.com/ashmi…
ashmit-coder Sep 16, 2024
884c155
Merge branch 'master' of https://github.com/asyncapi/conference-websi…
ashmit-coder Sep 19, 2024
6e17151
added base venue tests
ashmit-coder Sep 19, 2024
c1a7909
added cfp test
ashmit-coder Sep 26, 2024
a79a826
Merge branch 'master' of https://github.com/asyncapi/conference-websi…
ashmit-coder Sep 26, 2024
895e86e
Merge branch 'master' of https://github.com/asyncapi/conference-websi…
ashmit-coder Oct 9, 2024
9a77e49
package-lock changes
ashmit-coder Oct 9, 2024
ed428bc
Merge branch 'master' of https://github.com/asyncapi/conference-websi…
ashmit-coder Oct 17, 2024
aa2e6c7
added cypress test
ashmit-coder Oct 17, 2024
e0a84c3
changes to setup versions
ashmit-coder Oct 21, 2024
fae85c8
Merge branch 'master' into feat/add-testing-framework
ashmit-coder Oct 29, 2024
47019f6
changes to regex
ashmit-coder Oct 29, 2024
ab8aeb2
Merge branch 'master' of https://github.com/asyncapi/conference-websi…
ashmit-coder Oct 31, 2024
ef7ce7a
Merge branch 'master' of https://github.com/asyncapi/conference-websi…
ashmit-coder Nov 4, 2024
f32726b
Merge branch 'master' into feat/add-testing-framework
ashmit-coder Nov 10, 2024
1b9ca8d
Merge branch 'master' of https://github.com/asyncapi/conference-websi…
ashmit-coder Nov 12, 2024
fe6fa1d
Merge branch 'feat/add-testing-framework' of https://github.com/ashmi…
ashmit-coder Nov 12, 2024
8d103aa
Merge branch 'master' into feat/add-testing-framework
ashmit-coder Nov 12, 2024
f066a39
test commit
ashmit-coder Nov 15, 2024
3eb9c4f
Merge branch 'feat/add-testing-framework' of https://github.com/ashmi…
ashmit-coder Nov 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/cypress-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Cypress End-to-End test

on:
pull_request:
branches:
- master
push:
branches:
- master
ashmit-coder marked this conversation as resolved.
Show resolved Hide resolved

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
ashmit-coder marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions components/About/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Button from '../Buttons/button';
import Image from 'next/image';
function About() {
return (
<div className='p-24 container flex items-center justify-center w-full'>
<div className='p-24 container flex items-center justify-center w-full' data-test="about-section">
<div className='w-[1120px] lg:w-full flex lg:flex-col-reverse items-center justify-between'>
<div style={{'--image-url': `url('/img/about.jpeg')`}} className='lg:mt-16 bg-[image:var(--image-url)] bg-center bg-cover w-[450px] h-[550px] sm:w-[100%] sm:h-[500px] rounded-[30px]' >
</div>
Expand All @@ -27,7 +27,7 @@ function About() {
<Paragraph typeStyle='body-lg' className="mt-6" textColor='text-gray-200'>
We are currently looking for sponsors, for more details please read our Sponsorship Prospectus.
</Paragraph>
<div className='mt-10 flex gap-4 sm:flex-col lg:justify-center'>
<div className='mt-10 flex gap-4 sm:flex-col lg:justify-center' data-test="prospectus-download">
<a
className='flex justify-center'
href='https://opencollective.com/asyncapi/events/asyncapi-conference-on-tour-6b3c0aa1'
Expand Down
2 changes: 1 addition & 1 deletion components/Agenda/agenda.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Image from 'next/image'

function Agenda({ city }) {
return (
<div className=''>
<div className='' data-test="agenda-com">
<div className='flex flex-col justify-center items-center'>

<Heading className='text-[30px] text-white'>
Expand Down
3 changes: 2 additions & 1 deletion components/Buttons/button.js
Original file line number Diff line number Diff line change
@@ -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 (
<button
disabled={disabled}
data-test={test || ""}
type={type}
onClick={onClick}
className={`${overlay ? '' : 'gradient-bg'} flex items-center justify-center text-white h-[54px] rounded-md p-[8px] ${className}`}
Expand Down
10 changes: 6 additions & 4 deletions components/Footer/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ function Footer() {
imgUrl: "/img/Linkedln.png",
},
{
name: "Tweeter(X)",
href: "https://twitter.com/asyncapispec",
name: "Twitter(X)",
href: "https://x.com/asyncapispec",
imgUrl: "/img/twitter_new.png",
},
];
return (
<div className="container">
<div className="w-full flex justify-between items-center p-4 sm:flex-col sm:gap-3">
<div className="container" data-test="footer">
<div className="w-full flex justify-between items-center p-4 sm:flex-col sm:gap-3" data-test="footer-asyncAPI-logo">
<Link href='/'>
<Image className="cursor-pointer" src="/img/logo.png" alt="company logo" width={150} height={42}/>
</Link>
Expand All @@ -35,6 +35,7 @@ function Footer() {
target="_blank"
rel="noreferrer"
className="hover:text-sky-500 text-white duration-200 ease-in-out"
data-test="code-of-conduct"
>
Code of Conduct
</a>
Expand All @@ -52,6 +53,7 @@ function Footer() {
target="_blank"
rel="noreferrer"
className="w-12 h-12 rounded-lg border-[1.5px] border-[#556061] flex items-center justify-center hover:border-[#AD20E2] duration-150 ease-in-out"
data-test={`footer-${social.name}`}
>
<Image src={social.imgUrl} alt={social.name} height={32} width={32} />
</a>
Expand Down
4 changes: 3 additions & 1 deletion components/Form/Cfp/stepFour.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function StepFour({ setStep, setForm, data }) {
border: "1px solid #E50E99",
}}
onChange={(e) => setForm({ ...data, AdditionalInfo: e.target.value })}
data-test="step-four-additional"
/>

<div className="mt-6 text-dark-600 text-md">
Expand All @@ -63,7 +64,8 @@ function StepFour({ setStep, setForm, data }) {
<Button
type="submit"
disabled={submitting || disabled}
className="bg-tetiary-pink p-3 rounded-md text-white mt-3 w-36 lg:w-full lg:mt-5">
className="bg-tetiary-pink p-3 rounded-md text-white mt-3 w-36 lg:w-full lg:mt-5"
test="step-four-next">
{submitting ? <ActivityLoader /> : "Submit"}
</Button>
</div>
Expand Down
10 changes: 7 additions & 3 deletions components/Form/Cfp/stepOne.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Button from "../../Buttons/button";

function StepOne({ setStep, setForm, data }) {
return (
<form className="mt-3 w-[30rem] lg:w-[auto]" onSubmit={(e) => setStep(e, 2)}>
<form className="mt-3 w-[30rem] lg:w-[auto]" onSubmit={(e) => setStep(e, 2)} data-test="step-one">
<h1 className="text-white font-bold text-4xl lg:text-3xl">
Let's start with your name
</h1>
Expand All @@ -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"
/>
<div className="text-dark-600 text-lg mt-5">Email address</div>
<input
Expand All @@ -31,6 +32,7 @@ function StepOne({ setStep, setForm, data }) {
border: "1px solid #E50E99",
}}
onChange={(e) => setForm({ ...data, Email: e.target.value })}
data-test="step-one-email"
/>
<div className="text-dark-600 text-lg mt-5">Bio</div>
<textarea
Expand All @@ -41,6 +43,7 @@ function StepOne({ setStep, setForm, data }) {
border: "1px solid #E50E99",
}}
onChange={(e) => setForm({ ...data, Bio: e.target.value })}
data-test="step-one-bio"
/>
<div className="text-dark-600 text-lg mt-5">Github/LinkedIn/Twitter</div>
<input
Expand All @@ -50,11 +53,12 @@ function StepOne({ setStep, setForm, data }) {
style={{
border: "1px solid #E50E99",
}}
onChange={(e) => setForm({ ...data, Social: e.target.value })}
onChange={(e) => setForm({ ...data, Social: e.target.value })}
data-test="step-one-social"
/>
<Button type="submit"
className="bg-tetiary-pink p-3 rounded-md text-white mt-6 float-right w-36 lg:w-full lg:mt-8"
disabled={!data.Fullname && true}>Next</Button>
disabled={!data.Fullname && true} test="step-one-next">Next</Button>
</div>
</form>
);
Expand Down
5 changes: 4 additions & 1 deletion components/Form/Cfp/stepThree.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ function StepThree({ setStep, setForm, data }) {
title="Select session format"
setValue={(val) => setValue({...value, Format: val})}
multi={false}
dataTest="step-three-format"
/>
<div className="text-dark-600 text-lg mt-4 mb-4">Session Level</div>
<Select
options={options2}
title="Select session level"
setValue={(val) => setValue({...value, Level: val})}
multi={false}
dataTest = "step-three-level"
/>
<div className="float-right mt-3 lg:flex lg:flex-col-reverse lg:w-full">
<a
Expand All @@ -69,7 +71,8 @@ function StepThree({ setStep, setForm, data }) {
<Button
type="submit"
disabled={!data.Description || !data.Title && true}
className="bg-tetiary-pink p-3 rounded-md text-white mt-3 w-36 lg:w-full lg:mt-5">
className="bg-tetiary-pink p-3 rounded-md text-white mt-3 w-36 lg:w-full lg:mt-5"
test="step-three-next">
Next
</Button>
</div>
Expand Down
13 changes: 9 additions & 4 deletions components/Form/Cfp/stepTwo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Button from "../../Buttons/button";

function StepTwo({ setStep, setForm, data }) {
return (
<form className="mt-3 w-[30rem] lg:w-[auto]" onSubmit={(e) => setStep(e, 3)}>
<form className="mt-3 w-[30rem] lg:w-[auto]" onSubmit={(e) => setStep(e, 3)} data-test="step-two">
<h1 className="text-white font-bold text-4xl lg:text-3xl">
Session Info
</h1>
Expand All @@ -21,15 +21,19 @@ function StepTwo({ setStep, setForm, data }) {
style={{
border: "1px solid #E50E99",
}}
onChange={(e) => setForm({ ...data, Title: e.target.value })} />
onChange={(e) => setForm({ ...data, Title: e.target.value })}
data-test="step-two-title"
/>
<div className="text-dark-600 text-lg mt-4">Session Description</div>
<textarea
required
className="mt-3 w-full p-4 rounded-md focus:outline-none"
style={{
border: "1px solid #E50E99",
}}
onChange={(e) => setForm({ ...data, Description: e.target.value })} />
onChange={(e) => setForm({ ...data, Description: e.target.value })}
data-test="step-two-description"
/>
<div className="float-right mt-3 lg:flex lg:flex-col-reverse lg:w-full">
<a
className="mr-10 text-dark-600 cursor-pointer lg:text-center lg:pl-10 lg:mt-5"
Expand All @@ -40,7 +44,8 @@ function StepTwo({ setStep, setForm, data }) {
<Button
type="submit"
disabled={!data.Description || !data.Title && true}
className="bg-tetiary-pink p-3 rounded-md text-white mt-3 w-36 lg:w-full lg:mt-3">
className="bg-tetiary-pink p-3 rounded-md text-white mt-3 w-36 lg:w-full lg:mt-3"
test="step-two-next">
Next
</Button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/Form/paper.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function Paper() {
}

return (
<div className="py-28 flex flex-col justify-center items-center" id="forms" ref={confetiRef}>
<div className="py-28 flex flex-col justify-center items-center" id="forms" ref={confetiRef} data-test="cfp-form">
<div>
<div className='lg:px-6 mt-5'>
<h1 className="text-white font-bold text-5xl lg:text-3xl">
Expand Down
3 changes: 2 additions & 1 deletion components/Form/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const customStyles = {
},
};

function Dropdown({ options, title, setValue, multi }) {
function Dropdown({ options, title, setValue, multi ,dataTest}) {
const [selectedOption, setSelectedOption] = useState(title);
useEffect(() => {
if (multi && Array.isArray(selectedOption)) {
Expand All @@ -49,6 +49,7 @@ function Dropdown({ options, title, setValue, multi }) {
return (
<div className="relative inline-block w-full">
<Select
className={`${dataTest || ""}`}
styles={customStyles}
defaultValue={selectedOption}
onChange={setSelectedOption}
Expand Down
4 changes: 2 additions & 2 deletions components/Form/subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import Button from '../Buttons/button';

function Subscription() {
return (
<div className='mt-0 md:mt-[106px] subscription container flex justify-center'>
<div className='mt-0 md:mt-[106px] subscription container flex justify-center' >
<div className='mt-[106px] lg:mt-0 w-[1024px] min-h-[253px] lg:py-10 lg:w-full flex flex-col items-center'>
<h3 className='text-[32px] text-white lg:text-center'>
Subscribe for AACoT’24 updates!
</h3>
<a href='https://www.asyncapi.com/newsletter' target='_blank' rel="noreferrer" className='sm:w-full'>
<a href='https://www.asyncapi.com/newsletter' target='_blank' rel="noreferrer" className='sm:w-full' data-test="subscribe-button">
<Button type='submit' className='w-full md:w-[200px] mt-8 px-10'>
Subscribe
</Button>
Expand Down
3 changes: 2 additions & 1 deletion components/Header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ function Header() {
<div className='flex justify-center w-full mt-32'>
<div className='flex flex-col justify-center items-center w-full'>
<div className='my-10'><Announcement /></div>
<div className='sm:w-full text-center'>
<div className='sm:w-full text-center' data-test="landing-heading">
<Heading
className='text-6xl sm:text-4xl leading-normal sm:leading-38px tracking-[-3px] sm:tracking-[-0.02em] font-extrabold text-gradient'
level='h1'
typeStyle='heading'

>
AsyncAPI Conf On Tour 2024
</Heading>
Expand Down
10 changes: 6 additions & 4 deletions components/Navbar/navDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ const NavDrop = forwardRef((props, ref)=> {
<div className='flex flex-col p-5 pb-8 w-full'>
{links.map((link) => {
return (
<Link href={link.ref} key={link.title}>
<Link href={link.ref || '#'} key={link.title}>
<div
className='min-h-[50px] cursor-pointer'
data-test={`nav-${link.title}`}
onClick={() =>
show === link.title ? setShow(null) : setShow(link.title)
}
>
{link.subMenu ? (
<div>
<div className='flex items-center justify-between'>
<div className='flex items-center justify-between'
>
<div className='text-white'>{link.title}</div>
<Dropdown
className={`transition-transform duration-700 ${
Expand All @@ -32,8 +34,8 @@ const NavDrop = forwardRef((props, ref)=> {
{show && show === link.title && (
<div className='flex flex-col py-6 w-full'>
{link.subMenu.map((sub) => (
<Link href={sub.ref} key={sub.ref}>
<div
<Link href={sub.ref} key={sub.ref} >
<div data-test={`nav-sub-${sub.title}`}
onClick={() => setDrop(false)}
className='h-[40px] flex navbg items-center p-6 hover:text-black text-white cursor-pointer'
>
Expand Down
16 changes: 9 additions & 7 deletions components/Navbar/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,21 @@ function Navbar() {
<div className='flex justify-center items-center sticky top-0 z-[99] text-white'>
<div className='w-[1131px]'>
<div className='p-5 flex justify-between h-[75px] w-full items-center'>
<div className='flex items-center sm:justify-between sm:w-full'>
<div className='flex items-center sm:justify-between sm:w-full' data-test="nav-Home">
<Link href='/'>
<div className='flex items-center cursor-pointer'>
<Image src='/img/logo.png' alt='conference logo' width={120} height={33} />
</div>
</Link>
</div>
{isTablet ? (
<div>
<div data-test="nav-Hamberger">
{drop ? (
<button>
<Cancel />
</button>
) : (
<button>
<button >
<Hamburger ref={svg} />
</button>
)}
Expand All @@ -98,7 +98,8 @@ function Navbar() {
<div
onMouseEnter={() => handleMouseEnter(link.title)}
onMouseLeave={handleMouseLeave}
className='ml-16 text-[14px] group cursor-pointer relative flex flex-col '
className='ml-16 text-[14px] group cursor-pointer relative flex flex-col'
data-test = {`nav-${link.title}`}
>
<div >
{link.subMenu ? (
Expand All @@ -123,14 +124,15 @@ function Navbar() {
<div
className='subMenu absolute z-[9] mt-8 w-[150px] rounded-md left-[-15px] gradient-bg px-2 py-1 flex flex-col justify-center space-y-0'
onMouseEnter={handleSubMenuEnter}
onMouseLeave={handleSubMenuLeave}
>
onMouseLeave={handleSubMenuLeave}>
{link.subMenu.map((subL) => (
<Link href={subL.ref} target={subL.target} key={subL.title} rel="noopener noreferrer">
<div className={`flex items-center ${link.subMenu.length === 1 ? "justify-center" : "justify-start"} min-h-[32px] text-[16px] hover:scale-95 hover:translate-x-1 transition-all`}>
<div className={`flex items-center ${link.subMenu.length === 1 ? "justify-center" : "justify-start"} min-h-[32px] text-[16px] hover:scale-95 hover:translate-x-1 transition-all`}
data-test={`nav-sub-${subL.title}`}>
{subL.title}
</div>
</Link>

))}
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion components/Speaker/guideline.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const faqs = [
function Guidelines({talkDeadLine,virtual,name,cfp}) {
const [show, setShow] = useState(null);
return (
<div className='z-[9]'>
<div className='z-[9]' data-test="guideline-com">
<div className='flex flex-col justify-center'>
<Heading className='text-[30px] text-white text-center'>Speakers Guideline</Heading>
<div className='mt-20'>
Expand Down
1 change: 1 addition & 0 deletions components/Speaker/speaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ function Speaker({details, location, className}) {
return (
<div
className={`w-auto text-center flex flex-col items-center card h-auto rounded-md p-[27px] ${className}`}
data-test="speakers-section"
>
<div className='w-[300px] h-[300px] lg:w-[250px] lg:h-[250px] relative overflow-hidden rounded-full'>
<Image src={details.img} alt={details.name} width={0} height={0} sizes='100vw' className='rounded-full object-cover transition-all duration-300 hover:scale-110 w-[100%] h-[100%]' />
Expand Down
Loading
Loading