mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-80871 tool_usertours: Allow tours to ignore completion
The use-case here is for tours which must be shown on every page load. The tour still needs to be ended for the current page, but should be shown again on the next time the page is loaded.
- Loading branch information
1 parent
4d992e8
commit 43e2e62
Showing
8 changed files
with
116 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
admin/tool/usertours/tests/behat/tour_prevents_completion.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@tool @tool_usertours | ||
Feature: Prevent yours from being marked as complete | ||
In order to impart key information | ||
As an administrator | ||
I can prevent a user tour from being marked as complete | ||
|
||
Background: | ||
Given I log in as "admin" | ||
And I add a new user tour with: | ||
| Name | First tour | | ||
| Description | My first tour | | ||
| Apply to URL match | FRONTPAGE | | ||
| Tour is enabled | 1 | | ||
| Show with backdrop | 1 | | ||
# 2 = tour::SHOW_TOUR_ON_EACH_PAGE_VISIT | ||
| Show tour | 2 | | ||
And I add steps to the "First tour" tour: | ||
| targettype | Title | id_content | Content type | | ||
| Display in middle of page | Welcome | Welcome tour. | Manual | | ||
|
||
@javascript | ||
Scenario: Ending the tour should not mark it as complete | ||
# Changing the window viewport to mobile so we will have the footer section. | ||
Given I am on site homepage | ||
And I should see "Welcome" | ||
And I press "Got it" | ||
And I should not see "Welcome" | ||
When I am on site homepage | ||
Then I should see "Welcome" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters