From d438aa62fb1def2249693eab73d1cc42d94acc5d Mon Sep 17 00:00:00 2001 From: Lemmy Adams Date: Mon, 17 Jun 2024 13:53:06 +0100 Subject: [PATCH] moved striphtml function outside loop --- test/e2e/gmcq.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/gmcq.cy.js b/test/e2e/gmcq.cy.js index 6f8bb03..456e627 100644 --- a/test/e2e/gmcq.cy.js +++ b/test/e2e/gmcq.cy.js @@ -6,9 +6,9 @@ describe('Graphic Multiple Choice Question', function () { it('should display the gmcq component', function () { const gmcqComponents = this.data.components.filter(component => component._component === 'gmcq'); + const stripHtml = cy.helpers.stripHtml; gmcqComponents.forEach(gmcqComponent => { cy.visit(`/#/preview/${gmcqComponent._id}`); - const stripHtml = cy.helpers.stripHtml; cy.testContainsOrNotExists('.gmcq__body', stripHtml(gmcqComponent.body)); cy.testContainsOrNotExists('.gmcq__title', stripHtml(gmcqComponent.displayTitle)); cy.testContainsOrNotExists('.gmcq__instruction', stripHtml(gmcqComponent.instruction));