__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
@core @core_calendar @_file_upload @javascript
Feature: Import and edit calendar events
In order to manipulate imported calendar events
As an user
I need to import calendar events then edit them.
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
Scenario: Import then edit a calendar event.
Given I log in as "teacher1"
And I view the calendar for "1" "2016"
And I click on "Import or export calendars" "link"
And "Calendar" "link" should exist in the ".breadcrumb" "css_element"
And "Import or export calendars" "text" should exist in the ".breadcrumb" "css_element"
And I press "Import calendar"
And "Calendar" "link" should exist in the ".breadcrumb" "css_element"
And "Import or export calendars" "link" should exist in the ".breadcrumb" "css_element"
And "Import calendar" "text" should exist in the ".breadcrumb" "css_element"
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 "Import calendar"
And I should see "2 events were imported"
And I view the calendar for "2" "2017"
And I should see "February 2017"
And I should see "Event on 2-15-2017"
And I should see "Event on 2-25-2017"
And I click on "Event on 2-15-2017" "link"
And I should see "Some place"
And I click on "Edit" "button"
And I set the following fields to these values:
| Event title | Event on 2-20-2017 |
| Description | Event on 2-20-2017 |
| timestart[day] | 20 |
And I press "Save"
When I view the calendar for "2" "2017"
Then I should see "Event on 2-20-2017"
And I should see "Event on 2-25-2017"
And I should not see "Event on 2-15-2017"
And I click on "Import or export calendars" "link"
And I click on "Delete" "link"
And I should see "Are you sure you want to delete the \"Test Import\" calendar subscription?" in the ".modal .modal-body" "css_element"
And I click on "Yes" "button" in the ".modal.show" "css_element"
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 click on "Import or export calendars" "link"
And I press "Import calendar"
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 "Import calendar"
And I should see "User events"
And I press "Import calendar"
And I set the following fields to these values:
| Calendar name | Test Import |
| Import from | Calendar file (.ics) |
| Type of event | Category |
| Category | Category 1 |
And I upload "calendar/tests/fixtures/import.ics" file to "Calendar file (.ics)" filemanager
And I press "Import calendar"
And I should see "Category events"
And I press "Import calendar"
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 "Import calendar"
And I should see "Site events"
Scenario: Import iCalendar file with parameter.
Given I log in as "admin"
And I view the calendar for "7" "2022"
And I click on "Import or export calendars" "link"
And I press "Import calendar"
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_with_parameters.ics" file to "Calendar file (.ics)" filemanager
And I press "Import calendar"
When I view the calendar for "1" "7" "2022"
Then I should see "First event"
And I should see "Description of the first event"
And I should see "Second event"
And I should see "Description of the second event"
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| behat_calendar.php | File | 9.75 KB | 0777 |
|
| behat_calendar_deprecated.php | File | 2.56 KB | 0777 |
|
| calendar.feature | File | 19.36 KB | 0777 |
|
| calendar_import.feature | File | 4.7 KB | 0777 |
|
| calendar_lookahead.feature | File | 1.74 KB | 0777 |
|
| calendar_utf8.feature | File | 948 B | 0777 |
|
| calender_filter.feature | File | 3.08 KB | 0777 |
|
| category_events.feature | File | 4.79 KB | 0777 |
|
| export.feature | File | 4.28 KB | 0777 |
|
| minicalendar.feature | File | 1.54 KB | 0777 |
|