Internal - Fix behat tests, fix lang vars

pull/3464/head
Julio Montoya 5 years ago
parent 13cca1e339
commit 80355de806
  1. 8
      public/main/inc/lib/sessionmanager.lib.php
  2. 2
      public/main/session/session_list.php
  3. 4
      tests/behat/features/createUser.feature
  4. 10
      tests/behat/features/sessionAccess.feature
  5. 2
      tests/behat/features/toolWork.feature

@ -9484,19 +9484,19 @@ class SessionManager
{
$tabs = [
[
'content' => get_lang('AllSessionsShort'),
'content' => get_lang('All sessions'),
'url' => api_get_path(WEB_CODE_PATH).'session/session_list.php?list_type=all',
],
[
'content' => get_lang('ActiveSessionsShort'),
'content' => get_lang('Active sessions'),
'url' => api_get_path(WEB_CODE_PATH).'session/session_list.php?list_type=active',
],
[
'content' => get_lang('ClosedSessionsShort'),
'content' => get_lang('Closed sessions'),
'url' => api_get_path(WEB_CODE_PATH).'session/session_list.php?list_type=close',
],
[
'content' => get_lang('SessionListCustom'),
'content' => get_lang('Custom sessions'),
'url' => api_get_path(WEB_CODE_PATH).'session/session_list.php?list_type=custom',
],
/*[

@ -51,7 +51,7 @@ switch ($action) {
break;
}
$tool_name = get_lang('SessionList');
$tool_name = get_lang('Session list');
Display::display_header($tool_name);
$courseId = isset($_GET['course_id']) ? $_GET['course_id'] : null;

@ -144,7 +144,7 @@ Feature: Users management as admin
Then I follow "teacher lastname"
And wait for the page to be loaded
And I follow "Login as"
And wait for the page to be loaded
And wait very long for the page to be loaded
Then I should see "Login successful"
Scenario: HRM logs as student
@ -156,5 +156,5 @@ Feature: Users management as admin
Then I follow "student lastname"
And wait for the page to be loaded
And I follow "Login as"
And wait for the page to be loaded
And wait very long for the page to be loaded
Then I should see "Login successful"

@ -19,6 +19,7 @@ Feature: Session access
Then I should see "Subscribe users to this session"
Then I follow "Multiple registration"
And wait very long for the page to be loaded
And wait very long for the page to be loaded
Then I select "Warnier Yannick (ywarnier)" from "nosessionUsersList[]"
And I press "add_user"
And I press "next"
@ -53,26 +54,35 @@ Feature: Session access
Then I should see "mmosquera"
Scenario: ywarnier connects to Session1
Given I am not logged
Given I am logged as "ywarnier"
Then I am on course "TEMPPRIVATE" homepage in session "Session1"
And wait the page to be loaded when ready
Then I should not see "You are not allowed"
Scenario: ywarnier connect to Session 2
Given I am not logged
Given I am logged as "ywarnier"
Then I am on course "TEMPPRIVATE" homepage in session "Session2"
And wait the page to be loaded when ready
Then I should see "Unauthorised access to course"
Scenario: ywarnier connect to session that doesn't exists
Given I am not logged
Given I am logged as "ywarnier"
And I am on course "TEMPPRIVATE" homepage in session "Session does not exists"
And wait the page to be loaded when ready
Then I should see "You are not allowed"
Scenario: mmosquera connect to Session 1
Given I am not logged
Given I am logged as "mmosquera"
Then I am on course "TEMPPRIVATE" homepage in session "Session1"
And wait the page to be loaded when ready
Then I should see "Unauthorised access to course"
Scenario: mmosquera connect to Session 2
Given I am not logged
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"

@ -28,6 +28,7 @@ Feature: Work tool
Then I should see "Update successful"
Scenario: Send work as student
Given I am not logged
Given I am a student
And I am on "/main/work/work.php?cid=1"
And wait very long for the page to be loaded
@ -43,6 +44,7 @@ Feature: Work tool
Then I should see "The file has been added to the list of publications"
Scenario: Check that work previously uploaded by student is available for the teacher.
Given I am not logged
Given I am a platform administrator
And I am on "/main/work/work.php?cid=1"
And wait for the page to be loaded

Loading…
Cancel
Save