Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/tests/behat/features/sessionManagement.feature

96 lines
3.6 KiB

Feature: Session management tool
In order to use the session tool
The admin should be able to create a session
Background:
Given I am a platform administrator
Scenario: Create a session category
Given I am on "/main/session/session_category_add.php"
When I fill in the following:
| name | category_1 |
And I press "Add category"
Then I should see "The category has been added"
@javascript
Scenario: Create a session
Given I am on "/main/session/session_add.php"
When I fill in the following:
| name | Session1 |
And I fill in select2 input "#coach_username" with id "1" and value "admin"
And I press "submit"
Then wait for the page to be loaded
Then I should see "Add courses to this session (Session1)"
Then I select "TEMP (TEMP)" from "NoSessionCoursesList[]"
And I press "add_course"
And I press "next"
Then I should see "Update successful"
@javascript
Scenario: Create a session with description
Given I am on "/main/session/session_add.php"
When I fill in the following:
| name | Temp Session |
And I press "advanced_params"
And I fill in select2 input "#coach_username" with id "1" and value "admin"
And wait for the page to be loaded
And I fill in ckeditor field "description" with "Description for Temp Session"
And I press "submit"
Then I should see "Add courses to this session (Temp Session)"
Then I select "TEMP (TEMP)" from "NoSessionCoursesList[]"
And I press "add_course"
And I press "next"
Then I should see "Update successful"
Scenario: Check session description is not present
Given I am on "/main/index/user_portal.php"
Then I should see "Temp Session"
And I should not see "Description for Temp Session"
Scenario: Edit session description setting
Given I am on "/main/session/session_list.php?keyword=Temp+session"
And wait for the page to be loaded
And I follow "Edit"
When I press "advanced_params"
And I check "Show description"
And I press "submit"
Then I should see "Update successful"
Scenario: Check session description with platform setting off
Given I am a platform administrator
And I am on "/admin/settings/search_settings?keyword=show_session_description"
And I select "yes" from "form_show_session_description"
And I press "Save"
Then I am on "/main/index/user_portal.php"
Then I should see "Temp Session"
And I should not see "Description for Temp Session"
Scenario: Check session description with platform setting on
Given I am a platform administrator
And I am on "/main/admin/settings.php?search_field=show_session_description&category=search_setting"
And I check the "show_session_description" radio button with "true" value
And I press "Save settings"
Then I should see "Update successful"
Then I am on "/main/index/user_portal.php"
Then I should see "Temp Session"
And I should see "Description for Temp Session"
Scenario: Delete session
Given I am on "/main/session/session_list.php?keyword=Temp+session"
And wait for the page to be loaded
And I follow "Delete"
And I confirm the popup
Then I should see "Deleted"
Scenario: Delete session "Session1"
Given I am on "/main/session/session_list.php?keyword=Session1"
And wait for the page to be loaded
And I follow "Delete"
And I confirm the popup
Then I should see "Deleted"
Scenario: Delete session category
Given I am on "/main/session/session_category_list.php"
And I follow "Delete"
And I confirm the popup
Then I should see "The selected categories have been deleted"