toolWork.feature 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. Feature: Work tool
  2. In order to use the work tool
  3. The teachers should be able to create works
  4. Scenario: Create a work
  5. Given I am a platform administrator
  6. And I am on course "TEMP" homepage
  7. And I am on "/main/work/work.php?action=create_dir&cidReq=TEMP"
  8. When I fill in the following:
  9. | new_dir | Work 1 |
  10. And I fill in ckeditor field "description" with "Work description"
  11. And I press "submit"
  12. Then I should see "Directory created"
  13. Scenario: Edit a work
  14. Given I am a platform administrator
  15. And I am on course "TEMP" homepage
  16. And I am on "/main/work/work.php?cidReq=TEMP"
  17. And wait for the page to be loaded
  18. And I follow "Work 1"
  19. Then I should see "Work description"
  20. Then I follow "Edit"
  21. Then I should see "Assignment name"
  22. And wait for the page to be loaded
  23. And I press "Validate"
  24. Then I should see "Update successful"
  25. Scenario: Send work as student
  26. Given I am a student
  27. And I am on "/main/work/work.php?cidReq=TEMP"
  28. And wait for the page to be loaded
  29. And I follow "Work 1"
  30. Then I should see "Work 1"
  31. Then I follow "Upload my assignment"
  32. Then I should see "Upload a document"
  33. Then I follow "Upload (Simple)"
  34. Then I should see "File extension"
  35. Then I attach the file "web/css/base.css" to "file"
  36. And I press "Upload"
  37. And wait for the page to be loaded
  38. Then I should see "The file has been added to the list of publications"
  39. Scenario: Check that work previously uploaded by student is available for the teacher.
  40. Given I am a platform administrator
  41. And I am on "/main/work/work.php?cidReq=TEMP"
  42. And wait for the page to be loaded
  43. And I follow "Work 1"
  44. And wait for the page to be loaded
  45. Then I should see "Work description"
  46. And wait for the page to be loaded
  47. Then I should see "base.css"
  48. # Scenario: Add a comment and a attachment to the work previously uploaded by student
  49. # Given I am a platform administrator
  50. # And I am on "/main/work/work.php?cidReq=TEMP"
  51. # And wait for the page to be loaded
  52. # And I follow "Work 1"
  53. # Then I should see "Work description"
  54. # And wait for the page to be loaded
  55. # Then I follow "Correct and rate"
  56. # Then I fill in ckeditor field "comment" with "This is a comment"
  57. # Then I attach the file "web/css/base.css" to "attachment"
  58. # And I press "Send message"
  59. # Then I should see "You comment has been added"
  60. # And I should see "Update successful"