From c7369f79a336ac45fff688fed9f6c4aa49f5c3c9 Mon Sep 17 00:00:00 2001 From: David Monllao Date: Fri, 25 Jan 2013 13:25:19 +0800 Subject: [PATCH] MDL-37657 behat: Adding acceptance tests to the acceptance test tool --- .../tool/behat/tests/behat/list_steps.feature | 31 +++++++++++++++++++ .../tests/behat/test_environment.feature | 9 ++++++ 2 files changed, 40 insertions(+) create mode 100644 admin/tool/behat/tests/behat/list_steps.feature create mode 100644 admin/tool/behat/tests/behat/test_environment.feature diff --git a/admin/tool/behat/tests/behat/list_steps.feature b/admin/tool/behat/tests/behat/list_steps.feature new file mode 100644 index 00000000000..264c75486c0 --- /dev/null +++ b/admin/tool/behat/tests/behat/list_steps.feature @@ -0,0 +1,31 @@ +@tool_behat +Feature: List the system steps definitions + In order to create new tests + As a tests writer + I need to list and filter the system steps definitions + + Background: + Given I am on homepage + And I log in as "admin" + And I expand "Site administration" node + And I expand "Development" node + And I follow "Acceptance testing" + + @javascript + Scenario: Accessing the list + Then I should see "Steps definitions" + And I should not see "There aren't steps definitions matching this filter" + + @javascript + Scenario: Filtering by type + Given I select "Then. Checkings to ensure the outcomes are the expected ones" from "Type" + When I press "Filter" + Then I should see "Checks, that page contains specified text." + And I should not see "Opens Moodle homepage." + + @javascript + Scenario: Filtering by keyword + Given I fill in "Contains" with "homepage" + When I press "Filter" + Then I should see "Opens Moodle homepage." + diff --git a/admin/tool/behat/tests/behat/test_environment.feature b/admin/tool/behat/tests/behat/test_environment.feature new file mode 100644 index 00000000000..53d9ee8bc68 --- /dev/null +++ b/admin/tool/behat/tests/behat/test_environment.feature @@ -0,0 +1,9 @@ +@tool_behat +Feature: Set up the testing environment + In order to execute automated acceptance tests + As a moodle developer + I need to use the test environment instead of the regular environment + + Scenario: Accessing the site + When I am on homepage + Then I should see "Acceptance test site" -- 2.43.0