Skip to content

Commit

Permalink
Fix registration type field highlighted in admin meeting creation form (
Browse files Browse the repository at this point in the history
#9160) (#9254)

* Remove trigger from meeting_form.js in order to avoid rendering error message before form completion

* Test that the error is no longer displayed on form.

Co-authored-by: roxanaopr <66411127+roxanaopr@users.noreply.github.com>
  • Loading branch information
andreslucena and roxanaopr committed May 10, 2022
1 parent 0afc65b commit cc87297
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Expand Up @@ -118,7 +118,7 @@ $(() => {
toggleDependsOnSelect($target, $meetingRegistrationUrl, "on_different_platform");
});

$meetingRegistrationType.trigger("change");
toggleDependsOnSelect($meetingRegistrationType, $meetingRegistrationUrl, "on_different_platform");

const $meetingTypeOfMeeting = $form.find("#meeting_type_of_meeting");
const $meetingOnlineFields = $form.find(".field[data-meeting-type='online']");
Expand Down
Expand Up @@ -443,6 +443,14 @@
end
end

it "doesn't display error message when opening meeting's create form" do
find(".card-title a.button").click

within "label[for='meeting_registration_type']" do
expect(page).to have_no_content("There's an error in this field.")
end
end

it "creates a new meeting", :slow do
find(".card-title a.button").click

Expand Down

0 comments on commit cc87297

Please sign in to comment.