Skip to content

Commit

Permalink
Update cypress/test/campaignTests/AnnouncementHero.cy.js
Browse files Browse the repository at this point in the history
Co-authored-by: Lukasz Gornicki <[email protected]>
  • Loading branch information
thulieblack and derberg authored Aug 31, 2023
1 parent 5500747 commit cfe99fd
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions cypress/test/campaignTests/AnnouncementHero.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,15 @@ 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/')
.should('have.attr', 'target', '_blank')
.contains('Submit a session');
});
*/

it('should have a link and text for the button', () => {
mount(<AnnouncementHero />);
cy.get('[data-testid="Button-link"]').should('have.attr', 'href', 'https://opencollective.com/asyncapi/events/asyncapi-conference-on-tour-6b3c0aa1/contribute/aacot-london-edition-61313')
cy.get('[data-testid="Button-link"]')
.should('have.attr', 'target', '_blank')
.contains('Get Your Tickets');

//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 .
Expand Down

0 comments on commit cfe99fd

Please sign in to comment.