diff --git a/cypress/integration/contentful_banners_spec.js b/cypress/integration/contentful_banners_spec.js index 0e7bd61be0..0f3c7387c3 100644 --- a/cypress/integration/contentful_banners_spec.js +++ b/cypress/integration/contentful_banners_spec.js @@ -16,9 +16,11 @@ describe('Contentful driven banners', () => { .each((banner, i) => { cy.wrap(banner) .find('.top-banners_item--body') - .invoke('html').invoke('trim') - .should((bannerHTML) => { - expect(utf8.encode(bannerHTML), `Banner #${i + 1} text is proper`).to.eq(banners[i].text) + .invoke('text').invoke('trim') + .should((bannerText) => { + const yamlText = Cypress.$(banners[i].text).text().trim() + + expect(utf8.encode(bannerText), `Banner #${i + 1} text is proper`).to.eq(yamlText) }) cy.wrap(banner) diff --git a/source/_data/banners.yml b/source/_data/banners.yml index f1fe4fea4d..1ed3cf627b 100644 --- a/source/_data/banners.yml +++ b/source/_data/banners.yml @@ -1,5 +1,5 @@ - startDate: '2019-07-17T14:00-05:00' endDate: '2019-07-31T23:59-05:00' - text: "

\U0001F6A9Learn how to get complete code coverage with Cypress on July 31st at 11AM PDT/2PM EDT with Gleb Bahmutov and Amir Rustamzadeh

" + text: "

\U0001F6A9Learn how to get complete & awesome code coverage with Cypress on July 31st at 11AM PDT/2PM EDT with Gleb Bahmutov and Amir Rustamzadeh

" buttonText: 'Register Now ' buttonLink: 'https://zoom.us/webinar/register/2115632233252/WN_bbV5ezckSMu9icH0KwuHuA'