diff --git a/core/modules/tracker/src/Tests/TrackerNodeAccessTest.php b/core/modules/tracker/src/Tests/TrackerNodeAccessTest.php index 486471eb3dea62c9d7d1b58c780c42868f0803c7..337e7e179fb3db9dd73a6890d5996cfacc060414 100644 --- a/core/modules/tracker/src/Tests/TrackerNodeAccessTest.php +++ b/core/modules/tracker/src/Tests/TrackerNodeAccessTest.php @@ -56,19 +56,19 @@ function testTrackerNodeAccess() { )); // User with access should see both nodes created. - $this->drupalGet('tracker'); + $this->drupalGet('activity'); $this->assertText($private_node->getTitle(), 'Private node is visible to user with private access.'); $this->assertText($public_node->getTitle(), 'Public node is visible to user with private access.'); - $this->drupalGet('user/' . $access_user->id() . '/track'); + $this->drupalGet('user/' . $access_user->id() . '/activity'); $this->assertText($private_node->getTitle(), 'Private node is visible to user with private access.'); $this->assertText($public_node->getTitle(), 'Public node is visible to user with private access.'); // User without access should not see private node. $this->drupalLogin($no_access_user); - $this->drupalGet('tracker'); + $this->drupalGet('activity'); $this->assertNoText($private_node->getTitle(), 'Private node is not visible to user without private access.'); $this->assertText($public_node->getTitle(), 'Public node is visible to user without private access.'); - $this->drupalGet('user/' . $access_user->id() . '/track'); + $this->drupalGet('user/' . $access_user->id() . '/activity'); $this->assertNoText($private_node->getTitle(), 'Private node is not visible to user without private access.'); $this->assertText($public_node->getTitle(), 'Public node is visible to user without private access.'); } diff --git a/core/modules/tracker/src/Tests/TrackerTest.php b/core/modules/tracker/src/Tests/TrackerTest.php index 6a698ed3d1d98809c0976f0efb3db22123ad672e..de9ca2121cb62866e8c03954743b7c4d48efb262 100644 --- a/core/modules/tracker/src/Tests/TrackerTest.php +++ b/core/modules/tracker/src/Tests/TrackerTest.php @@ -64,14 +64,14 @@ function testTrackerAll() { 'status' => 1, )); - $this->drupalGet('tracker'); + $this->drupalGet('activity'); $this->assertNoText($unpublished->label(), 'Unpublished node does not show up in the tracker listing.'); $this->assertText($published->label(), 'Published node shows up in the tracker listing.'); $this->assertLink(t('My recent content'), 0, 'User tab shows up on the global tracker page.'); // Delete a node and ensure it no longer appears on the tracker. $published->delete(); - $this->drupalGet('tracker'); + $this->drupalGet('activity'); $this->assertNoText($published->label(), 'Deleted node does not show up in the tracker listing.'); } @@ -107,20 +107,20 @@ function testTrackerUser() { ); $this->drupalPostForm('comment/reply/node/' . $other_published_my_comment->id() . '/comment', $comment, t('Save')); - $this->drupalGet('user/' . $this->user->id() . '/track'); + $this->drupalGet('user/' . $this->user->id() . '/activity'); $this->assertNoText($unpublished->label(), "Unpublished nodes do not show up in the user's tracker listing."); $this->assertText($my_published->label(), "Published nodes show up in the user's tracker listing."); $this->assertNoText($other_published_no_comment->label(), "Another user's nodes do not show up in the user's tracker listing."); $this->assertText($other_published_my_comment->label(), "Nodes that the user has commented on appear in the user's tracker listing."); // Verify that title and tab title have been set correctly. - $this->assertText('Track', 'The user tracker tab has the name "Track".'); + $this->assertText('Activity', 'The user activity tab has the name "Activity".'); $this->assertTitle(t('@name | @site', array('@name' => $this->user->getUsername(), '@site' => \Drupal::config('system.site')->get('name'))), 'The user tracker page has the correct page title.'); // Verify that unpublished comments are removed from the tracker. $admin_user = $this->drupalCreateUser(array('post comments', 'administer comments', 'access user profiles')); $this->drupalLogin($admin_user); $this->drupalPostForm('comment/1/edit', array('status' => CommentInterface::NOT_PUBLISHED), t('Save')); - $this->drupalGet('user/' . $this->user->id() . '/track'); + $this->drupalGet('user/' . $this->user->id() . '/activity'); $this->assertNoText($other_published_my_comment->label(), 'Unpublished comments are not counted on the tracker listing.'); } @@ -136,8 +136,8 @@ function testTrackerNewNodes() { $node = $this->drupalCreateNode($edit); $title = $edit['title']; - $this->drupalGet('tracker'); - $this->assertPattern('/' . $title . '.*new/', 'New nodes are flagged as such in the tracker listing.'); + $this->drupalGet('activity'); + $this->assertPattern('/' . $title . '.*new/', 'New nodes are flagged as such in the activity listing.'); $this->drupalGet('node/' . $node->id()); // Simulate the JavaScript on the node page to mark the node as read. @@ -148,11 +148,11 @@ function testTrackerNewNodes() { 'Accept: application/json', ), )); - $this->drupalGet('tracker'); + $this->drupalGet('activity'); $this->assertNoPattern('/' . $title . '.*new/', 'Visited nodes are not flagged as new.'); $this->drupalLogin($this->other_user); - $this->drupalGet('tracker'); + $this->drupalGet('activity'); $this->assertPattern('/' . $title . '.*new/', 'For another user, new nodes are flagged as such in the tracker listing.'); $this->drupalGet('node/' . $node->id()); @@ -164,7 +164,7 @@ function testTrackerNewNodes() { 'Accept: application/json', ), )); - $this->drupalGet('tracker'); + $this->drupalGet('activity'); $this->assertNoPattern('/' . $title . '.*new/', 'For another user, visited nodes are not flagged as new.'); } @@ -195,7 +195,7 @@ function testTrackerNewComments() { )); $this->drupalLogin($this->other_user); - $this->drupalGet('tracker'); + $this->drupalGet('activity'); $this->assertText('1 new', 'New comments are counted on the tracker listing pages.'); $this->drupalGet('node/' . $node->id()); @@ -210,7 +210,7 @@ function testTrackerNewComments() { $this->drupalPostForm('comment/reply/node/' . $node->id(). '/comment', $comment, t('Save')); $this->drupalLogin($this->user); - $this->drupalGet('tracker'); + $this->drupalGet('activity'); $this->assertText('1 new', 'New comments are counted on the tracker listing pages.'); } @@ -271,7 +271,7 @@ function testTrackerOrderingNewComments() { // Switch back to the other_user and assert that the order has swapped. $this->drupalLogin($this->other_user); - $this->drupalGet('user/' . $this->other_user->id() . '/track'); + $this->drupalGet('user/' . $this->other_user->id() . '/activity'); // This is a cheeky way of asserting that the nodes are in the right order // on the tracker page. // It's almost certainly too brittle. @@ -317,7 +317,7 @@ function testTrackerCronIndexing() { $this->drupalLogin($this->user); // Fetch the user's tracker. - $this->drupalGet('tracker/' . $this->user->id()); + $this->drupalGet('activity/' . $this->user->id()); // Assert that all node titles are displayed. foreach ($nodes as $i => $node) { @@ -327,7 +327,7 @@ function testTrackerCronIndexing() { $this->assertText('updated', 'Node is listed as updated'); // Fetch the site-wide tracker. - $this->drupalGet('tracker'); + $this->drupalGet('activity'); // Assert that all node titles are displayed. foreach ($nodes as $i => $node) { @@ -349,7 +349,7 @@ function testTrackerAdminUnpublish() { )); // Assert that the node is displayed. - $this->drupalGet('tracker'); + $this->drupalGet('activity'); $this->assertText($node->label(), 'A node is displayed on the tracker listing pages.'); // Unpublish the node and ensure that it's no longer displayed. @@ -359,7 +359,7 @@ function testTrackerAdminUnpublish() { ); $this->drupalPostForm('admin/content', $edit, t('Apply')); - $this->drupalGet('tracker'); + $this->drupalGet('activity'); $this->assertText(t('No content available.'), 'A node is displayed on the tracker listing pages.'); } } diff --git a/core/modules/tracker/tracker.info.yml b/core/modules/tracker/tracker.info.yml index be8d61b308402c4c4997f0691f4d2e006bcc10c4..79d179d1cb3a7db7e19e0a19ce3e59eec77e202f 100644 --- a/core/modules/tracker/tracker.info.yml +++ b/core/modules/tracker/tracker.info.yml @@ -1,4 +1,4 @@ -name: Tracker +name: Activity Tracker type: module description: 'Enables tracking of recent content for users.' dependencies: diff --git a/core/modules/tracker/tracker.links.task.yml b/core/modules/tracker/tracker.links.task.yml index 80920382abc97ba58a68b325e01ed12597158409..db7c93a2129ee952a3e1aad3972c919909ce0726 100644 --- a/core/modules/tracker/tracker.links.task.yml +++ b/core/modules/tracker/tracker.links.task.yml @@ -12,4 +12,4 @@ tracker.users_recent_tab: tracker.user_tab: route_name: tracker.user_tab base_route: user.view - title: 'Track' + title: 'Activity' diff --git a/core/modules/tracker/tracker.module b/core/modules/tracker/tracker.module index 1c41d50cd78240cd4586c6a741ca8f19a33a0f7f..6f1f819d123cbe4a88f0185c5e4cf38f28020c1d 100644 --- a/core/modules/tracker/tracker.module +++ b/core/modules/tracker/tracker.module @@ -24,7 +24,7 @@ function tracker_help($route_name, RouteMatchInterface $route_match) { $output .= '<dt>' . t('Tracking new and updated site content') . '</dt>'; $output .= '<dd>' . t('The <a href="!recent">Recent content</a> page shows new and updated content in reverse chronological order, listing the content type, title, author\'s name, number of comments, and time of last update. Content is considered updated when changes occur in the text, or when new comments are added. The <em>My recent content</em> tab limits the list to the currently logged-in user.', array('!recent' => \Drupal::url('tracker.page'))) . '</dd>'; $output .= '<dt>' . t('Tracking user-specific content') . '</dt>'; - $output .= '<dd>' . t("To follow a specific user's new and updated content, select the <em>Track</em> tab from the user's profile page.") . '</dd>'; + $output .= '<dd>' . t("To follow a specific user's new and updated content, select the <em>Activity</em> tab from the user's profile page.") . '</dd>'; $output .= '</dl>'; return $output; } diff --git a/core/modules/tracker/tracker.routing.yml b/core/modules/tracker/tracker.routing.yml index 4de8d8fe2499eb3748e5148bf94ffb681fc01642..c1788f8f7f14911c625e08af445b9d733fa9d4dc 100644 --- a/core/modules/tracker/tracker.routing.yml +++ b/core/modules/tracker/tracker.routing.yml @@ -1,5 +1,5 @@ tracker.page: - path: '/tracker' + path: '/activity' defaults: _content: '\Drupal\tracker\Controller\TrackerPage::getContent' _title: 'Recent content' @@ -7,7 +7,7 @@ tracker.page: _permission: 'access content' tracker.users_recent_content: - path: '/tracker/{user}' + path: '/activity/{user}' defaults: _content: '\Drupal\tracker\Controller\TrackerUserRecent::getContent' _title: 'My recent content' @@ -18,7 +18,7 @@ tracker.users_recent_content: _access_tracker_own_information: 'TRUE' tracker.user_tab: - path: '/user/{user}/track' + path: '/user/{user}/activity' defaults: _content: '\Drupal\tracker\Controller\TrackerUserTab::getContent' _title_callback: '\Drupal\tracker\Controller\TrackerUserTab::getTitle'