Skip to content

Commit 25973f5

Browse files
committed
MDL-69863 behat: Scenario tidy up
1 parent e3ce860 commit 25973f5

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

blocks/accessreview/tests/behat/accessreview.feature

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,28 @@ Feature: Block accessreview
33
In order to overview accessibility information on my course
44
As a manager
55
I can add the accessreview block in a course
6+
67
Background:
78
Given the following "courses" exist:
89
| fullname | shortname | format |
910
| Course 1 | C1 | topics |
10-
When I log in as "admin"
11-
And I am on "Course 1" course homepage with editing mode on
11+
1212
Scenario: View accessreview block on a course
13-
Given I add the "Accessibility Review" block
13+
Given I log in as "admin"
14+
And I am on "Course 1" course homepage with editing mode on
15+
When I add the "Accessibility Review" block
1416
Then I should see "Accessibility Review"
1517
And I should see "No accessibility results data was found."
18+
1619
Scenario: Hide/show accessreview view
17-
Given I add the "Accessibility Review" block
20+
Given I log in as "admin"
21+
And I am on "Course 1" course homepage with editing mode on
22+
When I add the "Accessibility Review" block
1823
Then I should see "Accessibility Review"
1924
And I should see "No accessibility results data was found."
2025
And I click on "Actions menu" "icon" in the "Accessibility Review" "block"
2126
And I follow "Hide Accessibility Review block"
22-
Then I should not see "No accessibility results data was found."
27+
And I should not see "No accessibility results data was found."
2328
And I click on "Actions menu" "icon" in the "Accessibility Review" "block"
2429
And I follow "Show Accessibility Review block"
25-
Then I should see "No accessibility results data was found."
26-
30+
And I should see "No accessibility results data was found."

blocks/accessreview/tests/behat/accessreview_results.feature

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@ Feature: Block accessreview results
33
In order to overview accessibility information on my course
44
As a manager
55
I can add the accessreview block in a course after running the scheduled task
6+
67
Background:
7-
Given I log in as "admin"
8-
And the following "courses" exist:
8+
Given the following "courses" exist:
99
| fullname | shortname | format |
1010
| Course 1 | C1 | topics |
1111
And the following "activities" exist:
1212
| activity | name | intro | course | idnumber |
1313
| label | Label one | <b>Bold text is bold.</b> | C1 | id001 |
1414
And I run the scheduled task "\tool_brickfield\task\bulk_process_courses"
15+
16+
Scenario: View accessreview block results on a course
17+
Given I log in as "admin"
1518
And I am on "Course 1" course homepage with editing mode on
16-
And I add the "Accessibility Review" block
19+
When I add the "Accessibility Review" block
1720
Then I should see "Accessibility Review"
18-
Scenario: View accessreview block results on a course
1921
And I should not see "No accessibility results data was found."
2022
And I should see "Image"
2123
And I should see "Layout"
@@ -25,8 +27,12 @@ Feature: Block accessreview results
2527
And I should see "Text"
2628
And I should see "View"
2729
And I should see "Toggle highlighting"
30+
2831
Scenario: Toggle highlighting on/off
29-
And I should see "Toggle highlighting"
32+
Given I log in as "admin"
33+
And I am on "Course 1" course homepage with editing mode on
34+
When I add the "Accessibility Review" block
35+
Then I should see "Toggle highlighting"
3036
And ".block_accessreview_view" "css_element" should be visible
31-
When I click on "Toggle highlighting" "text"
32-
Then ".block_accessreview_view" "css_element" should not be visible
37+
And I click on "Toggle highlighting" "text"
38+
And ".block_accessreview_view" "css_element" should not be visible

0 commit comments

Comments
 (0)