toolLp.feature 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Feature: LP tool
  2. In order to use the LP tool
  3. The teachers should be able to create LPs
  4. Background:
  5. Given I am a platform administrator
  6. And I am on course "TEMP" homepage
  7. Scenario: Create a LP category
  8. Given I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=add_lp_category"
  9. When I fill in the following:
  10. | name | LP category 1 |
  11. And I press "submit"
  12. Then I should see "Added"
  13. Scenario: Create a LP
  14. Given I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=add_lp"
  15. When I fill in the following:
  16. | lp_name | LP 1 |
  17. # And I select "LP category 1" from "category_id"
  18. And I press "submit"
  19. Then I should see "Click on the [Learner view] button to see your learning path"
  20. Scenario: Add document to LP
  21. Given I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=list"
  22. And I follow "Edit learnpath"
  23. And I follow "Create a new document"
  24. When I fill in the following:
  25. | idTitle | Document 1 |
  26. And I fill in ckeditor field "content_lp" with "Sample HTML text"
  27. And I press "submit_button"
  28. Then I should see "Document 1"
  29. Scenario: Add an exercise to LP
  30. Given I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=list"
  31. And I follow "Edit learnpath"
  32. And I follow "Tests"
  33. And I follow "Exercise 1"
  34. Then I should see "Adding a test to the course"
  35. And I press "submit_button"
  36. Then I should see "Click on the [Learner view] button to see your learning path"
  37. And I should see "Exercise 1"
  38. Scenario: Enter LP
  39. Given I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=list"
  40. And I follow "LP 1"
  41. And wait for the page to be loaded
  42. Then I should see "LP 1"
  43. And I should see "Document 1"
  44. And I should see "Exercise 1"
  45. Scenario: Delete a LP category
  46. Given I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=list"
  47. And I follow "Delete"
  48. Then I should not see "LP category 1"
  49. Scenario: Delete a LP
  50. Given I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=list"
  51. And I follow "Delete"
  52. And I confirm the popup
  53. Then I should not see "LP 1"