From 49193a158937a93be4f2d2e23a77e79fa9731332 Mon Sep 17 00:00:00 2001 From: Lemmy Adams Date: Mon, 17 Jun 2024 13:53:12 +0100 Subject: [PATCH] moved striphtml function outside loop --- test/e2e/slider.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/slider.cy.js b/test/e2e/slider.cy.js index c313756..3f1860d 100644 --- a/test/e2e/slider.cy.js +++ b/test/e2e/slider.cy.js @@ -6,9 +6,9 @@ describe('Slider', function () { it('should display the slider component', function () { const sliderComponents = this.data.components.filter(component => component._component === 'slider'); + const stripHtml = cy.helpers.stripHtml; sliderComponents.forEach(sliderComponent => { cy.visit(`/#/preview/${sliderComponent._id}`); - const stripHtml = cy.helpers.stripHtml; cy.testContainsOrNotExists('.slider__body', stripHtml(sliderComponent.body)); cy.testContainsOrNotExists('.slider__title', stripHtml(sliderComponent.displayTitle)); cy.testContainsOrNotExists('.slider__instruction', stripHtml(sliderComponent.instruction));