You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Cypress end-to-end (E2E) test ("Contains correct heading") for the landing page is consistently failing for new pull requests (PRs) due to the change in year from 2024 to 2025. The test expects the landing page to display the heading: AsyncAPI Conf On Tour 2025
However, the actual page content still reflects 2024, causing the test to fail.
const Year = new Date().getFullYear();
cy.getTestData("landing-heading").contains(`AsyncAPI Conf On Tour ${Year}`);
Proposed New Code
const Year = new Date().getFullYear();
cy.getTestData("landing-heading").contains(new RegExp(`AsyncAPI Conf On Tour (${Year}|${Year-1})`));
Long term solution for every upcoming Year
If the heading is supposed to change dynamically each year, we can update the logic in the application to reflect the current year
Screenshots
How to Reproduce
Create a new pull request
Observe the test results for Landing Page Tests.
You can observe this error for the Test "Contains correct heading"
Describe the bug.
The Cypress end-to-end (E2E) test ("Contains correct heading") for the landing page is consistently failing for new pull requests (PRs) due to the change in year from 2024 to 2025. The test expects the landing page to display the heading:
AsyncAPI Conf On Tour 2025
However, the actual page content still reflects 2024, causing the test to fail.
Root Cause of the Error:
In the file https://github.com/asyncapi/conference-website/blob/master/cypress/e2e/Landing.cy.js
Expected behavior
The landing page heading should reflect the current year (2025) or the test should handle year transitions dynamically to avoid false failures.
Possible Solutions
We can change the Heading Directly to 2025 in the file https://github.com/asyncapi/conference-website/blob/master/components/Header/header.js
Current Code
Proposed New Code
We can temporarily modify the code until the official dates for the 2025 Conferences are announced
In file https://github.com/asyncapi/conference-website/blob/master/cypress/e2e/Landing.cy.js
Current Code
Proposed New Code
If the heading is supposed to change dynamically each year, we can update the logic in the application to reflect the current year
Screenshots
How to Reproduce
🥦 Browser
Google Chrome
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
Yes I am willing to submit a PR!
The text was updated successfully, but these errors were encountered: