MDL-56630 behat: Click on link in specificed block/region

This commit is contained in:
Rajesh Taneja 2016-11-08 14:38:48 +08:00
parent 1fd6b25579
commit dc90838aaa
No known key found for this signature in database
GPG key ID: B363F7FB787F80E4
55 changed files with 216 additions and 183 deletions

View file

@ -30,6 +30,7 @@ Feature: Users can add entries to database activities
| Field description | Test field 2 description |
# To generate the default templates.
And I follow "Templates"
And I wait until the page is ready
And I log out
When I log in as "student1"
And I follow "Course 1"

View file

@ -50,7 +50,8 @@ class behat_mod_data extends behat_base {
public function i_add_a_field_to_database_and_i_fill_the_form_with($fieldtype, $activityname, TableNode $fielddata) {
$this->execute("behat_general::click_link", $this->escape($activityname));
$this->execute("behat_general::click_link", get_string('fields', 'mod_data'));
$this->execute("behat_navigation::i_navigate_to_node_in", array(get_string('fields', 'mod_data'),
get_string('pluginadministration', 'mod_data')));
$this->execute('behat_forms::i_set_the_field_to', array('newtype', $this->escape($fieldtype)));
@ -75,7 +76,8 @@ class behat_mod_data extends behat_base {
public function i_add_an_entry_to_database_with($activityname, TableNode $entrydata) {
$this->execute("behat_general::click_link", $this->escape($activityname));
$this->execute("behat_general::click_link", get_string('add', 'mod_data'));
$this->execute("behat_navigation::i_navigate_to_node_in", array(get_string('add', 'mod_data'),
get_string('pluginadministration', 'mod_data')));
$this->execute("behat_forms::i_set_the_following_fields_to_these_values", $entrydata);
}