1 |
efrain |
1 |
@tool @tool_behat
|
|
|
2 |
Feature: Use core page resolvers for the I am on the page steps
|
|
|
3 |
In order to write tests correctly
|
|
|
4 |
As a developer
|
|
|
5 |
I need to have steps which take me straight to a page
|
|
|
6 |
|
|
|
7 |
Scenario Outline: When I am on an instance
|
|
|
8 |
Given the following "categories" exist:
|
|
|
9 |
| name | category | idnumber |
|
|
|
10 |
| Cat 1 | 0 | CAT1 |
|
|
|
11 |
And the following "course" exists:
|
|
|
12 |
| fullname | Economics 101 |
|
|
|
13 |
| shortname | ECON101 |
|
|
|
14 |
| idnumber | 2021-econ101 |
|
|
|
15 |
And the following "activity" exists:
|
|
|
16 |
| course | ECON101 |
|
|
|
17 |
| activity | forum |
|
|
|
18 |
| name | Fundamentals of Economics |
|
|
|
19 |
| idnumber | fundamentalsofeconomics |
|
|
|
20 |
And I log in as "admin"
|
|
|
21 |
When I am on the <identifier> <type> page
|
|
|
22 |
Then I should see "<shouldsee>"
|
|
|
23 |
|
|
|
24 |
Examples:
|
|
|
25 |
| description | identifier | type | shouldsee |
|
|
|
26 |
| Course Category idnumber | CAT1 | category | Add a new course |
|
|
|
27 |
| Course Category name | "Cat 1" | Category | Add a new course |
|
|
|
28 |
| Course Full name | "Economics 101" | course | Fundamentals of Economics |
|
|
|
29 |
| Course Short name | ECON101 | COURSE | Fundamentals of Economics |
|
|
|
30 |
| Course idnumber | "2021-econ101" | Course | Fundamentals of Economics |
|
|
|
31 |
| Forum idnumber | fundamentalsofeconomics | Activity | Add discussion topic |
|
|
|
32 |
| Generic activity editing | fundamentalsofeconomics | "Activity editing" | Edit settings |
|
|
|
33 |
| Forum name | "Fundamentals of Economics" | "Forum activity" | Add discussion topic |
|
|
|
34 |
| Forum name editing | "Fundamentals of Economics" | "Forum activity editing" | Edit settings |
|
|
|
35 |
| Forum name permissions | "Fundamentals of Economics" | "Forum activity permissions" | Permissions in Forum: Fun |
|
|
|
36 |
| Forum name roles | "Fundamentals of Economics" | "Forum activity roles" | Assign roles in Forum: Fun |
|
|
|
37 |
|
|
|
38 |
Scenario Outline: When I am on an instance logged in as
|
|
|
39 |
Given the following "categories" exist:
|
|
|
40 |
| name | category | idnumber |
|
|
|
41 |
| Cat 1 | 0 | CAT1 |
|
|
|
42 |
And the following "course" exists:
|
|
|
43 |
| fullname | Economics 101 |
|
|
|
44 |
| shortname | ECON101 |
|
|
|
45 |
| idnumber | 2021-econ101 |
|
|
|
46 |
And the following "activity" exists:
|
|
|
47 |
| course | ECON101 |
|
|
|
48 |
| activity | forum |
|
|
|
49 |
| name | Fundamentals of Economics |
|
|
|
50 |
| idnumber | fundamentalsofeconomics |
|
|
|
51 |
When I am on the <identifier> <type> page logged in as admin
|
|
|
52 |
Then I should see "<shouldsee>"
|
|
|
53 |
|
|
|
54 |
Examples:
|
|
|
55 |
| description | identifier | type | shouldsee |
|
|
|
56 |
| Course Category idnumber | CAT1 | category | Add a new course |
|
|
|
57 |
| Course Category name | "Cat 1" | Category | Add a new course |
|
|
|
58 |
| Course Full name | "Economics 101" | course | Fundamentals of Economics |
|
|
|
59 |
| Course Short name | ECON101 | COURSE | Fundamentals of Economics |
|
|
|
60 |
| Course idnumber | "2021-econ101" | Course | Fundamentals of Economics |
|
|
|
61 |
| Forum idnumber | fundamentalsofeconomics | Activity | Add discussion topic |
|
|
|
62 |
| Generic activity editing | fundamentalsofeconomics | "Activity editing" | Edit settings |
|
|
|
63 |
| Forum name | "Fundamentals of Economics" | "Forum activity" | Add discussion topic |
|
|
|
64 |
| Forum name editing | "Fundamentals of Economics" | "Forum activity editing" | Edit settings |
|
|
|
65 |
| Forum name permissions | "Fundamentals of Economics" | "Forum activity permissions" | Permissions in Forum: Fun |
|
|
|
66 |
| Forum name roles | "Fundamentals of Economics" | "Forum activity roles" | Assign roles in Forum: Fun |
|
|
|
67 |
|
|
|
68 |
Scenario Outline: When I am on a named page
|
|
|
69 |
Given I log in as "admin"
|
|
|
70 |
When I am on the <identifier> page
|
|
|
71 |
Then I should see "<shouldsee>"
|
|
|
72 |
|
|
|
73 |
Examples:
|
|
|
74 |
| description | identifier | shouldsee |
|
|
|
75 |
| Admin page | "Admin notifications" | Check for available updates |
|
|
|
76 |
| Home page | Homepage | Calendar |
|
|
|
77 |
|
|
|
78 |
Scenario Outline: When I am on a named page logged in as
|
|
|
79 |
When I am on the <identifier> page logged in as admin
|
|
|
80 |
Then I should see "<shouldsee>"
|
|
|
81 |
|
|
|
82 |
Examples:
|
|
|
83 |
| description | identifier | shouldsee |
|
|
|
84 |
| Admin page | "Admin notifications" | Check for available updates |
|
|
|
85 |
| Home page | Homepage | Calendar |
|