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: fixes cypress landing page test error for every new PR in 2025 #506

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DevanjoyDas
Copy link

Description

This pull request addresses a failing Cypress end-to-end test on the landing page. The test, which verifies the heading contains the current year, was causing failures for new PRs in 2025 due to the dynamic year calculation.

To avoid prematurely changing the header to "AsyncAPI Conf On Tour 2025", the test has been updated to handle both the current year and the previous year dynamically to allow flexibility until the official event dates for 2025 are confirmed :

const Year = new Date().getFullYear();
   cy.getTestData("landing-heading").contains(new RegExp(`AsyncAPI Conf On Tour (${Year}|${Year-1})`));

Screenshot of the passing test case.
image

Important
Temporarily adjusted the test to allow flexibility until the official event dates for 2025 are confirmed.

Fixes #505

Copy link

netlify bot commented Jan 2, 2025

Deploy Preview for peaceful-ramanujan-288045 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit de3e84e
🔍 Latest deploy log https://app.netlify.com/sites/peaceful-ramanujan-288045/deploys/6776b9503331be0008efa3ae
😎 Deploy Preview https://deploy-preview-506--peaceful-ramanujan-288045.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Cypress Landing Page Test ("Contains correct heading") Fails for New PRs Due to 2025 Year Change
1 participant