Skip to content

Commit

Permalink
Fix: moved striphtml function outside loop (fixes #141)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemmyadams committed Jun 18, 2024
1 parent aa800d7 commit 10b7e4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/textInput.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ describe('Text Input', function () {

it('should display the text input component', function () {
const textInputComponents = this.data.components.filter(component => component._component === 'textinput');
const stripHtml = cy.helpers.stripHtml;
textInputComponents.forEach(textInputComponent => {
cy.visit(`/#/preview/${textInputComponent._id}`);
const stripHtml = cy.helpers.stripHtml;
cy.testContainsOrNotExists('.textinput__body', stripHtml(textInputComponent.body));
cy.testContainsOrNotExists('.textinput__title', stripHtml(textInputComponent.displayTitle));
cy.testContainsOrNotExists('.textinput__instruction', stripHtml(textInputComponent.instruction));
Expand Down

0 comments on commit 10b7e4a

Please sign in to comment.