toolLp.feature 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. And I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=list"
  46. Then I should see "LP 1"
  47. # Scenario: Check the PDF export in LP list if hide SCORM PDF link is false
  48. # Given I am on "/main/admin/settings.php?category=Course"
  49. # And I check the "hide_scorm_pdf_link" radio button with "false" value
  50. # And I press "Save settings"
  51. # And I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=list&isStudentView=true"
  52. # Then I should see an icon with title "Export to PDF"
  53. #
  54. # Scenario: Check the PDF export in LP list if hide SCORM PDF link is true
  55. # Given I am on "/main/admin/settings.php?category=Course"
  56. # And I check the "hide_scorm_pdf_link" radio button with "true" value
  57. # And I press "Save settings"
  58. # And I am on "/main/lp/lp_controller.php?cidReq=TEMP&action=list&isStudentView=true"
  59. # Then I should not see an icon with title "Export to PDF"
  60. Scenario: LP exists and LP category exists
  61. And I am on "/main/lp/lp_controller.php?cidReq=TEMP&id_session=0&gidReq=0&gradebook=0&origin="
  62. Then I should see "LP 1"
  63. And I should see "LP category 1"
  64. Scenario: Delete a LP
  65. Given I am on "/main/lp/lp_controller.php?cidReq=TEMP"
  66. And I follow "Delete"
  67. And I confirm the popup
  68. Then I should not see "LP 1"
  69. Scenario: Delete a LP category
  70. Given I am on "/main/lp/lp_controller.php?cidReq=TEMP"
  71. Then I should see "LP category 1"
  72. And I follow "Delete"
  73. Then I should see "Deleted"