Commit fcb6ed47 authored by Marina Glancy's avatar Marina Glancy
Browse files

MDL-42174 More behat tests for filepicker

parent c36a2401
......@@ -29,7 +29,8 @@
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
use Behat\Mink\Exception\ExpectationException as ExpectationException,
Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException;
Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException,
Behat\Mink\Element\NodeElement as NodeElement;
/**
* Steps definitions base class.
......@@ -39,6 +40,11 @@ use Behat\Mink\Exception\ExpectationException as ExpectationException,
* It can not contain steps definitions to avoid duplicates, only utility
* methods shared between steps.
*
* @method NodeElement find_field(string $locator) Finds a form element
* @method NodeElement find_button(string $locator) Finds a form input submit element or a button
* @method NodeElement find_link(string $locator) Finds a link on a page
* @method NodeElement find_file(string $locator) Finds a forum input file element
*
* @package core
* @category test
* @copyright 2012 David Monllaó
......
......@@ -32,7 +32,7 @@
require_once(__DIR__ . '/behat_base.php');
use Behat\Mink\Exception\ExpectationException as ExpectationException,
Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException;
Behat\Mink\Element\NodeElement as NodeElement;
/**
* Files-related actions.
......@@ -104,7 +104,7 @@ class behat_files extends behat_base {
*
* @throws ExpectationException Thrown by behat_base::find
* @param string $name The name of the folder/file
* @param string $filepickerelement The filepicker locator, the whole DOM if false
* @param string $filepickerelement The filepicker form element locator, the repository items are in filepicker modal window if false
* @return void
*/
protected function open_element_contextual_menu($name, $filepickerelement = false) {
......@@ -115,6 +115,9 @@ class behat_files extends behat_base {
if ($filepickerelement) {
$containernode = $this->get_filepicker_node($filepickerelement);
$exceptionmsg = 'The "'.$filepickerelement.'" filepicker ' . $exceptionmsg;
$locatorprefix = "//div[@class='fp-content']";
} else {
$locatorprefix = "//div[contains(concat(' ', normalize-space(@class), ' '), ' fp-repo-items ')]//descendant::div[@class='fp-content']";
}
$exception = new ExpectationException($exceptionmsg, $this->getSession());
......@@ -128,7 +131,7 @@ class behat_files extends behat_base {
// First we look at the folder as we need to click on the contextual menu otherwise it would be opened.
$node = $this->find(
'xpath',
"//div[@class='fp-content']" .
$locatorprefix .
"//descendant::*[self::div | self::a][contains(concat(' ', normalize-space(@class), ' '), ' fp-file ')]" .
"[contains(concat(' ', normalize-space(@class), ' '), ' fp-folder ')]" .
"[normalize-space(.)=$name]" .
......@@ -142,7 +145,7 @@ class behat_files extends behat_base {
// Here the contextual menu is hidden, we click on the thumbnail.
$node = $this->find(
'xpath',
"//div[@class='fp-content']" .
$locatorprefix .
"//descendant::*[self::div | self::a][contains(concat(' ', normalize-space(@class), ' '), ' fp-file ')]" .
"[normalize-space(.)=$name]" .
"//descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' fp-thumbnail ')]",
......
......@@ -27,7 +27,8 @@
require_once(__DIR__ . '/../../../lib/behat/behat_base.php');
use Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException;
use Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException,
Behat\Behat\Context\Step\Given as Given;
/**
* Deprecated behat step definitions.
......@@ -94,6 +95,27 @@ class behat_deprecated extends behat_base {
);
}
/**
* Adds the specified file from the 'Recent files' repository to the specified filepicker of the current page.
*
* @deprecated since 2.7
* @todo MDL-42862 This will be deleted in Moodle 2.9
* @see behat_filepicker::i_add_file_from_repository_to_filemanager()
*
* @When /^I add "(?P<filename_string>(?:[^"]|\\")*)" file from recent files to "(?P<filepicker_field_string>(?:[^"]|\\")*)" filepicker$/
* @param string $filename
* @param string $filepickerelement
*/
public function i_add_file_from_recent_files_to_filepicker($filename, $filepickerelement) {
$reponame = get_string('pluginname', 'repository_recent');
$alternative = 'I add "' . $this->escape($filename) . '" file from "' .
$reponame . '" to "' . $this->escape($filepickerelement) . '" filemanager';
$this->deprecated_message($alternative);
return array(
new Given($alternative)
);
}
/**
* Throws an exception if $CFG->behat_usedeprecated is not allowed.
*
......
......@@ -22,7 +22,10 @@ Feature: Recent files repository lists the recently used files
And I fill the moodle form with:
| Name | Folder name |
| Description | Folder description |
And I add "empty.txt" file from recent files to "Files" filepicker
And I add "empty.txt" file from "Recent files" to "Files" filemanager
And I add "empty.txt" file from "Recent files" to "Files" filemanager as:
| Save as | empty_copy.txt |
And I press "Save and display"
Then I should see "empty.txt"
And I should see "empty_copy.txt"
And I should see "Folder description"
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Steps definitions for recent files repository type.
*
* @package repository_recent
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
require_once(__DIR__ . '/../../../../lib/behat/behat_files.php');
/**
* Steps definitions to deal with recent files and the filepicker.
*
* Extends behat_files rather than behat_base as is file-related.
*
* @package repository_recent
* @category test
* @copyright 2013 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class behat_repository_recent extends behat_files {
/**
* Adds the specified file from the 'Recent files' repository to the specified filepicker of the current page.
*
* @When /^I add "(?P<filename_string>(?:[^"]|\\")*)" file from recent files to "(?P<filepicker_field_string>(?:[^"]|\\")*)" filepicker$/
* @param string $filename
* @param string $filepickerelement
*/
public function i_add_file_from_recent_files_to_filepicker($filename, $filepickerelement) {
$filepickernode = $this->get_filepicker_node($filepickerelement);
// Opening the select repository window and selecting the recent repository.
$this->open_add_file_window($filepickernode, get_string('pluginname', 'repository_recent'));
// Opening the specified file contextual menu from the modal window.
$this->open_element_contextual_menu($filename);
$this->find_button(get_string('getfile', 'repository'))->click();
// Ensure the file has been selected and we returned to the form page.
$this->wait_until_return_to_form();
// Wait until file manager contents are updated.
$this->wait_until_contents_are_updated($filepickernode);
}
}
......@@ -27,7 +27,8 @@
require_once(__DIR__ . '/../../../lib/behat/behat_files.php');
use Behat\Mink\Exception\ExpectationException as ExpectationException;
use Behat\Mink\Exception\ExpectationException as ExpectationException,
Behat\Gherkin\Node\TableNode as TableNode;
/**
* Steps definitions to deal with the filepicker.
......@@ -208,4 +209,130 @@ class behat_filepicker extends behat_files {
$this->wait_until_contents_are_updated($containernode);
}
/**
* Makes sure user can see the exact number of elements (files in folders) in the filemanager.
*
* @Then /^I should see "(?P<elementscount_number>\d+)" elements in "(?P<filemanagerelement_string>(?:[^"]|\\")*)" filemanager$/
* @throws ExpectationException Thrown by behat_base::find
* @param int $elementscount
* @param string $filemanagerelement
*/
public function i_should_see_elements_in_filemanager($elementscount, $filemanagerelement) {
$filemanagernode = $this->get_filepicker_node($filemanagerelement);
$this->wait_until_contents_are_updated($filemanagernode);
$elements = $this->find_all('css', '.fp-content .fp-file', false, $filemanagernode);
if (count($elements) != $elementscount) {
throw new ExpectationException('Found '.count($elements).' elements in filemanager instead of expected '.$elementscount);
}
}
/**
* Picks the file from repository leaving default values in select file dialogue.
*
* @When /^I add "(?P<filepath_string>(?:[^"]|\\")*)" file from "(?P<repository_string>(?:[^"]|\\")*)" to "(?P<filemanagerelement_string>(?:[^"]|\\")*)" filemanager$/
* @throws ExpectationException Thrown by behat_base::find
* @param string $filepath
* @parma string $repository
* @param string $filemanagerelement
*/
public function i_add_file_from_repository_to_filemanager($filepath, $repository, $filemanagerelement) {
$this->add_file_from_repository_to_filemanager($filepath, $repository, $filemanagerelement, new TableNode(), false);
}
/**
* Picks the file from repository leaving default values in select file dialogue and confirming to overwrite an existing file.
*
* @When /^I add and overwrite "(?P<filepath_string>(?:[^"]|\\")*)" file from "(?P<repository_string>(?:[^"]|\\")*)" to "(?P<filemanagerelement_string>(?:[^"]|\\")*)" filemanager$/
* @throws ExpectationException Thrown by behat_base::find
* @param string $filepath
* @parma string $repository
* @param string $filemanagerelement
*/
public function i_add_and_overwrite_file_from_repository_to_filemanager($filepath, $repository, $filemanagerelement) {
$this->add_file_from_repository_to_filemanager($filepath, $repository, $filemanagerelement, new TableNode(),
get_string('overwrite', 'repository'));
}
/**
* Picks the file from repository filling the form in Select file dialogue.
*
* @When /^I add "(?P<filepath_string>(?:[^"]|\\")*)" file from "(?P<repository_string>(?:[^"]|\\")*)" to "(?P<filemanager_field_string>(?:[^"]|\\")*)" filemanager as:$/
* @throws ExpectationException Thrown by behat_base::find
* @param string $filepath
* @parma string $repository
* @param string $filemanagerelement
* @param TableNode $data Data to fill the form in Select file dialogue
*/
public function i_add_file_from_repository_to_filemanager_as($filepath, $repository, $filemanagerelement, TableNode $data) {
$this->add_file_from_repository_to_filemanager($filepath, $repository, $filemanagerelement, $data, false);
}
/**
* Picks the file from repository confirming to overwrite an existing file
*
* @When /^I add and overwrite "(?P<filepath_string>(?:[^"]|\\")*)" file from "(?P<repository_string>(?:[^"]|\\")*)" to "(?P<filemanager_field_string>(?:[^"]|\\")*)" filemanager as:$/
* @throws ExpectationException Thrown by behat_base::find
* @param string $filepath
* @parma string $repository
* @param string $filemanagerelement
* @param TableNode $data Data to fill the form in Select file dialogue
*/
public function i_add_and_overwrite_file_from_repository_to_filemanager_as($filepath, $repository, $filemanagerelement, TableNode $data) {
$this->add_file_from_repository_to_filemanager($filepath, $repository, $filemanagerelement, $data,
get_string('overwrite', 'repository'));
}
/**
* Picks the file from private files repository
*
* @throws ExpectationException Thrown by behat_base::find
* @param string $filepath
* @parma string $repository
* @param string $filemanagerelement
* @param TableNode $data Data to fill the form in Select file dialogue
* @param false|string $overwriteaction false if we don't expect that file with the same name already exists,
* or button text in overwrite dialogue ("Overwrite", "Rename to ...", "Cancel")
*/
protected function add_file_from_repository_to_filemanager($filepath, $repository, $filemanagerelement, TableNode $data,
$overwriteaction = false) {
$filemanagernode = $this->get_filepicker_node($filemanagerelement);
// Wait until file manager is completely loaded.
$this->wait_until_contents_are_updated($filemanagernode);
// Opening the select repository window and selecting the upload repository.
$this->open_add_file_window($filemanagernode, $repository);
$this->open_element_contextual_menu($filepath);
// Fill the form in Select window.
$datahash = $data->getRowsHash();
// The action depends on the field type.
foreach ($datahash as $locator => $value) {
// Getting the node element pointed by the label.
$fieldnode = $this->find_field($locator);
// Gets the field type from a parent node.
$field = behat_field_manager::get_form_field($fieldnode, $this->getSession());
// Delegates to the field class.
$field->set_value($value);
}
$this->find_button(get_string('getfile', 'repository'))->click();
if ($overwriteaction !== false) {
$this->getSession()->wait(1 * 1000, false);
$this->find_button($overwriteaction)->click();
}
// Ensure the file has been uploaded and all ajax processes finished.
$this->wait_until_return_to_form();
// Wait until file manager contents are updated.
$this->wait_until_contents_are_updated($filemanagernode);
}
}
@core @core_filepicker @repository @repository_user @_only_local
Feature: Create shortcuts
In order to automatically synchronize copies of the file with the source
As a teacher
I need to be able to pick file as a shortcut
@javascript
Scenario: Upload a file as a copy and as a shortcut in filemanager
Given the following "users" exists:
| username | firstname | lastname | email |
| teacher1 | Terry | Teacher | teacher1@asd.com |
And the following "courses" exists:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exists:
| user | course | role |
| teacher1 | C1 | editingteacher |
When I log in as "teacher1"
And I expand "My profile" node
And I follow "My private files"
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
Then I should see "empty.txt" in the "div.fp-content" "css_element"
And I press "Save changes"
And I am on homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Folder" to section "1"
And I fill the moodle form with:
| Name | Test folder |
| Description | Test folder description |
And I add "empty.txt" file from "Private files" to "Files" filemanager
And I should see "1" elements in "Files" filemanager
And I should see "empty.txt" in the ".fp-content .fp-file" "css_element"
And ".fp-content .fp-file.fp-isreference" "css_element" should not exists
And I add "empty.txt" file from "Private files" to "Files" filemanager as:
| Save as | empty_ref.txt |
| Create an alias/shortcut to the file | 1 |
And I should see "2" elements in "Files" filemanager
And I should see "empty_ref.txt" in the ".fp-content .fp-file.fp-isreference" "css_element"
And I press "Save and display"
And I should see "empty.txt"
And I should see "empty_ref.txt"
And I press "Edit"
And I should see "2" elements in "Files" filemanager
And I should see "empty_ref.txt" in the ".fp-content .fp-file.fp-isreference" "css_element"
# ------ Overwriting the reference with a non-reference ---------
And I add and overwrite "empty.txt" file from "Private files" to "Files" filemanager as:
| Save as | empty_ref.txt |
And I should see "2" elements in "Files" filemanager
And ".fp-content .fp-file.fp-isreference" "css_element" should not exists
And I press "Save changes"
And I should see "empty.txt"
And I should see "empty_ref.txt"
And I press "Edit"
And I should see "2" elements in "Files" filemanager
And ".fp-content .fp-file.fp-isreference" "css_element" should not exists
# ------ Overwriting non-reference with a reference ---------
And I add and overwrite "empty.txt" file from "Private files" to "Files" filemanager as:
| Save as | empty_ref.txt |
| Create an alias/shortcut to the file | 1 |
And I should see "2" elements in "Files" filemanager
And I should see "empty_ref.txt" in the ".fp-content .fp-file.fp-isreference" "css_element"
And I press "Save changes"
And I should see "empty.txt"
And I should see "empty_ref.txt"
And I press "Edit"
And I should see "2" elements in "Files" filemanager
And I should see "empty_ref.txt" in the ".fp-content .fp-file.fp-isreference" "css_element"
@core @core_filepicker @_only_local
Feature: Overwrite file feature
In order to update an existing file
As a user
I need to pick the file with the same name and select to overwrite
@javascript
Scenario: Upload a file in filemanager and overwrite it
Given the following "users" exists:
| username | firstname | lastname | email |
| teacher1 | Terry | Teacher | teacher1@asd.com |
And the following "courses" exists:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exists:
| user | course | role |
| teacher1 | C1 | editingteacher |
When I log in as "teacher1"
And I expand "My profile" node
And I follow "My private files"
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
Then I should see "1" elements in "Files" filemanager
And I upload and overwrite "lib/tests/fixtures/empty.txt" file to "Files" filemanager
And I should see "1" elements in "Files" filemanager
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager as:
| Save as | empty_copy.txt |
And I should see "2" elements in "Files" filemanager
And I upload and overwrite "lib/tests/fixtures/empty.txt" file to "Files" filemanager as:
| Save as | empty_copy.txt |
And I should see "2" elements in "Files" filemanager
And I press "Save changes"
And I am on homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Folder" to section "1"
And I fill the moodle form with:
| Name | Test folder |
| Description | Test folder description |
And I add "empty.txt" file from "Private files" to "Files" filemanager
And I should see "1" elements in "Files" filemanager
And I add and overwrite "empty.txt" file from "Private files" to "Files" filemanager
And I should see "1" elements in "Files" filemanager
And I add "empty.txt" file from "Private files" to "Files" filemanager as:
| Save as | empty_copy.txt |
And I should see "2" elements in "Files" filemanager
And I add and overwrite "empty.txt" file from "Private files" to "Files" filemanager as:
| Save as | empty_copy.txt |
And I should see "2" elements in "Files" filemanager
And I press "Save and display"
And I should see "empty.txt"
And I should see "empty_copy.txt"
......@@ -27,10 +27,11 @@
require_once(__DIR__ . '/../../../../lib/behat/behat_files.php');
use Behat\Mink\Exception\ExpectationException as ExpectationException;
use Behat\Mink\Exception\ExpectationException as ExpectationException,
Behat\Gherkin\Node\TableNode as TableNode;
/**
* Steps definitions to deal with the filepicker.
* Steps definitions to deal with the upload repository.
*
* Extends behat_files rather than behat_base as is file-related.
*
......@@ -42,7 +43,7 @@ use Behat\Mink\Exception\ExpectationException as ExpectationException;
class behat_repository_upload extends behat_files {
/**
* Uploads a file to the specified file picker. It deals both with single-file and multiple-file filepickers. The paths should be relative to moodle codebase.
* Uploads a file to the specified filemanager leaving other fields in upload form default. The paths should be relative to moodle codebase.
*
* @When /^I upload "(?P<filepath_string>(?:[^"]|\\")*)" file to "(?P<filepicker_field_string>(?:[^"]|\\")*)" filepicker$/
* @throws ExpectationException Thrown by behat_base::find
......@@ -50,15 +51,81 @@ class behat_repository_upload extends behat_files {
* @param string $filepickerelement
*/
public function i_upload_file_to_filepicker($filepath, $filepickerelement) {
$this->upload_file_to_filemanager($filepath, $filepickerelement, new TableNode(), false);
}
/**
* Uploads a file to the specified filemanager leaving other fields in upload form default. The paths should be relative to moodle codebase.
*
* @When /^I upload "(?P<filepath_string>(?:[^"]|\\")*)" file to "(?P<filemanager_field_string>(?:[^"]|\\")*)" filemanager$/
* @throws ExpectationException Thrown by behat_base::find
* @param string $filepath
* @param string $filemanagerelement
*/
public function i_upload_file_to_filemanager($filepath, $filemanagerelement) {
$this->upload_file_to_filemanager($filepath, $filemanagerelement, new TableNode(), false);
}
/**
* Uploads a file to the specified filemanager leaving other fields in upload form default and confirms to overwrite an existing file. The paths should be relative to moodle codebase.
*
* @When /^I upload and overwrite "(?P<filepath_string>(?:[^"]|\\")*)" file to "(?P<filemanager_field_string>(?:[^"]|\\")*)" filemanager$/
* @throws ExpectationException Thrown by behat_base::find
* @param string $filepath
* @param string $filemanagerelement
*/
public function i_upload_and_overwrite_file_to_filemanager($filepath, $filemanagerelement) {
$this->upload_file_to_filemanager($filepath, $filemanagerelement, new TableNode(),
get_string('overwrite', 'repository'));
}
/**
* Uploads a file to the specified filemanager and confirms to overwrite an existing file. The paths should be relative to moodle codebase.
*
* @When /^I upload "(?P<filepath_string>(?:[^"]|\\")*)" file to "(?P<filemanager_field_string>(?:[^"]|\\")*)" filemanager as:$/
* @throws ExpectationException Thrown by behat_base::find
* @param string $filepath
* @param string $filemanagerelement
* @param TableNode $data Data to fill in upload form
*/
public function i_upload_file_to_filemanager_as($filepath, $filemanagerelement, TableNode $data) {
$this->upload_file_to_filemanager($filepath, $filemanagerelement, $data, false);
}
/**
* Uploads a file to the specified filemanager. The paths should be relative to moodle codebase.
*
* @When /^I upload and overwrite "(?P<filepath_string>(?:[^"]|\\")*)" file to "(?P<filemanager_field_string>(?:[^"]|\\")*)" filemanager as:$/
* @throws ExpectationException Thrown by behat_base::find
* @param string $filepath
* @param string $filemanagerelement
* @param TableNode $data Data to fill in upload form
*/
public function i_upload_and_overwrite_file_to_filemanager_as($filepath, $filemanagerelement, TableNode $data) {
$this->upload_file_to_filemanager($filepath, $filemanagerelement, $data,
get_string('overwrite', 'repository'));
}
/**
* Uploads a file to filemanager
*
* @throws ExpectationException Thrown by behat_base::find
* @param string $filepath
* @param string $filemanagerelement
* @param TableNode $data Data to fill in upload form
* @param false|string $overwriteaction false if we don't expect that file with the same name already exists,
* or button text in overwrite dialogue ("Overwrite", "Rename to ...", "Cancel")
*/
protected function upload_file_to_filemanager($filepath, $filemanagerelement, TableNode $data, $overwriteaction = false) {
global $CFG;
$filepickernode = $this->get_filepicker_node($filepickerelement);
$filemanagernode = $this->get_filepicker_node($filemanagerelement);
// Wait until file manager is completely loaded.
$this->wait_until_contents_are_updated($filepickernode);
$this->wait_until_contents_are_updated($filemanagernode);
// Opening the select repository window and selecting the upload repository.
$this->open_add_file_window($filepickernode, get_string('pluginname', 'repository_upload'));
$this->open_add_file_window($filemanagernode, get_string('pluginname', 'repository_upload'));
// Ensure all the form is ready.
$this->getSession()->wait(2 * 1000, false);
......@@ -76,7 +143,6 @@ class behat_repository_upload extends behat_files {
// Form elements to interact with.
$file = $this->find_file('repo_upload_file');
$submit = $this->find_button(get_string('upload', 'repository'));
// Attaching specified file to the node.
// Replace 'admin/' if it is in start of path with $CFG->admin .
......@@ -88,14 +154,35 @@ class behat_repository_upload extends behat_files {
$fileabsolutepath = $CFG->dirroot . DIRECTORY_SEPARATOR . $filepath;
$file->attachFile($fileabsolutepath);
// Fill the form in Upload window.
$datahash = $data->getRowsHash();
// The action depends on the field type.
foreach ($datahash as $locator => $value) {
// Getting the node element pointed by the label.
$fieldnode = $this->find_field($locator);
// Gets the field type from a parent node.
$field = behat_field_manager::get_form_field($fieldnode, $this->getSession());
// Delegates to the field class.
$field->set_value($value);
}
// Submit the file.
$submit = $this->find_button(get_string('upload', 'repository'));
$submit->press();
if ($overwriteaction !== false) {
$this->getSession()->wait(1 * 1000, false);
$this->find_button($overwriteaction)->click();
}
// Ensure the file has been uploaded and all ajax processes finished.
$this->wait_until_return_to_form();
// Wait until file manager contents are updated.
$this->wait_until_contents_are_updated($filepickernode);
$this->wait_until_contents_are_updated($filemanagernode);
}
}
......@@ -5,13 +5,19 @@ Feature: Upload files
I need to upload files
@javascript
Scenario: Upload a file in a multiple file filepicker
Scenario: Upload a file in a multiple file filemanager
Given the following "courses" exists:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"