From b336aa3a0180ff6c4cb7ba007a90f9e3068b15ec Mon Sep 17 00:00:00 2001 From: Lemmy Adams Date: Mon, 17 Jun 2024 13:53:08 +0100 Subject: [PATCH] moved striphtml function outside loop --- test/e2e/matching.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/matching.cy.js b/test/e2e/matching.cy.js index fdebb86..c2e5dfa 100644 --- a/test/e2e/matching.cy.js +++ b/test/e2e/matching.cy.js @@ -6,9 +6,9 @@ describe('Matching', function () { it('should display the matching component', function () { const matchingComponents = this.data.components.filter(component => component._component === 'matching'); + const stripHtml = cy.helpers.stripHtml; matchingComponents.forEach(matchingComponent => { cy.visit(`/#/preview/${matchingComponent._id}`); - const stripHtml = cy.helpers.stripHtml; cy.testContainsOrNotExists('.matching__body', stripHtml(matchingComponent.body)); cy.testContainsOrNotExists('.matching__title', stripHtml(matchingComponent.displayTitle)); cy.testContainsOrNotExists('.matching__instruction', stripHtml(matchingComponent.instruction));