toolDocument.feature 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. Feature: Document tool
  2. In order to use the document tool
  3. The teachers should be able to create and upload files
  4. Background:
  5. Given I am a platform administrator
  6. Scenario: Create a folder
  7. Given I am on "/main/document/document.php?cidReq=TEMP&createdir=1"
  8. Then I should see "Create folder"
  9. And I fill in the following:
  10. | dirname | My new directory |
  11. And I press "Create the folder"
  12. Then I should see "Folder created"
  13. Scenario: Create a folder that already exists
  14. Given I am on "/main/document/document.php?cidReq=TEMP&createdir=1"
  15. Then I should see "Create folder"
  16. And I fill in the following:
  17. | dirname | My new directory |
  18. And I press "Create the folder"
  19. Then I should see "Unable to create the folder"
  20. Scenario: Create a simple document
  21. Given I am on "/main/document/create_document.php?cidReq=TEMP"
  22. Then I should see "Create a rich media page / activity"
  23. Then I fill in the following:
  24. | create_document_title | My first document |
  25. And I fill in ckeditor field "content" with "This is my first document!!!"
  26. And I press "Create a rich media page / activity"
  27. Then I should see "Item added"
  28. And I should see "My first document"
  29. Then I follow "My first document"
  30. And wait for the page to be loaded
  31. Then I should see "My first document"
  32. Scenario: Create a HTML document
  33. Given I am on "/main/document/create_document.php?cidReq=TEMP"
  34. Then I should see "Create a rich media page / activity"
  35. Then I fill in the following:
  36. | create_document_title | My second document |
  37. And I fill in ckeditor field "content" with "<a href='www.chamilo.org'>Click here</a><span><strong>This is my second document!!!</strong></span>"
  38. And I press "Create a rich media page / activity"
  39. Then I should see "Item added"
  40. And I should see "My second document"
  41. Then I follow "My second document"
  42. And wait for the page to be loaded
  43. Then I should see "My second document"
  44. And I should not see "<strong>"
  45. And I should not see "www.chamilo.org"
  46. Scenario: Upload a document
  47. Given I am on "/main/document/upload.php?cidReq=TEMP"
  48. Then I should see "Upload documents"
  49. Then I follow "Upload (Simple)"
  50. Then I attach the file "web/css/base.css" to "file"
  51. When I press "Upload file"
  52. And wait for the page to be loaded
  53. Then I should see "File upload succeeded"
  54. # Scenario: Create cloud link
  55. # Given I am on "/main/document/add_link.php?cidReq=TEMP"
  56. # Then I should see "Add a link"
  57. # And I fill in the following:
  58. # | name | My dropbox link |
  59. # | url | http://dropbox.com/sh/loremipsum/loremipsum?dl=0 |
  60. # And I press "Add link to Cloud file"
  61. # Then I should see "Cloud link added"