Skip to content

Commit 54e263a

Browse files
authored
Fix: moved striphtml function outside loop (fixes #222)
1 parent feb7453 commit 54e263a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/e2e/mcq.cy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ describe('Multiple Choice Question', function () {
66

77
it('should display the mcq component', function () {
88
const mcqComponents = this.data.components.filter(component => component._component === 'mcq');
9+
const stripHtml = cy.helpers.stripHtml;
910
mcqComponents.forEach(mcqComponent => {
1011
cy.visit(`/#/preview/${mcqComponent._id}`);
11-
const stripHtml = cy.helpers.stripHtml;
1212
cy.testContainsOrNotExists('.mcq__body', stripHtml(mcqComponent.body));
1313
cy.testContainsOrNotExists('.mcq__title', stripHtml(mcqComponent.displayTitle));
1414
cy.testContainsOrNotExists('.mcq__instruction', stripHtml(mcqComponent.instruction));

0 commit comments

Comments
 (0)