diff --git a/tests/behat/features/profile.feature b/tests/behat/features/profile.feature
index 3b081f0104..d2b66c7cf7 100644
--- a/tests/behat/features/profile.feature
+++ b/tests/behat/features/profile.feature
@@ -10,6 +10,7 @@ Feature: Profile page
Then I follow "Edit profile"
Then I fill in the following:
| profile_firstname | Andrew |
+ And wait for the page to be loaded
And I press "Update profile"
And wait for the page to be loaded
Then I should see "Updated"
diff --git a/tests/behat/features/toolDocument.feature b/tests/behat/features/toolDocument.feature
index b0d4b1b271..50f7df3850 100644
--- a/tests/behat/features/toolDocument.feature
+++ b/tests/behat/features/toolDocument.feature
@@ -6,63 +6,52 @@ Feature: Document tool
Given I am a platform administrator
Scenario: Create a folder
- Given I am on "/main/document/document.php?cid=1&createdir=1"
- Then I should see "Create folder"
+ Given I am on "/resources/document/files?cid=1&sid=0"
+ Then I press "New folder"
And I fill in the following:
- | dirname | My new directory |
- And I press "Create the folder"
- Then I should see "Folder created"
+ | c_document_title | My new directory |
+ And I press "Save"
+ Then I should see "Saved"
Scenario: Create a folder that already exists
- Given I am on "/main/document/document.php?cid=1&createdir=1"
- Then I should see "Create folder"
+ Given I am on "/resources/document/files?cid=1&sid=0"
+ Then I press "New folder"
And I fill in the following:
- | dirname | My new directory |
- And I press "Create the folder"
- Then I should see "Unable to create the folder"
+ | c_document_title | My new directory |
+ And I press "Save"
+ Then I should see "Saved"
Scenario: Create a simple document
- Given I am on "/main/document/create_document.php?cid=1"
- Then I should see "Create a rich media page / activity"
+ Given I am on "/resources/document/files?cid=1&sid=0"
+ Then I follow "Create new document"
Then I fill in the following:
- | create_document_title | My first document |
- And I fill in ckeditor field "content" with "This is my first document!!!"
- And I press "Create a rich media page / activity"
- Then I should see "Item added"
- And I should see "My first document"
- Then I follow "My first document"
+ | c_document_title | My first document |
+ And I fill in ckeditor field "c_document_content" with "This is my first document!!!"
+ And I press "Save"
+ Then I should see "Saved"
+ And I should see "My first document.html"
+ Then I follow "My first document.html"
And wait for the page to be loaded
- Then I should see "My first document"
+ Then I should see "This is my first document"
Scenario: Create a HTML document
- Given I am on "/main/document/create_document.php?cid=1"
- Then I should see "Create a rich media page / activity"
+ Given I am on "/resources/document/files?cid=1&sid=0"
+ Then I follow "Create new document"
Then I fill in the following:
- | create_document_title | My second document |
- And I fill in ckeditor field "content" with "Click hereThis is my second document!!!"
- And I press "Create a rich media page / activity"
- Then I should see "Item added"
- And I should see "My second document"
- Then I follow "My second document"
+ | c_document_title | My second document | |
+ And I fill in ckeditor field "c_document_content" with "Click hereThis is my second document!!!"
+ And I press "Save"
+ Then I should see "Saved"
+ And I should see "My second document.html"
+ Then I follow "My second document.html"
And wait for the page to be loaded
- Then I should see "My second document"
+ Then I should see "This is my second document"
And I should not see ""
And I should not see "www.chamilo.org"
Scenario: Upload a document
- Given I am on "/main/document/upload.php?cid=1"
- Then I should see "Upload documents"
- Then I follow "Upload (Simple)"
- Then I attach the file "/public/favicon.ico" to "file"
- When I press "Upload file"
+ Given I am on "/resources/document/files?cid=1&sid=0"
+ Then I follow "Upload"
+ Then I attach the file "/public/favicon.ico" to "fileupload"
And wait for the page to be loaded
Then I should see "File upload succeeded"
-
-# Scenario: Create cloud link
-# Given I am on "/main/document/add_link.php?cid=1"
-# Then I should see "Add a link"
-# And I fill in the following:
-# | name | My dropbox link |
-# | url | http://dropbox.com/sh/loremipsum/loremipsum?dl=0 |
-# And I press "Add link to Cloud file"
-# Then I should see "Cloud link added"