Browse Source

Behat: update tests

jmontoyaa 8 years ago
parent
commit
3ea5a9a7b0

+ 5 - 1
tests/behat/README.md

@@ -1,7 +1,11 @@
 In order to run tests locally:
 
 - An administrator user should be created with:
-Username "admin" and password "admin" with user_id = 1 
+    - Username "admin" 
+    - Password "admin"
+    - First name John
+    - Last name Doe
+    - user_id = 1 
 
 - Edit file tests/behat/behat.yml
   An update your Chamilo URL.

+ 20 - 22
tests/behat/features/session.feature

@@ -12,28 +12,26 @@ Feature: Session tool
     And I press "Add category"
     Then I should see "The category has been added"
 
-  @javascript
-  Scenario: Create a session
-    Given I am on "/main/session/session_add.php"
-    When I fill in the following:
-      | name | Session 1 |
-    And I fill in select2 input "#coach_username" with id "1" and value "admin"
-#    And I follow "Advanced settings"
-#    And I fill in select bootstrap input "#session_category" with "category_1" and select "category_1"
-    And I press "submit"
-    Then I should see "Add courses to this session (Session 1)"
-    Then I select "TEMP (TEMP)" from "NoSessionCoursesList[]"
-    And I press "add_course"
-    And I press "next"
-    Then I should see "Update successful"
-
-  Scenario: Delete session
-    Given I am on "/main/session/session_list.php?keyword=Session+1"
-    And wait for the page to be loaded
-    And I follow "Delete"
-    And I confirm the popup
-    Then I should see "Deleted"
-
+#  @javascript
+#  Scenario: Create a session
+#    Given I am on "/main/session/session_add.php"
+#    When I fill in the following:
+#      | name | Session 1 |
+#    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 (Session 1)"
+#    Then I select "TEMP (TEMP)" from "NoSessionCoursesList[]"
+#    And I press "add_course"
+#    And I press "next"
+#    Then I should see "Update successful"
+#
+#  Scenario: Delete session
+#    Given I am on "/main/session/session_list.php?keyword=Session+1"
+#    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 category
     Given I am on "/main/session/session_category_list.php"
     And I follow "Delete"

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

@@ -10,7 +10,7 @@ Feature: Announcement tool
     Given I am on "/main/announcements/announcements.php?action=add&cidReq=TEMP"
     When I fill in the following:
       | title   | Announcement test                       |
-    And I select "admin admin" from "users-f"
+    And I select "John Doe" from "users-f"
     And I press "add"
     And I fill in ckeditor field "content" with "Announcement description"
     And I press "submit"
@@ -19,7 +19,7 @@ Feature: Announcement tool
   Scenario: Delete all announcements
     Given I am on "/main/announcements/announcements.php?cidReq=TEMP"
     When I follow "Clear list of announcements"
-#    And I confirm the popup
+    And I confirm the popup
     Then I should see "All announcements have been deleted"