MDL-58520 block_myoverview: change display name to Course overview
[moodle.git] / admin / tool / usertours / tests / behat / create_tour.feature
CommitLineData
001fc061
AN
1@tool @tool_usertours
2Feature: 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/% |
a4da15d4 17 | Tour is enabled | 1 |
001fc061
AN
18 And I add steps to the "First tour" tour:
19 | targettype | Title | Content |
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 |
21 And I add steps to the "First tour" tour:
22 | targettype | targetvalue_block | Title | Content |
4671ae63 23 | Block | Course overview | Course overview | This area shows you what's happening in some of your courses |
001fc061
AN
24 | Block | Calendar | Calendar | This is the Calendar. All of your assignments and due dates can be found here |
25 And I add steps to the "First tour" tour:
26 | targettype | targetvalue_selector | Title | Content |
27 | Selector | .usermenu | User menu | This is your personal user menu. You'll find your personal preferences and your user profile here. |
e5287f9b 28 When I am on homepage
001fc061
AN
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 press "Next"
31 And I should see "This area shows you what's happening in some of your courses"
32 And I should not see "This is the Calendar. All of your assignments and due dates can be found here"
33 And I press "Next"
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 press "Prev"
37 And I should not see "This is the Calendar. All of your assignments and due dates can be found here"
38 And I should see "This area shows you what's happening in some of your courses"
39 And I press "End tour"
40 And I should not see "This area shows you what's happening in some of your courses"
e5287f9b 41 And I am on homepage
001fc061
AN
42 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"
43 And I should not see "This area shows you what's happening in some of your courses"
44 And I follow "Reset user tour on this page"
45 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"
46
47 @javascript
48 Scenario: A hidden tour should not be visible
49 Given the following "users" exist:
50 | username | firstname | lastname | email |
51 | student1 | Student | 1 | student1@example.com |
52 And I log in as "admin"
53 And I add a new user tour with:
54 | Name | First tour |
55 | Description | My first tour |
56 | Apply to URL match | /my/% |
a4da15d4 57 | Tour is enabled | 0 |
001fc061
AN
58 And I add steps to the "First tour" tour:
59 | targettype | Title | Content |
60 | 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 |
e5287f9b 61 When I am on homepage
001fc061
AN
62 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"
63
64 @javascript
65 Scenario: Tour visibility can be toggled
66 Given the following "users" exist:
67 | username | firstname | lastname | email |
68 | student1 | Student | 1 | student1@example.com |
69 And I log in as "admin"
70 And I add a new user tour with:
71 | Name | First tour |
72 | Description | My first tour |
73 | Apply to URL match | /my/% |
a4da15d4 74 | Tour is enabled | 0 |
001fc061
AN
75 And I add steps to the "First tour" tour:
76 | targettype | Title | Content |
77 | 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 |
78 And I open the User tour settings page
79 When I click on "Enable" "link" in the "My first tour" "table_row"
e5287f9b 80 And I am on homepage
001fc061 81 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"