toolGroup.feature 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. Feature: Group tool
  2. In order to use the group tool
  3. The teachers should be able to create groups
  4. Background:
  5. Given I am a platform administrator
  6. And I am on course "TEMP" homepage
  7. Scenario: Create a group directory
  8. Given I am on "/main/group/group_category.php?cidReq=TEMP&id_session=0&action=add_category"
  9. When I fill in the following:
  10. | title | Group category 1 |
  11. And I press "group_category_submit"
  12. Then I should see "Category created"
  13. Scenario: Create a group
  14. Given I am on "/main/group/group_creation.php?cidReq=TEMP&id_session=0"
  15. When I fill in the following:
  16. | number_of_groups | 1 |
  17. And I press "submit"
  18. Then I should see "New groups creation"
  19. When I fill in the following:
  20. | group_0_places | 1 |
  21. And I press "submit"
  22. Then I should see "group(s) has (have) been added"
  23. Scenario: Create document folder in group
  24. Given I am on "/main/group/group.php?cidReq=TEMP&id_session=0"
  25. And I follow "Group 0001"
  26. Then I should see "Group 0001"
  27. And I follow "Documents"
  28. Then I should see "There are no documents to be displayed"
  29. Then I follow "Create folder"
  30. Then I should see "Create folder"
  31. Then I fill in the following:
  32. | dirname | My folder in group |
  33. And I press "create_dir_form_submit"
  34. Then I should see "Folder created"
  35. Scenario: Create document inside folder in group
  36. Given I am on "/main/group/group.php?cidReq=TEMP&id_session=0"
  37. And I follow "Group 0001"
  38. Then I should see "Group 0001"
  39. And I follow "Documents"
  40. Then I should see "My folder in group"
  41. Then I follow "My folder in group"
  42. Then I follow "Create a rich media page / activity"
  43. Then I should see "Create a rich media page"
  44. Then I fill in the following:
  45. | title | html test |
  46. And I fill in ckeditor field "content" with "My first HTML!!"
  47. Then I press "create_document_submit"
  48. Then I should see "Item added"
  49. Scenario: Upload a document inside folder in group
  50. Given I am on "/main/group/group.php?cidReq=TEMP&id_session=0"
  51. And I follow "Group 0001"
  52. Then I should see "Group 0001"
  53. And I follow "Documents"
  54. Then I should see "My folder in group"
  55. Then I follow "My folder in group"
  56. Then I follow "Upload documents"
  57. Then I follow "Upload (Simple)"
  58. Then I attach the file "css/base.css" to "file"
  59. Then wait for the page to be loaded
  60. Then I press "upload_submitDocument"
  61. Then wait for the page to be loaded
  62. Then I should see "File upload succeeded"
  63. Scenario: Delete 2 uploaded files
  64. Given I am on "/main/group/group.php?cidReq=TEMP&id_session=0"
  65. And I follow "Group 0001"
  66. Then I should see "Group 0001"
  67. And I follow "Documents"
  68. Then I should see "My folder in group"
  69. Then I follow "My folder in group"
  70. Then I follow "Delete"
  71. And I confirm the popup
  72. Then I should see "Document deleted"
  73. Then I follow "Delete"
  74. And I confirm the popup
  75. Then I should see "Document deleted"
  76. Scenario: Delete directory
  77. Given I am on "/main/group/group.php?cidReq=TEMP&id_session=0"
  78. And I follow "Group 0001"
  79. Then I should see "Group 0001"
  80. And I follow "Documents"
  81. Then I should see "My folder in group"
  82. Then I follow "Delete"
  83. And I confirm the popup
  84. Then I should see "Document deleted"