Fix behat tests (#5880)

* CI: Fix users name displayed in test to create session

* CI: Fix behat test for matching question

* CI: Fix behat test for oral expression question

* CI: Fix behat test for Combination true/false/don't-know question

* CI: Fix users name displayed in test to create session

* Survey: Fix duplication
pull/5903/head
Angel Fernando Quiroz Campos 11 months ago committed by GitHub
parent f9af4419dc
commit a97d5b76e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      main/survey/survey.lib.php
  2. 5
      tests/behat/features/sessionAccess.feature
  3. 6
      tests/behat/features/toolExercise.feature
  4. 1
      tests/behat/features/toolSurvey.feature

@ -58,7 +58,7 @@ class SurveyManager
*/
public static function checkUniqueCode($surveyCode)
{
if (empty($courseCode)) {
if (empty($surveyCode)) {
return false;
}
$courseId = api_get_course_int_id();

@ -18,7 +18,7 @@ Feature: Session access
Then I should see "Subscribe users to this session"
Then I follow "Multiple registration"
Then wait for the page to be loaded
Then I select "Warnier Yannick (ywarnier)" from "nosessionUsersList[]"
Then I select "Yannick Warnier (ywarnier)" from "nosessionUsersList[]"
And I press "add_user"
And I press "next"
Then I should see "Session1"
@ -40,7 +40,8 @@ Feature: Session access
Then I should see "Update successful"
Then I should see "Subscribe users to this session"
Then I follow "Multiple registration"
Then I select "Mosquera Guardamino Michela (mmosquera)" from "nosessionUsersList[]"
Then wait for the page to be loaded
Then I select "Michela Mosquera Guardamino (mmosquera)" from "nosessionUsersList[]"
And I press "add_user"
And I press "next"
Then I should see "Session2"

@ -106,6 +106,7 @@ Feature: Exercise tool
And I fill in ckeditor field "option[2]" with "Option B"
And I fill in select bootstrap static input "#matches_2" select "2"
And I press "submitQuestion"
And wait for the page to be loaded
Then I should see "Item added"
Scenario: Add question "Open" to exercise created "Exercise 1"
@ -128,6 +129,7 @@ Feature: Exercise tool
| questionName | Oral expression question |
| weighting | 10 |
And I press "submitQuestion"
And wait for the page to be loaded
Then I should see "Item added"
Scenario: Add question "Exact answers combination" to exercise created "Exercise 1"
@ -206,6 +208,7 @@ Feature: Exercise tool
Then I fill in ckeditor field "comment[1]" with "Comment true"
Then I fill in ckeditor field "comment[2]" with "Comment false"
And I press "submitQuestion"
And wait for the page to be loaded
Then I should see "Item added"
Scenario: Add question "Global multiple answer" to exercise created "Exercise 1"
@ -353,7 +356,8 @@ Feature: Exercise tool
And I press "next"
Then I should see "Update successful"
Then I follow "Multiple registration"
Then I select "Costea Andrea (acostea)" from "nosessionUsersList[]"
Then wait for the page to be loaded
Then I select "Andrea Costea (acostea)" from "nosessionUsersList[]"
And I press "add_user"
And I press "next"
Then I should see "Update successful"

@ -51,6 +51,7 @@ Feature: Survey tool
Scenario: Duplicate survey
Given I am on "/main/survey/survey_list.php?cidReq=TEMP"
And I follow "Duplicate survey"
And I press "Copy survey"
Then I should see "Survey copied"
And I should see "Survey 1 Copy"

Loading…
Cancel
Save