|
|
|
@ -11,17 +11,17 @@ Feature: Session access |
|
|
|
|
And I fill in select2 input "#coach_username" with id "1" and value "admin" |
|
|
|
|
And I press "submit" |
|
|
|
|
Then I should see "Add courses to this session (Session1)" |
|
|
|
|
Then I select "TEMP (TEMP)" from "NoSessionCoursesList[]" |
|
|
|
|
Then I select "TEMP_PRIVATE (TEMPPRIVATE)" from "NoSessionCoursesList[]" |
|
|
|
|
And I press "add_course" |
|
|
|
|
And I press "next" |
|
|
|
|
Then I should see "Update successful" |
|
|
|
|
Then I should see "Subscribe users to this session" |
|
|
|
|
Then I press "Multiple registration" |
|
|
|
|
Then I follow "Multiple registration" |
|
|
|
|
Then I select "Warnier Yannick (ywarnier)" from "nosessionUsersList[]" |
|
|
|
|
And I press "add_user" |
|
|
|
|
And I press "next" |
|
|
|
|
Then I should see "Session1" |
|
|
|
|
Then I should see "TEMP" |
|
|
|
|
Then I should see "TEMPPRIVATE" |
|
|
|
|
Then I should see "ywarnier" |
|
|
|
|
|
|
|
|
|
@javascript |
|
|
|
@ -33,42 +33,55 @@ Feature: Session access |
|
|
|
|
And I fill in select2 input "#coach_username" with id "1" and value "admin" |
|
|
|
|
And I press "submit" |
|
|
|
|
Then I should see "Add courses to this session (Session2)" |
|
|
|
|
Then I select "TEMP (TEMP)" from "NoSessionCoursesList[]" |
|
|
|
|
Then I select "TEMP_PRIVATE (TEMPPRIVATE)" from "NoSessionCoursesList[]" |
|
|
|
|
And I press "add_course" |
|
|
|
|
And I press "next" |
|
|
|
|
Then I should see "Update successful" |
|
|
|
|
Then I should see "Subscribe users to this session" |
|
|
|
|
Then I press "Multiple registration" |
|
|
|
|
Then I select "Mosquera Michela (mmosquera)" from "nosessionUsersList[]" |
|
|
|
|
Then I follow "Multiple registration" |
|
|
|
|
Then I select "Mosquera Guardamino Michela (mmosquera)" from "nosessionUsersList[]" |
|
|
|
|
And I press "add_user" |
|
|
|
|
And I press "next" |
|
|
|
|
Then I should see "Session2" |
|
|
|
|
Then I should see "TEMP" |
|
|
|
|
Then I should see "TEMPPRIVATE" |
|
|
|
|
Then I should see "mmosquera" |
|
|
|
|
|
|
|
|
|
Scenario: Connect to session 2 |
|
|
|
|
Scenario: ywarnier connects to Session1 |
|
|
|
|
Given I am logged as "ywarnier" |
|
|
|
|
And I am on course "TEMP" homepage in session "1" |
|
|
|
|
Then I am on course "TEMPPRIVATE" homepage in session "Session1" |
|
|
|
|
Then I should not see "You are not allowed" |
|
|
|
|
And I am on course "TEMP" homepage in session "2" |
|
|
|
|
|
|
|
|
|
Scenario: ywarnier connect to Session 2 |
|
|
|
|
Given I am logged as "ywarnier" |
|
|
|
|
Then I am on course "TEMPPRIVATE" homepage in session "Session2" |
|
|
|
|
Then I should see "You are not allowed" |
|
|
|
|
|
|
|
|
|
Scenario: ywarnier connect to session that doesn't exists |
|
|
|
|
Given I am logged as "ywarnier" |
|
|
|
|
And I am on course "TEMPPRIVATE" homepage in session "Session does not exists" |
|
|
|
|
Then I should see "You are not allowed" |
|
|
|
|
|
|
|
|
|
Scenario: Connect to session 2 |
|
|
|
|
Scenario: mmosquera connect to Session 1 |
|
|
|
|
Given I am logged as "mmosquera" |
|
|
|
|
And I am on course "TEMP" homepage in session "2" |
|
|
|
|
Then I should not see "You are not allowed" |
|
|
|
|
And I am on course "TEMP" homepage in session "1" |
|
|
|
|
Then I am on course "TEMPPRIVATE" homepage in session "Session1" |
|
|
|
|
Then I should see "You are not allowed" |
|
|
|
|
|
|
|
|
|
Scenario: mmosquera connect to Session 2 |
|
|
|
|
Given I am logged as "mmosquera" |
|
|
|
|
Then I am on course "TEMPPRIVATE" homepage in session "Session2" |
|
|
|
|
Then I should not see "You are not allowed" |
|
|
|
|
|
|
|
|
|
Scenario: Delete session "Session2" |
|
|
|
|
Given I am on "/main/session/session_list.php?keyword=Session2" |
|
|
|
|
Given I am a platform administrator |
|
|
|
|
And I am on "/main/session/session_list.php?keyword=Session2" |
|
|
|
|
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" |
|
|
|
|
Given I am a platform administrator |
|
|
|
|
And 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 |
|
|
|
|