Skip to content
Snippets Groups Projects
Commit 722d8fba authored by catch's avatar catch
Browse files

Issue #3417362 by kristiaanvandeneynde, smustgrave, quietone: Call...

Issue #3417362 by kristiaanvandeneynde, smustgrave, quietone: Call refreshVariables() where needed in various tests

(cherry picked from commit 5ce1a1b4)
parent 24c236fd
No related branches found
No related tags found
8 merge requests!8376Drupal views: adding more granularity to the ‘use ajax’ functionality,!8300Issue #3443586 View area displays even when parent view has no results.,!7567Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7565Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7509Change label "Block description" to "Block type",!7344Issue #3292350 by O'Briat, KlemenDEV, hswong3i, smustgrave, quietone: Update...,!6922Issue #3412959 by quietone, smustgrave, longwave: Fix 12 'un' words,!6848Issue #3417553 by longwave: Remove withConsecutive() in CacheCollectorTest
Pipeline #104182 passed
Pipeline: drupal

#104203

    Pipeline: drupal

    #104197

      Pipeline: drupal

      #104193

        +1
        ......@@ -359,6 +359,9 @@ public function testPostSkipCommentApproval() {
        $this->assertResourceResponse(201, FALSE, $response);
        $this->assertFalse($unserialized->isPublished());
        // Make sure the role save below properly invalidates cache tags.
        $this->refreshVariables();
        // Grant anonymous permission to skip comment approval.
        $this->grantPermissionsToTestedRole(['skip comment approval']);
        ......
        ......@@ -86,6 +86,9 @@ public function testMediaOverviewPage() {
        ]);
        $media3->save();
        // Make sure the role save below properly invalidates cache tags.
        $this->refreshVariables();
        // Verify the view is now correctly populated. The non-admin user can only
        // view published media.
        $this->grantPermissions($role, [
        ......@@ -138,6 +141,9 @@ public function testMediaOverviewPage() {
        $assert_session->elementExists('css', 'td.views-field-operations li a:contains("Delete")', $row1);
        $assert_session->linkByHrefExists('/media/' . $media1->id() . '/delete');
        // Make sure the role save below properly invalidates cache tags.
        $this->refreshVariables();
        // Make the user the owner of the unpublished media item and assert the
        // media item is only visible with the 'view own unpublished media'
        // permission.
        ......
        ......@@ -375,6 +375,9 @@ protected function uploadFile() {
        static::recursiveKSort($actual);
        $this->assertSame($expected, $actual);
        // Make sure the role save below properly invalidates cache tags.
        $this->refreshVariables();
        // To still run the complete test coverage for POSTing a Media entity, we
        // must revoke the additional permissions that we granted.
        $role = Role::load(static::$auth ? RoleInterface::AUTHENTICATED_ID : RoleInterface::ANONYMOUS_ID);
        ......
        ......@@ -255,6 +255,9 @@ public function testPatchPath() {
        $this->assertSame('/llama', $this->entityStorage->loadUnchanged($this->entity->id())->get('path')->alias);
        $this->assertResourceErrorResponse(403, "Access denied on updating field 'path'. " . static::$patchProtectedFieldNames['path'], $response);
        // Make sure the role save below properly invalidates cache tags.
        $this->refreshVariables();
        // Grant permission to create URL aliases.
        $this->grantPermissionsToTestedRole(['create url aliases']);
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment