diff --git a/core/modules/user/config/tour.tour.people.yml b/core/modules/user/config/tour.tour.people.yml new file mode 100644 index 0000000..8f6b752 --- /dev/null +++ b/core/modules/user/config/tour.tour.people.yml @@ -0,0 +1,30 @@ +id: people +module: user +label: 'People' +langcode: en +paths: + - 'admin/people' +tips: + people-main: + id: people-main + plugin: text + label: 'Managing users' + body: 'This page shows you a list of all of the registered users of your site.' + weight: '1' + people-add: + id: people-add + plugin: text + label: 'Add a user' + body: 'Users can register on your site or you can add them manually here.' + weight: '2' + attributes: + data-class: 'action-links' + people-filter: + id: people-filter + plugin: text + label: 'Search or filter users' + body: 'Use this to hide users from the list or search for a specific user.' + weight: '3' + attributes: + data-id: 'views-exposed-form-user-admin-people-page-1' +status: '1' diff --git a/core/modules/user/config/tour.tour.user-ui.yml b/core/modules/user/config/tour.tour.user-ui.yml new file mode 100644 index 0000000..c19050a --- /dev/null +++ b/core/modules/user/config/tour.tour.user-ui.yml @@ -0,0 +1,38 @@ +id: user +module: user +label: 'Profile ui' +langcode: en +paths: + - 'user/*/edit' +tips: + user-main: + id: user-main + plugin: text + label: 'Edit user' + body: 'Editing a user profile allows you to change basic attributes for your site users.' + weight: '1' + user-status: + id: user-status + plugin: text + label: 'Status' + body: 'This section shows the current user status. Active users can login to the site. Changing the status to Blocked prevents them from logging in.' + weight: '2' + attributes: + data-class: 'form-item-status' + user-role: + id: user-role + plugin: text + label: 'Role' + body: 'This section shows the role of the user. A role defines a group of users that have certain privileges assigned in user permissions.' + weight: '3' + attributes: + data-class: 'form-item-roles' + user-picture: + id: user-picture + plugin: text + label: 'Picture' + body: 'Use this section to provide an image that can be viewed by any site visitor.' + weight: '4' + attributes: + data-class: 'form-managed-file' +status: '1' \ No newline at end of file diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAdminTourTest.php b/core/modules/user/lib/Drupal/user/Tests/UserAdminTourTest.php new file mode 100644 index 0000000..f286a52 --- /dev/null +++ b/core/modules/user/lib/Drupal/user/Tests/UserAdminTourTest.php @@ -0,0 +1,65 @@ + 'User admin tour tests', + 'description' => 'Tests the User admin tour.', + 'group' => 'Tour', + ); + } + + protected function setUp() { + parent::setUp(); + $this->adminUser = $this->drupalCreateUser(array('access tour', 'administer users')); + $this->drupalLogin($this->adminUser); + } + + /** + * Tests menu tour tip availability. + */ + public function testMenuTourTips() { + // Visit user page. + $this->drupalGet('admin/people'); + $tips = array(); + $tips[] = array('data-id' => 'views-exposed-form-user-admin-people-page-1'); + $this->assertTourTips($tips); + } + +} diff --git a/core/modules/user/lib/Drupal/user/Tests/UserProfileTourTest.php b/core/modules/user/lib/Drupal/user/Tests/UserProfileTourTest.php new file mode 100644 index 0000000..d20c019 --- /dev/null +++ b/core/modules/user/lib/Drupal/user/Tests/UserProfileTourTest.php @@ -0,0 +1,67 @@ + 'User profile UI tour tests', + 'description' => 'Tests the User profile UI tour.', + 'group' => 'Tour', + ); + } + + protected function setUp() { + parent::setUp(); + // @see standard.install + module_load_install('user'); + user_install_picture_field(); + + $this->adminUser = $this->drupalCreateUser(array('access tour', 'administer users', 'administer permissions')); + $this->drupalLogin($this->adminUser); + } + + /** + * Tests menu tour tip availability. + */ + public function testMenuTourTips() { + // Visit user page. + $this->drupalGet('user/' . $this->adminUser->id() . '/edit'); + $this->assertTourTips(); + } + +}