Browse Source

Update from 1.11.x

Julio 6 years ago
parent
commit
581a3d5dc9

+ 0 - 0
tests/.gitignore


+ 1 - 1
tests/behat/features/bootstrap/FeatureContext.php

@@ -367,7 +367,7 @@ class FeatureContext extends MinkContext
     public function waitVeryLongForThePageToBeLoaded()
     {
         //$this->getSession()->wait(10000, "document.readyState === 'complete'");
-        $this->getSession()->wait(6000);
+        $this->getSession()->wait(8000);
     }
 
     /**

+ 2 - 2
tests/behat/features/course_user_registration.feature

@@ -7,7 +7,7 @@ Feature: Subscribe users to the course
     Given I am on "/main/user/subscribe_user.php?keyword=amann&type=5&cidReq=TEMP"
     Then I should see "Aimee"
     Then I follow "Register"
-    Then I should see "Aimee Mann (amann) has been registered to your course"
+    Then I should see "User Aimee Mann (amann) has been registered to course TEMP"
 
   Scenario: Unsubscribe user "amann" the course "TEMP"
     Given I am on "/main/user/user.php?cidReq=TEMP"
@@ -20,4 +20,4 @@ Feature: Subscribe users to the course
     Given I am on "/main/user/subscribe_user.php?keyword=acostea&type=5&cidReq=TEMP"
     Then I should see "Andrea"
     Then I follow "Register"
-    Then I should see "Andrea Costea (acostea) has been registered to your course"
+    Then I should see "User Andrea Costea (acostea) has been registered to course TEMP"

+ 3 - 2
tests/behat/features/sessionManagement.feature

@@ -31,8 +31,9 @@ Feature: Session management tool
     Given I am on "/main/session/session_add.php"
     When I fill in the following:
       | name | Temp Session |
-    And I fill in select2 input "#coach_username" with id "1" and value "admin"
     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)"
@@ -92,4 +93,4 @@ Feature: Session management tool
     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"
+    Then I should see "The selected categories have been deleted"

+ 8 - 2
tests/behat/features/toolAnnouncement.feature

@@ -14,7 +14,10 @@ Feature: Announcement tool
     And I select "John Doe" from "users"
     And I press "add"
     And I fill in ckeditor field "content" with "Announcement description"
-    And I press "submit"
+    And I follow "Preview"
+    And wait for the page to be loaded
+    Then I should see "Announcement will be sent to"
+    Then I press "submit"
     Then I should see "Announcement has been added"
 
   Scenario: Create an announcement for all users
@@ -22,7 +25,10 @@ Feature: Announcement tool
     When I fill in the following:
       | title   | Announcement test                       |
     And I fill in ckeditor field "content" with "Announcement description"
-    And I press "submit"
+    And I follow "Preview"
+    And wait for the page to be loaded
+    Then I should see "Announcement will be sent to"
+    Then I press "submit"
     Then I should see "Announcement has been added"
 
   Scenario: Delete all announcements

+ 16 - 1
tests/behat/features/toolDocument.feature

@@ -21,7 +21,7 @@ Feature: Document tool
     And I press "Create the folder"
     Then I should see "Unable to create the folder"
 
-  Scenario: Create a HTML document
+  Scenario: Create a simple document
     Given I am on "/main/document/create_document.php?cidReq=TEMP"
     Then I should see "Create a rich media page / activity"
     Then I fill in the following:
@@ -34,6 +34,21 @@ Feature: Document tool
     And wait for the page to be loaded
     Then I should see "My first document"
 
+  Scenario: Create a HTML document
+    Given I am on "/main/document/create_document.php?cidReq=TEMP"
+    Then I should see "Create a rich media page / activity"
+    Then I fill in the following:
+      | create_document_title   | My second document                       |
+    And I fill in ckeditor field "content" with "<a href='www.chamilo.org'>Click here</a><span><strong>This is my second document!!!</strong></span>"
+    And I press "Create a rich media page / activity"
+    Then I should see "Item added"
+    And I should see "My second document"
+    Then I follow "My second document"
+    And wait for the page to be loaded
+    Then I should see "My second document"
+    And I should not see "<strong>"
+    And I should not see "www.chamilo.org"
+
   Scenario: Upload a document
     Given I am on "/main/document/upload.php?cidReq=TEMP"
     Then I should see "Upload documents"

+ 2 - 0
tests/behat/features/toolExercise.feature

@@ -373,8 +373,10 @@ Feature: Exercise tool
     And I select "B" from "choice_id_7_2"
     And I select "C" from "choice_id_7_3"
     And I press "Next question"
+    And wait for the page to be loaded
     And I check "1"
     And I press "Next question"
+    And wait for the page to be loaded
     And I press "End test"
     Then I should see "Score for the test: 190 / 190"
     And I should see the table "#category_results":