Skip to content

Commit

Permalink
feat: add AACoT London banner (#2106)
Browse files Browse the repository at this point in the history
  • Loading branch information
thulieblack authored Aug 31, 2023
1 parent f1f457f commit 86c52af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
8 changes: 4 additions & 4 deletions components/campaigns/AnnoucementHero.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function shouldShowBanner(cfpDeadline) {
export default function AnnouncementHero({ className = '', small = false, hideVideo = false }) {
//return null;

const cfpDeadline = '2023-07-28T06:00:00Z'
const cfpDeadline = '2023-09-20T06:00:00Z'
const showBanner = shouldShowBanner(cfpDeadline);
if (!showBanner) return null;

Expand Down Expand Up @@ -48,12 +48,12 @@ export default function AnnouncementHero({ className = '', small = false, hideVi
<Paragraph typeStyle="body-lg">
20th of September, 2023 | London, UK
</Paragraph>
<AnnouncementRemainingDays dateTime={cfpDeadline} eventName="the end of Call for Speakers." />
<AnnouncementRemainingDays dateTime={cfpDeadline} eventName="AACoT'23 London Edition" />
<div className="mt-6 pb-2 space-x-2">
<Button
href="https://conference.asyncapi.com/"
href="https://opencollective.com/asyncapi/events/asyncapi-conference-on-tour-6b3c0aa1/contribute/aacot-london-edition-61313"
target="_blank"
text="Submit a session"
text="Get Your Tickets"
data-testid="AnnouncementHero-submit-session"
/>
</div>
Expand Down
15 changes: 9 additions & 6 deletions cypress/test/campaignTests/AnnouncementHero.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@ describe('AnnouncementHero Component', () => {
cy.get('h3').should('exist');

});

it('should have a link to submit a session', () => {
// Assert the link
cy.get('[data-testid="Button-link"]').should('have.attr', 'href', 'https://conference.asyncapi.com/')
it('should have a link and text for the button', () => {
mount(<AnnouncementHero />);
cy.get('[data-testid="Button-link"]')
.should('have.attr', 'target', '_blank')
.contains('Submit a session');
});
//making sure link starts with https://
.should('have.attr', 'href').and('match', /^https:\/\//)
cy.get('[data-testid="Button-link"]')
.find('span') // Find the <span> element inside the <a>
.and('not.be.empty');
});

//check if announcement rendered is small or large .
it('should render a small announcement when "small" prop is true', () => {
Expand Down

0 comments on commit 86c52af

Please sign in to comment.