Skip to content
Snippets Groups Projects
Verified Commit ebdf86b4 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3387163 by smustgrave, larowlan, alexpott, xjm, quietone: Decouple tour...

Issue #3387163 by smustgrave, larowlan, alexpott, xjm, quietone: Decouple tour from ConfigInstallProfileOverrideTest

(cherry picked from commit c8a07913)
parent 592d8f57
Branches
Tags
15 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,!6720Revert "Issue #3358581 by pfrenssen, _tarik_, a.dmitriiev, smustgrave:...,!6560Update ClaroPreRender.php, confirming classes provided are in array format,!6528Issue #3414261 by catch: Add authenticated user umami performance tests,!6501Issue #3263668 by omkar-pd, Wim Leers, hooroomoo: Re-enable inline form errors...,!6354Draft: Issue #3380392 by phma: Updating language weight from the overview reverts label if translated,!6324Issue #3416723 by Ludo.R: Provide a "node type" views default argument,!6119Issue #3405704 by Spokje, longwave: symfony/psr-http-message-bridge major version bump
Pipeline #71604 passed with warnings
Pipeline: drupal

#71620

    Pipeline: drupal

    #71616

      Pipeline: drupal

      #71613

        +1
        Showing
        with 50 additions and 52 deletions
        ......@@ -5,10 +5,10 @@
        use Drupal\Component\Utility\Crypt;
        use Drupal\Component\Uuid\Uuid;
        use Drupal\Core\Config\InstallStorage;
        use Drupal\entity_test\Entity\EntityTestBundle;
        use Drupal\system\Entity\Action;
        use Drupal\Tests\BrowserTestBase;
        use Drupal\Core\Config\FileStorage;
        use Drupal\system\Entity\Action;
        use Drupal\tour\Entity\Tour;
        use Drupal\user\Entity\Role;
        /**
        ......@@ -87,18 +87,20 @@ public function testInstallProfileConfigOverwrite() {
        $this->assertEquals('Cancel the selected user account(s)', $action->label(), 'Default configuration that is not overridden is not affected.');
        // Ensure that optional configuration can be overridden.
        $tour = Tour::load('language');
        $this->assertCount(1, $tour->getTips(), 'Optional configuration can be overridden. The language tour only has one tip');
        $tour = Tour::load('language-add');
        $this->assertCount(3, $tour->getTips(), 'Optional configuration that is not overridden is not affected.');
        $config_test = \Drupal::entityTypeManager()->getStorage('entity_test_bundle')->load('install_test');
        $this->assertEquals('Optional configuration can be overridden.', $config_test->label());
        $config_test = \Drupal::entityTypeManager()->getStorage('entity_test_bundle')->load('install_test2');
        $this->assertEquals('Optional configuration that is not overridden.', $config_test->label());
        // Ensure the optional configuration is installed. Note that the overridden
        // language tour has a dependency on this tour so it has to exist.
        $this->assertInstanceOf(Tour::class, Tour::load('testing_config_overrides_module'));
        // EntityTestBundle config with ID testing_config_overrides has a
        // dependency on EntityTestBundle with ID testing_config_overrides_module,
        // so it has to exist.
        $this->assertInstanceOf(EntityTestBundle::class, \Drupal::entityTypeManager()->getStorage('entity_test_bundle')->load('testing_config_overrides_module'));
        // Ensure that optional configuration from a profile is created if
        // dependencies are met.
        $this->assertEquals('Config override test', Tour::load('testing_config_overrides')->label());
        $this->assertEquals('Config override test', \Drupal::entityTypeManager()->getStorage('entity_test_bundle')->load('testing_config_overrides')->label());
        // Ensure that optional configuration from a profile is not created if
        // dependencies are not met. Cannot use the entity system since the entity
        ......@@ -140,10 +142,10 @@ public function testInstallProfileConfigOverwrite() {
        $config_test_storage = \Drupal::entityTypeManager()->getStorage('config_test');
        $this->assertNull($config_test_storage->load('completely_new'));
        // Ensure the authenticated role has the access tour permission.
        // Ensure the authenticated role has the access entity_test_bundle permission.
        $role = Role::load(Role::AUTHENTICATED_ID);
        $this->assertTrue($role->hasPermission('access tour'), 'The Authenticated role has the "access tour" permission.');
        $this->assertEquals(['module' => ['tour']], $role->getDependencies());
        $this->assertTrue($role->hasPermission('administer entity_test_bundle content'), 'The Authenticated role has the "administer entity_test_bundle content" permission.');
        $this->assertEquals(['module' => ['entity_test']], $role->getDependencies());
        }
        }
        id: install_test
        label: Default Install Config
        description: ''
        id: install_test2
        label: Optional configuration that is not overridden.
        description: ''
        name: 'Entity test install'
        type: module
        description: 'Provides optional install config for entity_test.'
        package: Testing
        version: VERSION
        dependencies:
        - drupal:entity_test
        id: install_test
        label: Optional configuration can be overridden.
        description: ''
        ......@@ -2,10 +2,10 @@ langcode: en
        status: true
        dependencies:
        module:
        - tour
        - entity_test_install
        id: authenticated
        label: 'Authenticated user'
        weight: 1
        is_admin: false
        permissions:
        - 'access tour'
        - 'administer entity_test_bundle content'
        ......@@ -5,4 +5,4 @@ protected_property: Default
        status: true
        dependencies:
        module:
        - tour
        - entity_test
        langcode: en
        id: testing_config_overrides
        label: Config override test
        description: ''
        # The enforced dependency ensures that profile configuration in config/install
        # can depend on optional configuration of modules and themes it installs.
        dependencies:
        module:
        - language
        - testing_config_overrides_module
        enforced:
        config:
        - tour.tour.testing_config_overrides_module
        id: language
        label: Language
        module: language
        routes:
        -
        route_name: entity.configurable_language.collection
        tips:
        language-overview:
        id: language-overview
        plugin: text
        label: Languages
        weight: 1
        body: '<p>The "Languages" page allows you to add, edit, delete, and reorder languages for the site.</p>'
        - entity_test.entity_test_bundle.testing_config_overrides_module
        langcode: en
        # This depends on configuration in the install's config/install directory so we
        # can test that this configuration is installed.
        dependencies:
        module:
        - testing_config_overrides
        enforced:
        config:
        - tour.tour.language
        id: testing_config_overrides
        label: 'Config override test'
        module: testing_config_overrides
        routes:
        -
        route_name: entity.configurable_language.collection
        tips:
        language-overview:
        id: language-overview
        plugin: text
        label: Languages
        weight: 1
        body: '<p>The "Languages" page allows you to add, edit, delete, and reorder languages for the site.</p>'
        id: testing_config_overrides_module
        label: Testing Config Overrides optional configuration
        dependencies:
        module:
        - entity_test
        langcode: en
        id: testing_config_overrides_module
        label: 'Config override test'
        module: testing_config_overrides_module
        routes:
        -
        route_name: system.admin
        tips:
        overview:
        id: test
        plugin: text
        label: Test
        weight: 1
        body: '<p>This is a test.</p>'
        ......@@ -9,5 +9,5 @@ hidden: true
        install:
        - action
        - language
        - entity_test_install
        - testing_config_overrides_module
        - tour
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment