Skip to content

Commit

Permalink
Fix: moved striphtml function outside loop (fixes #222)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemmyadams authored Jun 18, 2024
1 parent feb7453 commit 54e263a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/mcq.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ describe('Multiple Choice Question', function () {

it('should display the mcq component', function () {
const mcqComponents = this.data.components.filter(component => component._component === 'mcq');
const stripHtml = cy.helpers.stripHtml;
mcqComponents.forEach(mcqComponent => {
cy.visit(`/#/preview/${mcqComponent._id}`);
const stripHtml = cy.helpers.stripHtml;
cy.testContainsOrNotExists('.mcq__body', stripHtml(mcqComponent.body));
cy.testContainsOrNotExists('.mcq__title', stripHtml(mcqComponent.displayTitle));
cy.testContainsOrNotExists('.mcq__instruction', stripHtml(mcqComponent.instruction));
Expand Down

0 comments on commit 54e263a

Please sign in to comment.