Skip to content
Snippets Groups Projects
Verified Commit 293107a3 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3432632 by simohell, smustgrave, kostyashupenko, andypost: Collapsed...

Issue #3432632 by simohell, smustgrave, kostyashupenko, andypost: Collapsed nav-tabs status not exposed to screen reader

(cherry picked from commit bd81352e)
parent 0da99641
No related branches found
No related tags found
18 merge requests!10602Issue #3438769 by vinmayiswamy, antonnavi, michelle, amateescu: Sub workspace does not clear,!10301Issue #3469309 by mstrelan, smustgrave, moshe weitzman: Use one-time login...,!10187Issue #3487488 by dakwamine: ExtensionMimeTypeGuesser::guessMimeType must support file names with "0" (zero) like foo.0.zip,!9929Issue #3445469 by pooja_sharma, smustgrave: Add additional test coverage for...,!9787Resolve issue 3479427 - bootstrap barrio issue under Windows,!9742Issue #3463908 by catch, quietone: Split OptionsFieldUiTest into two,!9526Issue #3458177 by mondrake, catch, quietone, godotislate, longwave, larowlan,...,!8949Backport .gitlabci.yml changes.,!8738Issue #3424162 by camilledavis, dineshkumarbollu, smustgrave: Claro...,!8704Make greek characters available in ckeditor5,!8597Draft: Issue #3442259 by catch, quietone, dww: Reduce time of Migrate Upgrade tests...,!8533Issue #3446962 by kim.pepper: Remove incorrectly added...,!8517Issue #3443748 by NexusNovaz, smustgrave: Testcase creates false positive,!7930Resolve #3427374 "Taxonomytid viewsargumentdefault plugin",!7445Issue #3440169: When using drupalGet(), provide an associative array for $headers,!6502Draft: Resolve #2938524 "Plach testing issue",!38582585169-10.1.x,!3226Issue #2987537: Custom menu link entity type should not declare "bundle" entity key
Pipeline #162916 passed
Pipeline: drupal

#162932

    Pipeline: drupal

    #162927

      Pipeline: drupal

      #162924

        +1
        // This test is a duplicate of oliveroPrimaryTabsTest.js tagged for claro
        const primaryTabsWrapper = '[data-drupal-nav-tabs]';
        const activeTab = '.tabs__tab.is-active';
        const inactiveTab = '.tabs__tab:not(.is-active)';
        const mobileToggle = `${activeTab} .tabs__trigger`;
        module.exports = {
        '@tags': ['core', 'claro'],
        before(browser) {
        browser
        .drupalInstall({
        setupFile:
        'core/tests/Drupal/TestSite/TestSiteClaroInstallTestScript.php',
        installProfile: 'minimal',
        })
        .drupalCreateUser({
        name: 'user',
        password: '123',
        permissions: ['administer nodes'],
        })
        .drupalLogin({ name: 'user', password: '123' });
        browser.setWindowSize(1600, 800);
        },
        after(browser) {
        browser.drupalUninstall();
        },
        'Verify desktop primary tab display': (browser) => {
        browser
        .drupalRelativeURL('/node/1')
        .waitForElementVisible(primaryTabsWrapper)
        .assert.visible(activeTab)
        .assert.visible(inactiveTab)
        .assert.not.visible(mobileToggle);
        },
        'Verify mobile tab display and click functionality': (browser) => {
        browser
        .setWindowSize(699, 800)
        .drupalRelativeURL('/node/1')
        .waitForElementVisible(primaryTabsWrapper)
        .assert.visible(activeTab)
        .assert.not.visible(inactiveTab)
        .assert.visible(mobileToggle)
        .assert.attributeEquals(mobileToggle, 'aria-expanded', 'false')
        .click(mobileToggle)
        .waitForElementVisible(inactiveTab)
        .assert.attributeEquals(mobileToggle, 'aria-expanded', 'true')
        .click(mobileToggle)
        .waitForElementNotVisible(inactiveTab)
        .assert.attributeEquals(mobileToggle, 'aria-expanded', 'false');
        },
        };
        <?php
        declare(strict_types=1);
        namespace Drupal\TestSite;
        use Drupal\Core\Extension\ModuleInstallerInterface;
        use Drupal\Core\Extension\ThemeInstallerInterface;
        use Drupal\node\Entity\Node;
        use Drupal\comment\Entity\Comment;
        /**
        * Setup file used by TestSiteInstallTestScript.
        *
        * @see \Drupal\Tests\Scripts\TestSiteApplicationTest
        */
        class TestSiteClaroInstallTestScript implements TestSetupInterface {
        /**
        * {@inheritdoc}
        */
        public function setup() {
        // Install required module for the Olivero front page.
        $module_installer = \Drupal::service('module_installer');
        assert($module_installer instanceof ModuleInstallerInterface);
        $module_installer->install(['olivero_test']);
        // Install Claro instead of Olivero and set it as the default theme.
        $theme_installer = \Drupal::service('theme_installer');
        assert($theme_installer instanceof ThemeInstallerInterface);
        $theme_installer->install(['claro'], TRUE);
        $system_theme_config = \Drupal::configFactory()->getEditable('system.theme');
        $system_theme_config->set('default', 'claro')->save();
        // Create an article that will have no comments
        $article_no_comments = Node::create(['type' => 'article']);
        $article_no_comments->set('title', 'Article without comments');
        // Enable comments
        $article_no_comments->set('comment', 2);
        $article_no_comments->save();
        // Create an article that will have comments
        $article_with_comments = Node::create(['type' => 'article']);
        $article_with_comments->set('title', 'Article with comments');
        // Enable comments
        $article_with_comments->set('comment', 2);
        $article_with_comments->save();
        $values = [
        // These values are for the entity that you're creating the comment for, not the comment itself.
        'entity_type' => 'node',
        'entity_id' => 2,
        'field_name' => 'comment',
        'uid' => 1,
        // These values are for the comment itself.
        'comment_type' => 'comment',
        'subject' => 'A comment',
        'comment_body' => 'Body of comment',
        // Whether the comment is 'approved' or not.
        'status' => 1,
        ];
        // Create comment entities out of our field values
        $comment1 = Comment::create($values);
        $comment1->save();
        $comment2 = Comment::create($values);
        $comment2->save();
        }
        }
        ......@@ -13,6 +13,7 @@
        const openMenu = () => {
        $target.toggleClass('is-open');
        $target.find('button').attr('aria-expanded', $target.hasClass('is-open'));
        };
        const toggleOrder = (reset) => {
        ......@@ -54,9 +55,11 @@
        // the width of the parent container.
        const isHorizontal = $tab.attr('data-width') <= $tab.outerWidth();
        $tab.toggleClass('is-horizontal', isHorizontal);
        $tab.find('button').attr('aria-expanded', null);
        toggleOrder(isHorizontal);
        } else {
        toggleOrder(false);
        $tab.find('button').attr('aria-expanded', 'false');
        }
        };
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment