From 040dd3a96eaefda7f497f92265dc6ec7598d9a49 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Thu, 18 Feb 2016 16:43:34 +0800 Subject: [PATCH] MDL-53126 behat: Fixed radio button in backup step Rather than calling click and check on radio node use radio form field to set value --- backup/util/ui/tests/behat/behat_backup.php | 4 ++-- backup/util/ui/tests/behat/import_course.feature | 1 - backup/util/ui/tests/behat/import_groups.feature | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/backup/util/ui/tests/behat/behat_backup.php b/backup/util/ui/tests/behat/behat_backup.php index f6ec235bb2a..bd0f777881b 100644 --- a/backup/util/ui/tests/behat/behat_backup.php +++ b/backup/util/ui/tests/behat/behat_backup.php @@ -172,8 +172,8 @@ class behat_backup extends behat_base { "/descendant::tr[contains(., $fromcourse)]" . "/descendant::input[@type='radio']"; $radionode = $this->find('xpath', $xpath, $exception); - $radionode->check(); - $radionode->click(); + $radiofield = new behat_form_field($this->getSession(), $radionode); + $radiofield->set_value(1); $this->find_button(get_string('continue'))->press(); $this->wait(); diff --git a/backup/util/ui/tests/behat/import_course.feature b/backup/util/ui/tests/behat/import_course.feature index 29388d434e4..c48bb8aa1a4 100644 --- a/backup/util/ui/tests/behat/import_course.feature +++ b/backup/util/ui/tests/behat/import_course.feature @@ -4,7 +4,6 @@ Feature: Import course's contents into another course As a teacher I need to import a course contents into another course selecting what I want to import - @javascript Scenario: Import course's contents to another course Given the following "courses" exist: | fullname | shortname | category | diff --git a/backup/util/ui/tests/behat/import_groups.feature b/backup/util/ui/tests/behat/import_groups.feature index bd30ed9e32a..62b7d3c62da 100644 --- a/backup/util/ui/tests/behat/import_groups.feature +++ b/backup/util/ui/tests/behat/import_groups.feature @@ -28,7 +28,6 @@ Feature: Option to include groups and groupings when importing a course to anoth And I follow "Course 1" And I turn editing mode on - @javascript Scenario: Include groups and groupings when importing a course to another course When I import "Course 1" course into "Course 2" course using this options: | Initial | Include groups and groupings | 1 | @@ -40,7 +39,6 @@ Feature: Option to include groups and groupings when importing a course to anoth And I should see "Grouping 1" And I should see "Grouping 2" - @javascript Scenario: Do not include groups and groupings when importing a course to another course When I import "Course 1" course into "Course 2" course using this options: | Initial | Include groups and groupings | 0 |