From 2b60d14b5cc2360363bf0588e1c292686a14e8bd Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Thu, 1 Oct 2020 16:10:00 +0200 Subject: [PATCH] test(client): match any dates (linkedin button) (#39754) Co-authored-by: Twaha Rahman <39026437+Twaha-Rahman@users.noreply.github.com> Co-authored-by: Tom <20648924+moT01@users.noreply.github.com> --- cypress/integration/ShowCertification.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cypress/integration/ShowCertification.js b/cypress/integration/ShowCertification.js index d3a085a998..af105e545f 100644 --- a/cypress/integration/ShowCertification.js +++ b/cypress/integration/ShowCertification.js @@ -52,11 +52,13 @@ describe('A certification,', function() { }); it('should render a LinkedIn button', function() { - cy.contains('Add this certification to my LinkedIn profile').should( - 'have.attr', - 'href', - 'https://www.linkedin.com/profile/add?startTask=CERTIFICATION_NAME&name=Legacy Front End&organizationId=4831032&issueYear=2020&issueMonth=8&certUrl=https://freecodecamp.org/certification/developmentuser/legacy-front-end' - ); + cy.contains('Add this certification to my LinkedIn profile') + .should('have.attr', 'href') + .and( + 'match', + // eslint-disable-next-line max-len + /https:\/\/www\.linkedin\.com\/profile\/add\?startTask=CERTIFICATION_NAME&name=Legacy Front End&organizationId=4831032&issueYear=\d\d\d\d&issueMonth=\d\d?&certUrl=https:\/\/freecodecamp\.org\/certification\/developmentuser\/legacy-front-end/ + ); }); it('should render a Twitter button', function() {