1 |
efrain |
1 |
@tool @tool_behat
|
|
|
2 |
Feature: List the system steps definitions
|
|
|
3 |
In order to create new tests
|
|
|
4 |
As a tests writer
|
|
|
5 |
I need to list and filter the system steps definitions
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given I am on homepage
|
|
|
9 |
And I log in as "admin"
|
|
|
10 |
And I navigate to "Development > Acceptance testing" in site administration
|
|
|
11 |
|
|
|
12 |
@javascript
|
|
|
13 |
Scenario: Accessing the list
|
|
|
14 |
Then I should see "Step definitions"
|
|
|
15 |
And I should not see "There aren't steps definitions matching this filter"
|
|
|
16 |
And I should not see "the following \"ELEMENT_STRING\" exist:"
|
|
|
17 |
And "entities1" "select" should exist
|
|
|
18 |
And the "entities1" select box should contain "users"
|
|
|
19 |
And the "entities1" select box should contain "mod_assign > submissions"
|
|
|
20 |
|
|
|
21 |
@javascript
|
|
|
22 |
Scenario: Filtering by type
|
|
|
23 |
Given I set the field "Type" to "Then. Checkings to ensure the outcomes are the expected ones"
|
|
|
24 |
When I press "Filter"
|
|
|
25 |
Then I should see "Checks, that page contains specified text."
|
|
|
26 |
And I should not see "Opens Moodle homepage."
|
|
|
27 |
|
|
|
28 |
@javascript
|
|
|
29 |
Scenario: Filtering by keyword
|
|
|
30 |
Given I set the field "Contains" to "homepage"
|
|
|
31 |
When I press "Filter"
|
|
|
32 |
Then I should see "Opens Moodle homepage."
|
|
|
33 |
|
|
|
34 |
@javascript
|
|
|
35 |
Scenario: Filtering by the multiple words pattern
|
|
|
36 |
Given I set the field "Contains" to "should exist"
|
|
|
37 |
When I press "Filter"
|
|
|
38 |
Then I should not see "There aren't steps definitions matching this filter"
|
|
|
39 |
And I should see "Checks the provided element and selector type exists in the current page."
|
|
|
40 |
And I should see "Checks that an element and selector type exists in another element and selector type on the current page."
|
|
|
41 |
|
|
|
42 |
@javascript
|
|
|
43 |
Scenario: Get required fields
|
|
|
44 |
Given I set the field "entities1" to "users"
|
|
|
45 |
And I should see "| username |"
|
|
|
46 |
When I set the field "entities1" to "mod_quiz > user overrides"
|
|
|
47 |
Then I should not see "| username |"
|
|
|
48 |
And I should see "| quiz | user |"
|