From 0db68fcefbf06b741f5e83f79b6a22aeaa2e5576 Mon Sep 17 00:00:00 2001 From: Lemmy Adams <103187526+lemmyadams@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:00:36 +0100 Subject: [PATCH] Fix: moved striphtml function outside loop (fixes #180) --- 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));