Skip to content
Snippets Groups Projects
Commit 9645d13b authored by catch's avatar catch
Browse files

Issue #3523705 by amateescu, rkoller, poker10: InvalidComponentException when...

Issue #3523705 by amateescu, rkoller, poker10: InvalidComponentException when workspaces ui is installed

(cherry picked from commit 9637a9a8)
parent 65f2db7e
No related branches found
No related tags found
1 merge request!12357Issue #3529639 by mradcliffe, smustgrave, solomon.yifru: replacing a depricated css
Pipeline #515022 passed with warnings
Pipeline: drupal

#515049

    Pipeline: drupal

    #515037

      Pipeline: drupal

      #515033

        ......@@ -59,6 +59,9 @@ public function renderNavigationLinks(): array {
        'title' => $active_workspace ? $active_workspace->label() : $this->t('Live'),
        'url' => $url,
        'class' => 'workspaces',
        'icon' => [
        'icon_id' => 'workspaces',
        ],
        ],
        ],
        '#attached' => [
        ......
        <?php
        declare(strict_types=1);
        namespace Drupal\Tests\navigation\Functional;
        use Drupal\Tests\BrowserTestBase;
        /**
        * Tests for \Drupal\navigation\WorkspacesLazyBuilder.
        *
        * @group navigation
        */
        class NavigationWorkspacesUiTest extends BrowserTestBase {
        /**
        * {@inheritdoc}
        */
        protected static $modules = ['navigation', 'workspaces_ui'];
        /**
        * {@inheritdoc}
        */
        protected $defaultTheme = 'stark';
        /**
        * {@inheritdoc}
        */
        protected function setUp(): void {
        parent::setUp();
        $admin_user = $this->drupalCreateUser([
        'access navigation',
        'administer workspaces',
        ]);
        $this->drupalLogin($admin_user);
        }
        /**
        * Tests the Workspaces button in the navigation bar.
        */
        public function testWorkspacesNavigationButton(): void {
        $this->drupalGet('<front>');
        $this->assertSession()->statusCodeEquals(200);
        $this->assertSession()->elementAttributeContains('css', 'a.toolbar-button--icon--workspaces svg', 'width', '20');
        $this->assertSession()->elementAttributeContains('css', 'a.toolbar-button--icon--workspaces svg', 'class', 'toolbar-button__icon');
        }
        }
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment