Browse Source

Add LP create delete tests.

jmontoyaa 8 years ago
parent
commit
1b0c1c898b
1 changed files with 42 additions and 0 deletions
  1. 42 0
      tests/behat/features/lp.feature

+ 42 - 0
tests/behat/features/lp.feature

@@ -0,0 +1,42 @@
+Feature: LP tool
+  In order to use the LP tool
+  The teachers should be able to create LPs
+
+  Background:
+    Given I am a platform administrator
+    And I am on course "TEMP" homepage
+
+    Scenario: Create a LP category
+    Given I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=add_lp_category"
+    When I fill in the following:
+      | name | LP category 1 |
+    And I press "submit"
+    Then I should see "Added"
+
+    Scenario: Create a LP
+    Given I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=add_lp"
+    When I fill in the following:
+      | lp_name | LP 1 |
+    And I select "LP category 1" from "category_id"
+    And I press "submit"
+    Then I should see "Click on the [Learner view] button to see your learning path"
+
+#    Scenario: Add document to LP
+#    Given I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=list"
+#    And I follow "Edit learnpath"
+#    When I fill in the following:
+#      | idTitle | Document 1 |
+#      | content_lp | Sample text |
+#    And I press "submit_button"
+#    Then I should see "Document 1"
+
+    Scenario: Delete a LP category
+    Given I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=list"
+    And I follow "Delete"
+    Then I should not see "LP category 1"
+
+    Scenario: Delete a LP
+    Given I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=list"
+    And I follow "Delete"
+    Then I should not see "LP 1"
+