Skip to content

Commit

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

0 comments on commit 0db68fc

Please sign in to comment.