1 |
efrain |
1 |
@tool @tool_usertours
|
|
|
2 |
Feature: Add a new user tour
|
|
|
3 |
In order to help users learn of new features
|
|
|
4 |
As an administrator
|
|
|
5 |
I need to create a user tour
|
|
|
6 |
|
|
|
7 |
@javascript
|
|
|
8 |
Scenario: Add a new tour
|
|
|
9 |
Given the following "users" exist:
|
|
|
10 |
| username | firstname | lastname | email |
|
|
|
11 |
| student1 | Student | 1 | student1@example.com |
|
|
|
12 |
And I log in as "admin"
|
|
|
13 |
And I add a new user tour with:
|
|
|
14 |
| Name | First tour |
|
|
|
15 |
| Description | My first tour |
|
|
|
16 |
| Apply to URL match | /my/% |
|
|
|
17 |
| Tour is enabled | 1 |
|
|
|
18 |
And I add steps to the "First tour" tour:
|
|
|
19 |
| targettype | Title | id_content | Content type |
|
|
|
20 |
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful | Manual |
|
|
|
21 |
And I add steps to the "First tour" tour:
|
|
|
22 |
| targettype | targetvalue_block | Title | id_content | Content type |
|
|
|
23 |
| Block | Timeline | Timeline | This is the Timeline. All of your upcoming activities can be found here | Manual |
|
|
|
24 |
| Block | Calendar | Calendar | This is the Calendar. All of your assignments and due dates can be found here | Manual |
|
|
|
25 |
And I add steps to the "First tour" tour:
|
|
|
26 |
| targettype | targetvalue_selector | Title | id_content | Content type |
|
|
|
27 |
| Selector | .usermenu | User menu | This is your personal user menu. You'll find your personal preferences and your user profile here. | Manual |
|
|
|
28 |
When I am on homepage
|
|
|
29 |
Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
|
|
30 |
And I click on "Next" "button" in the "[data-role='flexitour-step']" "css_element"
|
|
|
31 |
And I should see "This is the Timeline. All of your upcoming activities can be found here"
|
|
|
32 |
And I should not see "This is the Calendar. All of your assignments and due dates can be found here"
|
|
|
33 |
And I click on "Next" "button" in the "[data-role='flexitour-step']" "css_element"
|
|
|
34 |
And I should see "This is the Calendar. All of your assignments and due dates can be found here"
|
|
|
35 |
And I should not see "This area shows you what's happening in some of your courses"
|
|
|
36 |
And I click on "Skip tour" "button" in the "[data-role='flexitour-step']" "css_element"
|
|
|
37 |
And I should not see "This area shows you what's happening in some of your courses"
|
|
|
38 |
And I am on homepage
|
|
|
39 |
And I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
|
|
40 |
And I should not see "This area shows you what's happening in some of your courses"
|
|
|
41 |
And I follow "Reset user tour on this page"
|
|
|
42 |
And I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
|
|
43 |
|
|
|
44 |
@javascript
|
|
|
45 |
Scenario: A hidden tour should not be visible
|
|
|
46 |
Given the following "users" exist:
|
|
|
47 |
| username | firstname | lastname | email |
|
|
|
48 |
| student1 | Student | 1 | student1@example.com |
|
|
|
49 |
And I log in as "admin"
|
|
|
50 |
And I add a new user tour with:
|
|
|
51 |
| Name | First tour |
|
|
|
52 |
| Description | My first tour |
|
|
|
53 |
| Apply to URL match | /my/% |
|
|
|
54 |
| Tour is enabled | 0 |
|
|
|
55 |
And I add steps to the "First tour" tour:
|
|
|
56 |
| targettype | Title | id_content | Content type |
|
|
|
57 |
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful | Manual |
|
|
|
58 |
When I am on homepage
|
|
|
59 |
Then I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
|
|
60 |
|
|
|
61 |
@javascript
|
|
|
62 |
Scenario: Tour visibility can be toggled
|
|
|
63 |
Given the following "users" exist:
|
|
|
64 |
| username | firstname | lastname | email |
|
|
|
65 |
| student1 | Student | 1 | student1@example.com |
|
|
|
66 |
And I log in as "admin"
|
|
|
67 |
And I add a new user tour with:
|
|
|
68 |
| Name | First tour |
|
|
|
69 |
| Description | My first tour |
|
|
|
70 |
| Apply to URL match | /my/% |
|
|
|
71 |
| Tour is enabled | 0 |
|
|
|
72 |
And I add steps to the "First tour" tour:
|
|
|
73 |
| targettype | Title | id_content | Content type |
|
|
|
74 |
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful | Manual |
|
|
|
75 |
And I open the User tour settings page
|
|
|
76 |
When I click on "Enable" "link" in the "My first tour" "table_row"
|
|
|
77 |
And I am on homepage
|
|
|
78 |
Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
|
|
79 |
|
|
|
80 |
@javascript
|
|
|
81 |
Scenario: Display step numbers was enabled
|
|
|
82 |
Given the following "users" exist:
|
|
|
83 |
| username | firstname | lastname | email |
|
|
|
84 |
| student1 | Student | 1 | student1@example.com |
|
|
|
85 |
And I log in as "admin"
|
|
|
86 |
And I add a new user tour with:
|
|
|
87 |
| Name | Steps tour |
|
|
|
88 |
| Description | My steps tour |
|
|
|
89 |
| Apply to URL match | /my/% |
|
|
|
90 |
| Tour is enabled | 1 |
|
|
|
91 |
| Display step numbers | 1 |
|
|
|
92 |
| End tour button's label | Sample end label |
|
|
|
93 |
And I add steps to the "Steps tour" tour:
|
|
|
94 |
| targettype | Title | id_content | Content type |
|
|
|
95 |
| Display in middle of page | Welcome | First step of the Tour | Manual |
|
|
|
96 |
And I add steps to the "Steps tour" tour:
|
|
|
97 |
| targettype | targetvalue_block | Title | id_content | Content type |
|
|
|
98 |
| Block | Timeline | Timeline | Second step of the Tour | Manual |
|
|
|
99 |
| Block | Calendar | Calendar | Third step of the Tour | Manual |
|
|
|
100 |
When I am on homepage
|
|
|
101 |
Then I should see "First step of the Tour"
|
|
|
102 |
And I should see "Next (1/3)"
|
|
|
103 |
And I should not see "End tour"
|
|
|
104 |
And I should not see "Sample end label"
|
|
|
105 |
And "Skip tour" "button" should exist in the "[data-role='flexitour-step']" "css_element"
|
|
|
106 |
And I click on "Next (1/3)" "button" in the "[data-role='flexitour-step']" "css_element"
|
|
|
107 |
And I should see "Second step of the Tour"
|
|
|
108 |
And I should see "Next (2/3)"
|
|
|
109 |
And I click on "Next (2/3)" "button" in the "[data-role='flexitour-step']" "css_element"
|
|
|
110 |
And I should see "Third step of the Tour"
|
|
|
111 |
And I should not see "Next (3/3)"
|
|
|
112 |
And I should not see "Skip tour"
|
|
|
113 |
And "Sample end label" "button" should exist in the "[data-role='flexitour-step']" "css_element"
|
|
|
114 |
|
|
|
115 |
@javascript
|
|
|
116 |
Scenario: Display step numbers was disabled
|
|
|
117 |
Given the following "users" exist:
|
|
|
118 |
| username | firstname | lastname | email |
|
|
|
119 |
| student1 | Student | 1 | student1@example.com |
|
|
|
120 |
And I log in as "admin"
|
|
|
121 |
And I add a new user tour with:
|
|
|
122 |
| Name | Steps tour |
|
|
|
123 |
| Description | My steps tour |
|
|
|
124 |
| Apply to URL match | /my/% |
|
|
|
125 |
| Tour is enabled | 1 |
|
|
|
126 |
| Display step numbers | 0 |
|
|
|
127 |
And I add steps to the "Steps tour" tour:
|
|
|
128 |
| targettype | Title | id_content | Content type |
|
|
|
129 |
| Display in middle of page | Welcome | First step of the Tour | Manual |
|
|
|
130 |
And I add steps to the "Steps tour" tour:
|
|
|
131 |
| targettype | targetvalue_block | Title | id_content | Content type |
|
|
|
132 |
| Block | Timeline | Timeline | Second step of the Tour | Manual |
|
|
|
133 |
| Block | Calendar | Calendar | Third step of the Tour | Manual |
|
|
|
134 |
When I am on homepage
|
|
|
135 |
Then I should see "First step of the Tour"
|
|
|
136 |
And I should see "Next"
|
|
|
137 |
And I should not see "Next (1/3)"
|
|
|
138 |
And I click on "Next" "button" in the "[data-role='flexitour-step']" "css_element"
|
|
|
139 |
And I should see "Second step of the Tour"
|
|
|
140 |
And I should see "Next"
|
|
|
141 |
And I should not see "Next (2/3)"
|
|
|
142 |
|
|
|
143 |
@javascript
|
|
|
144 |
Scenario: Single step tour with display step numbers was enable
|
|
|
145 |
Given the following "users" exist:
|
|
|
146 |
| username | firstname | lastname | email |
|
|
|
147 |
| student1 | Student | 1 | student1@example.com |
|
|
|
148 |
And I log in as "admin"
|
|
|
149 |
And I add a new user tour with:
|
|
|
150 |
| Name | Steps tour |
|
|
|
151 |
| Description | My steps tour |
|
|
|
152 |
| Apply to URL match | /my/% |
|
|
|
153 |
| Tour is enabled | 1 |
|
|
|
154 |
| Display step numbers | 1 |
|
|
|
155 |
And I add steps to the "Steps tour" tour:
|
|
|
156 |
| targettype | Title | id_content | Content type |
|
|
|
157 |
| Display in middle of page | Welcome | This is a single step tour | Manual |
|
|
|
158 |
When I am on homepage
|
|
|
159 |
Then I should see "This is a single step tour"
|
|
|
160 |
And I should not see "Next (1/1)"
|