Skip to content

Commit

Permalink
fix(forms): Fix E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ccailly committed Jan 13, 2025
1 parent 9ace9ff commit 0d1ede4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion js/modules/Forms/EditorController.js
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ export class GlpiFormEditorController
$(this.#target)
.find(`[data-glpi-form-editor-active-${type}]`)
.filter((index, element) => {
if (type === 'form') {
if (type === 'form' || type === 'section') {
return true;
}

Expand Down
2 changes: 2 additions & 0 deletions tests/cypress/e2e/form/form_editor.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,8 @@ describe ('Form editor', () => {
cy.findByRole('textbox', {'name': 'Question name'}).should('have.value', question.name);
cy.findByRole('checkbox', {'name': 'Mandatory'}).should('be.checked');
cy.findByLabelText("Question description").awaitTinyMCE().should('have.text', question.description);

cy.findByRole('textbox', {'name': question.type}).scrollIntoView();
cy.getDropdownByLabelText("Question type").should('have.text', question.type);
});
});
Expand Down

0 comments on commit 0d1ede4

Please sign in to comment.