Commit d7442be7 authored by catch's avatar catch
Browse files

Issue #3191935 by mondrake, tedbow, paulocs, ankithashetty, longwave, xjm,...

Issue #3191935 by mondrake, tedbow, paulocs, ankithashetty, longwave, xjm, catch, alexpott: Replace usages of AssertLegacyTrait::assertNoText, which is deprecated
parent 4a2894ee
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public function testActionConfiguration() {
    // Make sure that the action updated properly.
    $this->assertSession()->pageTextContains('The action has been successfully saved.');
    // The old action label does NOT appear on the configuration page.
    $this->assertNoText($action_label);
    $this->assertSession()->pageTextNotContains($action_label);
    // The action label appears on the configuration page after we've updated
    // the complex action.
    $this->assertSession()->pageTextContains($new_action_label);
@@ -93,7 +93,7 @@ public function testActionConfiguration() {
    $this->drupalGet('admin/config/system/actions');
    $this->assertSession()->statusCodeEquals(200);
    // The action label does not appear on the overview page.
    $this->assertNoText($new_action_label);
    $this->assertSession()->pageTextNotContains($new_action_label);

    $action = Action::load($action_id);
    $this->assertNull($action, 'Make sure the action is gone after being deleted.');
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ public function testBlockLinks() {
    $block->save();
    // Check that the block is no longer displayed.
    $this->drupalGet('test-page');
    $this->assertNoText($block->label());
    $this->assertSession()->pageTextNotContains($block->label());
  }

  /**
+9 −9
Original line number Diff line number Diff line
@@ -28,16 +28,16 @@ public function testFeedUpdateFields() {
    // scheduled.
    $this->assertSession()->pageTextContains('never');
    $this->assertSession()->pageTextContains('imminently');
    $this->assertNoText('ago');
    $this->assertNoText('left');
    $this->assertSession()->pageTextNotContains('ago');
    $this->assertSession()->pageTextNotContains('left');

    $this->updateFeedItems($scheduled_feed);
    $this->drupalGet('admin/config/services/aggregator');

    // After the update, an interval should be displayed on both last updated
    // and next update.
    $this->assertNoText('never');
    $this->assertNoText('imminently');
    $this->assertSession()->pageTextNotContains('never');
    $this->assertSession()->pageTextNotContains('imminently');
    $this->assertSession()->pageTextContains('ago');
    $this->assertSession()->pageTextContains('left');

@@ -50,9 +50,9 @@ public function testFeedUpdateFields() {
    $this->drupalGet('admin/config/services/aggregator');
    // The non scheduled feed shows that it has not been updated yet.
    $this->assertSession()->pageTextContains('never');
    $this->assertNoText('imminently');
    $this->assertNoText('ago');
    $this->assertNoText('left');
    $this->assertSession()->pageTextNotContains('imminently');
    $this->assertSession()->pageTextNotContains('ago');
    $this->assertSession()->pageTextNotContains('left');

    $this->updateFeedItems($non_scheduled_feed);
    $this->drupalGet('admin/config/services/aggregator');
@@ -60,9 +60,9 @@ public function testFeedUpdateFields() {
    // After the feed update, we still need to see "never" as next update label.
    // Last update will show an interval.
    $this->assertSession()->pageTextContains('never');
    $this->assertNoText('imminently');
    $this->assertSession()->pageTextNotContains('imminently');
    $this->assertSession()->pageTextContains('ago');
    $this->assertNoText('left');
    $this->assertSession()->pageTextNotContains('left');
  }

  /**
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ public function testBasicAuth() {

    // Ensure that invalid authentication details give access denied.
    $this->basicAuthGet($url, $account->getAccountName(), $this->randomMachineName());
    $this->assertNoText($account->getAccountName());
    $this->assertSession()->pageTextNotContains($account->getAccountName());
    $this->assertSession()->statusCodeEquals(403);
    $this->mink->resetSessions();

@@ -179,7 +179,7 @@ public function testUnauthorizedErrorMessage() {
    // unauthorized message is displayed.
    $this->drupalGet($url);
    $this->assertSession()->statusCodeEquals(401);
    $this->assertNoText('Exception');
    $this->assertSession()->pageTextNotContains('Exception');
    $this->assertSession()->pageTextContains('Please log in to access this page.');

    // Case when empty credentials are passed, a user friendly access denied
+4 −4
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ public function testCachePerRole() {
    // Clear the cache and verify that the stale data is no longer there.
    Cache::invalidateTags(['block_view']);
    $this->drupalGet('');
    $this->assertNoText($old_content);
    $this->assertSession()->pageTextNotContains($old_content);
    // Fresh block content is displayed after clearing the cache.
    $this->assertSession()->pageTextContains($current_content);

@@ -108,7 +108,7 @@ public function testCachePerRole() {
    $this->drupalLogout();
    $this->drupalGet('');
    // Anonymous user does not see content cached per-role for normal user.
    $this->assertNoText($old_content);
    $this->assertSession()->pageTextNotContains($old_content);

    // User with the same roles sees per-role cached content.
    $this->drupalLogin($this->normalUserAlt);
@@ -118,7 +118,7 @@ public function testCachePerRole() {
    // Admin user does not see content cached per-role for normal user.
    $this->drupalLogin($this->adminUser);
    $this->drupalGet('');
    $this->assertNoText($old_content);
    $this->assertSession()->pageTextNotContains($old_content);

    // Block is served from the per-role cache.
    $this->drupalLogin($this->normalUser);
@@ -227,7 +227,7 @@ public function testCachePerPage() {
    $this->assertSession()->statusCodeEquals(200);
    // Verify that block content cached for the test page does not show up
    // for the user page.
    $this->assertNoText($old_content);
    $this->assertSession()->pageTextNotContains($old_content);
    $this->drupalGet('test-page');
    $this->assertSession()->statusCodeEquals(200);
    // Verify that the block content is cached for the test page.
Loading