MDL-58428 behat: Fix regression of MDL-49399.
[moodle.git] / blocks / admin_bookmarks / tests / behat / bookmark_admin_pages.feature
CommitLineData
2e2d3c9b
DP
1@block @block_admin_bookmarks
2Feature: Add a bookmarks to an admin pages
3 In order to speed up common tasks
4 As an admin
5 I need to add and access pages through bookmarks
6
7 Background:
8 Given I log in as "admin"
14bcc65e 9 And I navigate to "Server > Tasks > Scheduled tasks" in site administration
2e2d3c9b
DP
10 And I click on "Bookmark this page" "link" in the "Admin bookmarks" "block"
11 And I log out
12
13 # Test bookmark functionality using the "User profile fields" page as our bookmark.
14 Scenario: Admin page can be bookmarked
15 Given I log in as "admin"
02fda279 16 And I navigate to "Users > Accounts > User profile fields" in site administration
2e2d3c9b
DP
17 When I click on "Bookmark this page" "link" in the "Admin bookmarks" "block"
18 Then I should see "User profile fields" in the "Admin bookmarks" "block"
19 # See the existing bookmark is there too.
20 And I should see "Scheduled tasks" in the "Admin bookmarks" "block"
21
22 Scenario: Admin page can be accessed through bookmarks block
23 Given I log in as "admin"
02fda279 24 And I navigate to "Notifications" in site administration
2e2d3c9b
DP
25 And I click on "Scheduled tasks" "link" in the "Admin bookmarks" "block"
26 # Verify that we are on the right page.
27 Then I should see "Scheduled tasks" in the "h1" "css_element"
28
29 Scenario: Admin page can be removed from bookmarks
30 Given I log in as "admin"
02fda279 31 And I navigate to "Notifications" in site administration
2e2d3c9b
DP
32 And I click on "Scheduled tasks" "link" in the "Admin bookmarks" "block"
33 When I click on "Unbookmark this page" "link" in the "Admin bookmarks" "block"
34 Then I should see "Bookmark deleted"
35 And I wait to be redirected
36 And I should not see "Scheduled tasks" in the "Admin bookmarks" "block"