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

fix: sponsor and subscribe section width on home page. #480

Merged
merged 9 commits into from
Jan 2, 2025
25 changes: 25 additions & 0 deletions cypress/e2e/Landing.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,31 @@ describe("Landing Page Tests", () => {
cy.getTestData("sponsor-section").should("be.visible");
});

it("Should contain logos in Sponsor component", () => {
const eventSponsors = [
{ image: '/img/apidays.png', websiteUrl: 'https://www.apidays.global/' },
];

ashmit-coder marked this conversation as resolved.
Show resolved Hide resolved
const financialSponsor = [
{ image: '/img/graviteeio.svg', websiteUrl: 'https://www.gravitee.io/' },
{ image: '/img/postman.png', websiteUrl: 'https://www.postman.com/' },
];

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
34 changes: 33 additions & 1 deletion cypress/e2e/Venue.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,39 @@ it("should render guideline for not ended cities and agenda otherwise",()=>{

});

it.only("Form should work",()=>{
it("Should contain logos in Sponsor component", () => {
const sponsors = {
eventSponsors : [
{ image: '/img/apidays.png', websiteUrl: 'https://www.apidays.global/' },
],
financialSponsor : [
{ image: '/img/graviteeio.svg', websiteUrl: 'https://www.gravitee.io/' },
{ image: '/img/postman.png', websiteUrl: 'https://www.postman.com/' },
]
};

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

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

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

sponsors.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