Skip to content

Commit 8381e8c

Browse files
committed
Add spec
1 parent 212defb commit 8381e8c

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

modules/meeting/spec/features/meeting_notifications_spec.rb

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,51 @@
372372
perform_enqueued_jobs
373373
expect(ActionMailer::Base.deliveries.size).to eq 0
374374
end
375+
376+
it "sends out an invite notification when enabling notifications on a series template (Bug #70178)" do
377+
template_page.visit!
378+
379+
template_page.open_first_meeting
380+
wait_for_network_idle
381+
382+
# check for initial invitation mail
383+
perform_enqueued_jobs
384+
expect(ActionMailer::Base.deliveries.size).to eq 1
385+
ActionMailer::Base.deliveries.clear
386+
387+
template_page.visit!
388+
expect(meeting.template.reload.notify).to be true
389+
390+
page.within("[data-test-selector='email-updates-mode-selector']") do
391+
click_on "Disable"
392+
end
393+
394+
template_page.expect_modal "Disable email calendar updates?"
395+
template_page.within_modal "Disable email calendar updates?" do
396+
click_on "Disable email updates"
397+
end
398+
399+
wait_for_network_idle
400+
expect(meeting.template.reload.notify).to be false
401+
402+
page.within("[data-test-selector='email-updates-mode-selector']") do
403+
click_on "Enable"
404+
end
405+
406+
template_page.expect_modal "Enable email calendar updates?"
407+
template_page.within_modal "Enable email calendar updates?" do
408+
click_on "Enable email updates"
409+
end
410+
411+
wait_for_network_idle
412+
413+
expect_flash(message: "Email calendar update sent to all participants")
414+
expect(meeting.template.reload.notify).to be true
415+
416+
# check for invitation mail on re-enabling notifications
417+
perform_enqueued_jobs
418+
expect(ActionMailer::Base.deliveries.size).to eq 1
419+
end
375420
end
376421

377422
context "when a meeting is closed" do

0 commit comments

Comments
 (0)