@@ -7,42 +7,47 @@ Feature: Session management tool
77
88 Scenario : Create a session category
99 Given I am on "/main/session/session_category_add.php"
10+ And I wait for the page to be loaded
1011 When I fill in the following:
1112 | name | category_1 |
1213 And I press "Add category"
13- Then wait very long for the page to be loaded
14- Then I should see "The category has been added"
14+ And I wait for the page to be loaded
15+ Then I should see "category_1"
16+ And I should not see an error
1517
1618 @javascript
1719 Scenario : Create a session
1820 Given I am on "/main/session/session_add.php"
21+ And I wait for the page to be loaded
1922 When I fill in the following:
20- | name | Session1 |
23+ | title | Session 1 |
2124 And I fill in select2 input "#coach_username" with id "1" and value "admin"
2225 And I press "submit"
23- Then wait for the page to be loaded
24- Then I should see "Add courses to this session (Session1 )"
25- Then I fill in ajax select2 input "#courses" with id "2 " and value "TEMP"
26+ And I wait for the page to be loaded
27+ Then I should see "Add courses to this session (Session 1 )"
28+ When I fill in ajax select2 input "#courses" with id "1 " and value "TEMP"
2629 And I press "submit"
27- And wait for the page to be loaded
28- Then I should see "Update successful"
30+ And I wait for the page to be loaded
31+ Then I should see "Session 1"
32+ And I should not see an error
2933
3034 @javascript
3135 Scenario : Create a session with description
3236 Given I am on "/main/session/session_add.php"
37+ And I wait for the page to be loaded
3338 When I fill in the following:
34- | name | Temp Session |
39+ | title | Temp Session |
3540 And I press "advanced_params"
3641 And I fill in select2 input "#coach_username" with id "1" and value "admin"
37- And wait for the page to be loaded
42+ And I wait for the page to be loaded
3843 And I fill in editor field "description" with "Description for Temp Session"
3944 And I press "submit"
40- Then wait for the page to be loaded
45+ And I wait for the page to be loaded
4146 Then I should see "Add courses to this session (Temp Session)"
42- Then I fill in ajax select2 input "#courses" with id "2 " and value "TEMP"
47+ When I fill in ajax select2 input "#courses" with id "1 " and value "TEMP"
4348 And I press "submit"
44- And wait for the page to be loaded
45- Then I should see "Update successful"
49+ And I wait for the page to be loaded
50+ Then I should not see an error
4651
4752# Scenario: Check session description is not present
4853# Given I am on "/main/index/user_portal.php"
@@ -51,56 +56,67 @@ Feature: Session management tool
5156
5257 Scenario : Edit session description setting
5358 Given I am on "/main/session/session_list.php?keyword=Temp+session"
54- And wait for the page to be loaded
55- And I follow "Temp Session"
56- And I follow "Edit"
57- And wait for the page to be loaded
58- When I press "advanced_params"
59+ And I wait for the page to be loaded
60+ When I follow "Temp Session"
61+ And I wait for the page to be loaded
62+ And I click the "i.mdi-pencil" element
63+ And I wait for the page to be loaded
64+ And I press "advanced_params"
5965 And I check "Show description"
6066 And I press "submit"
61- Then wait very long for the page to be loaded
67+ And I wait for the page to be loaded
6268 Then I should not see an error
6369 #Then I should see "Update successful"
6470
6571 Scenario : Check session description with platform setting off
6672 Given I am on "/admin/settings/search_settings?keyword=show_session_description"
67- And I select "No" from "form_show_session_description"
73+ And I wait for the page to be loaded
74+ When I select "No" from "form_show_session_description"
6875 And I press "Save settings"
69- Then wait very long for the page to be loaded
70- Then I should see "Settings have been successfully updated"
76+ And I wait for the page to be loaded
77+ Then I should see "Show session description"
78+ And I should see "No"
79+ And I should not see an error
7180# Then I am on "/main/index/user_portal.php"
7281# Then I should see "Temp Session"
7382# And I should not see "Description for Temp Session"
7483
7584 Scenario : Check session description with platform setting on
7685 Given I am on "/admin/settings/search_settings?keyword=show_session_description"
77- And I select "Yes" from "form_show_session_description"
86+ And I wait for the page to be loaded
87+ When I select "Yes" from "form_show_session_description"
7888 And I press "Save settings"
79- Then wait very long for the page to be loaded
80- Then I should see "Settings have been successfully updated"
89+ And I wait for the page to be loaded
90+ Then I should see "Show session description"
91+ And I should see "Yes"
92+ And I should not see an error
8193# Then I am on "/main/index/user_portal.php"
8294# Then I should see "Temp Session"
8395# And I should see "Description for Temp Session"
8496
8597 Scenario : Delete session
8698 Given I am on "/main/session/session_list.php?keyword=Temp+session"
87- And wait for the page to be loaded
88- And I follow "Delete"
99+ And I wait for the page to be loaded
100+ When I click the "i.mdi-delete" element
89101 And I confirm the popup
90- Then wait very long for the page to be loaded
91- Then I should see "Deleted"
102+ And I wait for the page to be loaded
103+ Then I should not see "Temp session"
104+ And I should not see an error
92105
93- Scenario : Delete session "Session1 "
94- Given I am on "/main/session/session_list.php?keyword=Session1 "
95- And wait for the page to be loaded
96- And I follow "Delete"
106+ Scenario : Delete session "Session 1 "
107+ Given I am on "/main/session/session_list.php?keyword=Session+1 "
108+ And I wait for the page to be loaded
109+ When I click the "i.mdi-delete" element
97110 And I confirm the popup
98- Then wait very long for the page to be loaded
99- Then I should see "Deleted"
111+ And I wait for the page to be loaded
112+ Then I should not see "Session 1"
113+ And I should not see an error
100114
101115 Scenario : Delete session category
102116 Given I am on "/main/session/session_category_list.php"
103- And I follow "Delete"
117+ And I wait for the page to be loaded
118+ When I click the "i.mdi-delete" element
104119 And I confirm the popup
105- And wait very long for the page to be loaded
106- Then I should see "The selected categories have been deleted"
120+ And I wait for the page to be loaded
121+ Then I should not see "category_1"
122+ And I should not see an error
0 commit comments