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: fixed fails for New PRs Due to 2025 Year Change #507

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
24 changes: 12 additions & 12 deletions cypress/e2e/Landing.cy.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import path from "path";
import cities from "../../config/city-lists.json"
import cities from "../../config/city-lists.json";

describe("Landing Page Tests", () => {
beforeEach(() => {
cy.visit("/");
});

it("Contains correct heading", () => {
const Year = new Date().getFullYear();
cy.getTestData("landing-heading").contains(`AsyncAPI Conf On Tour ${Year}`);
Expand All @@ -15,12 +16,12 @@ describe("Landing Page Tests", () => {
});

it("Verify the downloaded file", () => {
const Year = new Date().getFullYear();
cy.getTestData("prospectus-download").should("be.visible");
cy.getTestData("prospectus-download").click();

const Year = new Date().getFullYear();
const downloadsFolder = Cypress.config("downloadsFolder");
cy.readFile(path.join(downloadsFolder, `conf ${Year}.pdf`));
cy.readFile(path.join(downloadsFolder, `conf ${Year}.pdf`)).should("exist");
});

it("Should contain Speakers section", () => {
Expand All @@ -37,21 +38,20 @@ describe("Landing Page Tests", () => {

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

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

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

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

Expand Down
Loading