From b4f299ec91a8f92de664e0ae49c33131703ee68d Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Wed, 11 Sep 2019 14:29:28 +0800 Subject: [PATCH] MDL-66455 calendar: add coverage for event types in subscription page --- calendar/tests/behat/calendar_import.feature | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/calendar/tests/behat/calendar_import.feature b/calendar/tests/behat/calendar_import.feature index a2c47cd5af2..2ad027a7b7b 100644 --- a/calendar/tests/behat/calendar_import.feature +++ b/calendar/tests/behat/calendar_import.feature @@ -47,3 +47,30 @@ Feature: Import and edit calendar events And I view the calendar for "2" "2017" And I should not see "Event on 2-25-2017" And I should not see "Event on 2-20-2017" + + Scenario: Import events using different event types. + Given I log in as "admin" + And I view the calendar for "1" "2016" + And I press "Manage subscriptions" + And I set the following fields to these values: + | Calendar name | Test Import | + | Import from | Calendar file (.ics) | + | Type of event | User | + And I upload "calendar/tests/fixtures/import.ics" file to "Calendar file (.ics)" filemanager + And I press "Add" + And I should see "User events" + And I set the following fields to these values: + | Calendar name | Test Import | + | Import from | Calendar file (.ics) | + | Type of event | Category | + | Category | Miscellaneous | + And I upload "calendar/tests/fixtures/import.ics" file to "Calendar file (.ics)" filemanager + And I press "Add" + And I should see "Category events" + And I set the following fields to these values: + | Calendar name | Test Import | + | Import from | Calendar file (.ics) | + | Type of event | Site | + And I upload "calendar/tests/fixtures/import.ics" file to "Calendar file (.ics)" filemanager + And I press "Add" + And I should see "Site events"