Skip to content

Commit

Permalink
Merge branch 'master' into borderimage
Browse files Browse the repository at this point in the history
  • Loading branch information
TenzDelek authored Jan 8, 2025
2 parents 0d25d11 + c33c344 commit fe0e1f0
Show file tree
Hide file tree
Showing 13 changed files with 185 additions and 75 deletions.
2 changes: 1 addition & 1 deletion components/Form/Cfp/stepThree.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function StepThree({ setStep, setForm, data }) {
const [value, setValue] = useState({});
useEffect(() => {
setForm({ ...data, ...value});
}, [value]);
}, [value, data, setForm]);
return (
<form className="mt-3 w-[30rem] lg:w-[auto]" onSubmit={(e) => setStep(e, 4)}>
<h1 className="text-white font-bold text-4xl lg:text-3xl">
Expand Down
2 changes: 1 addition & 1 deletion components/Form/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function Dropdown({ options, title, setValue, multi ,dataTest}) {
} else {
setValue(selectedOption.value);
}
}, [selectedOption]);
}, [selectedOption, multi, setValue]);
return (
<div className="relative inline-block w-full">
<Select
Expand Down
9 changes: 3 additions & 6 deletions components/Navbar/navDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const NavDrop = forwardRef((props, ref)=> {
const {setDrop}=props;
const [show, setShow] = useState(null);
return (
<div ref ={ref} className='absolute ml-[-20px] top-16 w-full bg-[#1B1130]'>
<div ref ={ref} className='z-[99] absolute left-0 top-[74px] w-full h-screen bg-[#1B1130]/90 backdrop-filter backdrop-blur-md'>
<div className='flex flex-col p-5 pb-8 w-full'>
{links.map((link) => {
return (
Expand All @@ -22,13 +22,10 @@ const NavDrop = forwardRef((props, ref)=> {
>
{link.subMenu ? (
<div>
<div className='flex items-center justify-between'
>
<div className='flex'>
<div className='text-white'>{link.title}</div>
<Dropdown
className={`transition-transform duration-700 ${
show === link.title ? 'rotate-0' : 'rotate-[-90deg]'
}`}
className={`transition-transform duration-700`}
/>
</div>
{show && show === link.title && (
Expand Down
4 changes: 2 additions & 2 deletions components/Navbar/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function Navbar() {
};

return (
<div className='flex justify-center items-center sticky top-0 z-[99] text-white'>
<div className={`flex justify-center items-center fixed w-full backdrop-blur ${ drop && 'bg-[#1B1130]/90'} 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' data-test="nav-Home">
Expand All @@ -86,7 +86,7 @@ function Navbar() {
<Cancel />
</button>
) : (
<button >
<button>
<Hamburger ref={svg} />
</button>
)}
Expand Down
86 changes: 73 additions & 13 deletions config/city-lists.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,24 @@
"img": "/img/testMic.webp",
"address": "AsyncAPI YouTube Channel",
"map": "https://www.youtube.com/live/F9wHxd-v2f0?si=PT8BuAUKNmoLHRiM",
"sponsors": [
"/img/apidays.png"
],
"sponsors": {
"eventSponsors" : [{
"image":"/img/apidays.png",
"websiteUrl":"https://www.apidays.global/"
}],
"financialSponsors" : [
{
"image":"/img/graviteeio.svg" ,
"websiteUrl": "https://www.gravitee.io/",
"className":"w-[250px] h-[50px]"
},
{
"image":"/img/postman.png" ,
"websiteUrl":"https://www.postman.com/",
"className":"w-[240px] h-[70px]"
}
]
},
"ticket": false,
"isFree": true,
"ended": true,
Expand All @@ -27,9 +42,24 @@
"img": "/img/finland.webp",
"address": "Pikku-Finlandia, Helsinki, Karamzininranta 4, 00100 Helsinki, Finland",
"map": "https://maps.app.goo.gl/UpdEp188m5YNEAEo9",
"sponsors": [
"/img/apidays.png"
],
"sponsors": {
"eventSponsors" : [{
"image":"/img/apidays.png",
"websiteUrl":"https://www.apidays.global/"
}],
"financialSponsors" : [
{
"image":"/img/graviteeio.svg" ,
"websiteUrl": "https://www.gravitee.io/",
"className":"w-[250px] h-[50px]"
},
{
"image":"/img/postman.png" ,
"websiteUrl":"https://www.postman.com/",
"className":"w-[240px] h-[70px]"
}
]
},
"ticket": false,
"isFree": false,
"ended": true
Expand All @@ -43,9 +73,24 @@
"img": "/img/london.gif",
"address": "155 Bishopsgate, London EC2M 3YD",
"map": "https://maps.app.goo.gl/b2Vb5H2mM41F9nQA6",
"sponsors": [
"/img/apidays.png"
],
"sponsors": {
"eventSponsors" : [{
"image":"/img/apidays.png",
"websiteUrl":"https://www.apidays.global/"
}],
"financialSponsors" : [
{
"image":"/img/graviteeio.svg" ,
"websiteUrl": "https://www.gravitee.io/",
"className":"w-[250px] h-[50px]"
},
{
"image":"/img/postman.png" ,
"websiteUrl":"https://www.postman.com/",
"className":"w-[240px] h-[70px]"
}
]
},
"ticket": "https://ticket.apidays.global/event/apidays-london-2024/869eca20-bfb6-4103-b8bb-d0348932e940/",
"isFree": true,
"ended": true,
Expand All @@ -61,12 +106,27 @@
"img": "https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExd24yenR4djEyZzRoeDA0ZmEyb3Y1c2F4NWVmbG13NmZwYWNhZzdnNiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/Tuy3QxNZF1cxG/giphy.gif",
"address": "CNIT (Centre des Nouvelles Industries et Technologies), Paris 2 Place de la Défense, 92092 Puteaux",
"map": "https://maps.app.goo.gl/5te8WRM9Rb8B6vNd9",
"sponsors": [
"/img/apidays.png"
],
"sponsors": {
"eventSponsors" : [{
"image":"/img/apidays.png",
"websiteUrl":"https://www.apidays.global/"
}],
"financialSponsors" : [
{
"image":"/img/graviteeio.svg" ,
"websiteUrl": "https://www.gravitee.io/",
"className":"w-[250px] h-[50px]"
},
{
"image":"/img/postman.png" ,
"websiteUrl":"https://www.postman.com/",
"className":"w-[240px] h-[70px]"
}
]
},
"ticket": "https://ticket.apidays.global/event/apidays-paris-2024/f8f61349-4f78-4bba-a162-68d598833116/cart?coupon=ASYNCAPICONF",
"isFree": true,
"cfp": false,
"ended": false
"ended": true
}
]
7 changes: 6 additions & 1 deletion config/links.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,15 @@
"title": "Online Conf Slides",
"ref": "https://drive.google.com/drive/folders/1gw_kr6mLX5lITe_DHG94pGUOVYYS0DjY?usp=drive_link",
"target": "_blank"
},
{
"title": "Paris Slides",
"ref": "https://drive.google.com/drive/folders/1MBqecV7Q__tLIciF2vaPvwG5gV4RxcI_?usp=drive_link",
"target": "_blank"
}


]
}

]
]
22 changes: 22 additions & 0 deletions cypress/e2e/Landing.cy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import path from "path";
import cities from "../../config/city-lists.json"

describe("Landing Page Tests", () => {
beforeEach(() => {
cy.visit("/");
Expand Down Expand Up @@ -33,6 +35,26 @@ describe("Landing Page Tests", () => {
cy.getTestData("sponsor-section").should("be.visible");
});

it("Should contain logos in Sponsor component", () => {
const eventSponsors = cities[0].sponsors.eventSponsors;

const financialSponsor = cities[0].sponsors.financialSponsors;

eventSponsors.forEach((sponsor) => {
cy.getTestData('sponsor-section')
.find(`img[src="${sponsor.image}"]`)
.should('be.visible');
cy.get(`a[href="${sponsor.websiteUrl}"]`).should('exist');
});

financialSponsor.forEach((sponsor) => {
cy.getTestData('sponsor-section')
.find(`img[src="${sponsor.image}"]`)
.should('be.visible');
cy.get(`a[href="${sponsor.websiteUrl}"]`).should('exist');
});
});

it("Subscribe Button is functional", () => {
cy.getTestData("subscribe-button").invoke("removeAttr", "target").click();

Expand Down
30 changes: 28 additions & 2 deletions cypress/e2e/Venue.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ it("should render guideline for not ended cities and agenda otherwise",()=>{

cy.getTestData(`venue-${city.name}`).then(val=>{

if(!city.ended){
if(Date.now()>Date(city.date) && !city.ended){
cy.getTestData("guideline-com").should("be.visible");
}
else{
Expand All @@ -18,7 +18,33 @@ it("should render guideline for not ended cities and agenda otherwise",()=>{

});

it.only("Form should work",()=>{
it("Should contain logos in Sponsor component", () => {
const eventSponsors = cities[0].sponsors.eventSponsors;

const financialSponsor = cities[0].sponsors.financialSponsors;

cy.wrap(cities).each((city) => {
cy.visit(`http://localhost:3000/venue/${city.name}`);

cy.getTestData("sponsor-section").should("exist");

eventSponsors.forEach((sponsor) => {
cy.getTestData('sponsor-section')
.find(`img[src="${sponsor.image}"]`)
.should('be.visible');
cy.get(`a[href="${sponsor.websiteUrl}"]`).should('exist');
});

financialSponsor.forEach((sponsor) => {
cy.getTestData('sponsor-section')
.find(`img[src="${sponsor.image}"]`)
.should('be.visible');
cy.get(`a[href="${sponsor.websiteUrl}"]`).should('exist');
});
})
});

it("Form should work",()=>{
cy.visit('http://localhost:3000/venue/online/register');

cy.getTestData("cfp-form").should('be.visible');
Expand Down
Loading

0 comments on commit fe0e1f0

Please sign in to comment.