From 39fd0aee8827b2ce103b401cf5596721be4d8c8d Mon Sep 17 00:00:00 2001 From: thulieblack Date: Fri, 3 May 2024 09:00:53 +0200 Subject: [PATCH] add-promo-banner --- .../components/campaignTests/AnnouncementHero.cy.js | 12 ++++++------ cypress/test/components/campaignTests/Banner.cy.js | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cypress/test/components/campaignTests/AnnouncementHero.cy.js b/cypress/test/components/campaignTests/AnnouncementHero.cy.js index a2dc55b29bcc..d6e2aa817322 100644 --- a/cypress/test/components/campaignTests/AnnouncementHero.cy.js +++ b/cypress/test/components/campaignTests/AnnouncementHero.cy.js @@ -9,26 +9,26 @@ beforeEach(() => { // .skip should be removed once the AnnouncementHero component is rendered in the website describe('AnnouncementHero Component', () => { - it.skip('should render the component when the date is within the valid range', () => { + it('should render the component when the date is within the valid range', () => { const mockDate = new Date(2021, 10, 12).getTime(); cy.clock(mockDate); cy.get('[data-testid="AnnouncementHero-main-div"]').should('exist'); }); //check if announcement rendered is small or large . - it.skip('should render a small announcement when "small" prop is true', () => { + it('should render a small announcement when "small" prop is true', () => { mount(); cy.get('[data-testid="AnnouncementHero-main-div"]').should('have.class', 'mb-4'); }); - it.skip('should display the correct event information', () => { + it('should display the correct event information', () => { // Assert the event details cy.get('[data-testid="Paragraph-test"]').should('exist'); cy.get('h2').should('exist'); }); - it.skip('should have a link and text for the button', () => { + it('should have a link and text for the button', () => { mount(); cy.get('[data-testid="Button-link"]') .should('have.attr', 'target', '_blank') @@ -40,7 +40,7 @@ describe('AnnouncementHero Component', () => { }); //check if announcement rendered is small or large . - it.skip('should render a small announcement when "small" prop is true', () => { + it('should render a small announcement when "small" prop is true', () => { const mockDate = new Date('2023-05-01T00:00:00Z'); cy.clock(mockDate.getTime()); @@ -49,7 +49,7 @@ describe('AnnouncementHero Component', () => { cy.get('[data-testid="AnnouncementHero-main-div"]').should('have.class', 'mb-4'); }); - it.skip('should render a large announcement when "small" prop is false', () => { + it('should render a large announcement when "small" prop is false', () => { const mockDate = new Date('2023-05-01T00:00:00Z'); cy.clock(mockDate.getTime()); diff --git a/cypress/test/components/campaignTests/Banner.cy.js b/cypress/test/components/campaignTests/Banner.cy.js index fb196376002d..62eada80848d 100644 --- a/cypress/test/components/campaignTests/Banner.cy.js +++ b/cypress/test/components/campaignTests/Banner.cy.js @@ -4,7 +4,7 @@ import Banner from '../../../../components/campaigns/Banner'; // .skip should be removed once the Banner component is rendered in the website with default functionalities describe('Banner Component', () => { - it.skip('should not render the banner when the date is not within the valid range', () => { + it('should not render the banner when the date is not within the valid range', () => { const today = new Date(); const [day, month, year] = [today.getUTCDate(), today.getUTCMonth(), today.getUTCFullYear()]; if (year > 2022 || month !== 10 || day < 6) { @@ -18,21 +18,21 @@ describe('Banner Component', () => { } }); - it.skip('should render the banner when the date is within the valid range', () => { + it('should render the banner when the date is within the valid range', () => { const mockDate = new Date(2021, 10, 12).getTime(); cy.clock(mockDate); mount(); cy.get('[data-testid="Banner-main-div"]').should('be.visible'); }); - it.skip('should display the correct message when the date is within the valid range', () => { + it('should display the correct message when the date is within the valid range', () => { const mockDate = new Date(2021, 10, 12).getTime(); cy.clock(mockDate); mount(); cy.contains('.font-medium', 'AsyncAPI Conference 2022 has ended').should('be.visible'); }); - it.skip('should have a link to the recordings playlist', () => { + it('should have a link to the recordings playlist', () => { const mockDate = new Date(2021, 10, 12).getTime(); cy.clock(mockDate); mount(); @@ -42,7 +42,7 @@ describe('Banner Component', () => { .should('have.attr', 'rel', 'noopener noreferrer'); }); - it.skip('should have the max-w-screen-xl class in the div element', () => { + it('should have the max-w-screen-xl class in the div element', () => { const mockDate = new Date(2021, 10, 12).getTime(); cy.clock(mockDate); mount();