Skip to content

Commit

Permalink
Fix: moved striphtml function outside loop (fixes #207)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemmyadams authored Jun 18, 2024
1 parent 8d08c1e commit 79d5d69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/slider.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 79d5d69

Please sign in to comment.