Unverified Commit 82979c95 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3139414 by cburschka, mohrerao, pavnish, jungle, ravi.shankar,...

Issue #3139414 by cburschka, mohrerao, pavnish, jungle, ravi.shankar, mondrake, daffie, sja112: [backport] Replace usages of deprecated AssertLegacyTrait::assert(No)Link()
parent c2c26f87
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ public function testTrackerAll() {
    $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.');
    $this->assertSession()->linkExists(t('My recent content'), 0, 'User tab shows up on the global tracker page.');

    // Assert cache contexts, specifically the pager and node access contexts.
    $this->assertCacheContexts(['languages:language_interface', 'route', 'theme', 'url.query_args:' . MainContentViewSubscriber::WRAPPER_FORMAT, 'url.query_args.pagers:0', 'user.node_grants:view', 'user']);
@@ -208,8 +208,8 @@ public function testTrackerUser() {
    $this->assertCacheTags($expected_tags);
    $this->assertCacheContexts(['languages:language_interface', 'route', 'theme', 'url.query_args:' . MainContentViewSubscriber::WRAPPER_FORMAT, 'url.query_args.pagers:0', 'user', 'user.node_grants:view']);

    $this->assertLink($my_published->label());
    $this->assertNoLink($unpublished->label());
    $this->assertSession()->linkExists($my_published->label());
    $this->assertSession()->linkNotExists($unpublished->label());
    // Verify that title and tab title have been set correctly.
    $this->assertText('Activity', 'The user activity tab has the name "Activity".');
    $this->assertTitle($this->user->getAccountName() . ' | Drupal');
+3 −3
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ public function testUserPasswordReset() {

    // Check successful login.
    $this->drupalPostForm(NULL, NULL, t('Log in'));
    $this->assertLink(t('Log out'));
    $this->assertSession()->linkExists(t('Log out'));
    $this->assertTitle($this->account->getAccountName() . ' | Drupal');

    // Change the forgotten password.
@@ -188,7 +188,7 @@ public function testUserPasswordReset() {
    $this->drupalPostForm(NULL, $edit, t('Submit'));
    $reset_url = $this->getResetURL();
    $this->drupalGet($reset_url . '/login');
    $this->assertLink(t('Log out'));
    $this->assertSession()->linkExists(t('Log out'));
    $this->assertTitle($this->account->getAccountName() . ' | Drupal');

    // Ensure blocked and deleted accounts can't access the user.reset.login
@@ -358,7 +358,7 @@ public function testUserResetPasswordUserFloodControlIsCleared() {
    // Use the last password reset URL which was generated.
    $reset_url = $this->getResetURL();
    $this->drupalGet($reset_url . '/login');
    $this->assertLink(t('Log out'));
    $this->assertSession()->linkExists(t('Log out'));
    $this->assertTitle($this->account->getAccountName() . ' | Drupal');
    $this->drupalLogout();