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

Issue #3399152 by SamLerner, smustgrave, sourabhjain, DishaKatariya, Nitin...

Issue #3399152 by SamLerner, smustgrave, sourabhjain, DishaKatariya, Nitin shrivastava, Nikolay Shapovalov, xjm: Change sort order of configuration options on config single export form
parent f0d3a7bf
No related branches found
No related tags found
30 merge requests!8528Issue #3456871 by Tim Bozeman: Support NULL services,!8323Fix source code editing and in place front page site studio editing.,!6278Issue #3187770 by godotislate, smustgrave, catch, quietone: Views Rendered...,!3878Removed unused condition head title for views,!38582585169-10.1.x,!3818Issue #2140179: $entity->original gets stale between updates,!3742Issue #3328429: Create item list field formatter for displaying ordered and unordered lists,!3731Claro: role=button on status report items,!3668Resolve #3347842 "Deprecate the trusted",!3651Issue #3347736: Create new SDC component for Olivero (header-search),!3531Issue #3336994: StringFormatter always displays links to entity even if the user in context does not have access,!3355Issue #3209129: Scrolling problems when adding a block via layout builder,!3226Issue #2987537: Custom menu link entity type should not declare "bundle" entity key,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!3133core/modules/system/css/components/hidden.module.css,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2812Issue #3312049: [Followup] Fix Drupal.Commenting.FunctionComment.MissingReturnType returns for NULL,!2614Issue #2981326: Replace non-test usages of \Drupal::logger() with IoC injection,!2378Issue #2875033: Optimize joins and table selection in SQL entity query implementation,!2334Issue #3228209: Add hasRole() method to AccountInterface,!2062Issue #3246454: Add weekly granularity to views date sort,!1105Issue #3025039: New non translatable field on translatable content throws error,!1073issue #3191727: Focus states on mobile second level navigation items fixed,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!877Issue #2708101: Default value for link text is not saved,!844Resolve #3036010 "Updaters",!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493
Pipeline #75454 passed with warnings
Pipeline: drupal

#75477

    Pipeline: drupal

    #75470

      Pipeline: drupal

      #75462

        +1
        ......@@ -173,7 +173,7 @@ protected function findConfiguration($config_type) {
        foreach ($entity_storage->loadMultiple() as $entity) {
        $entity_id = $entity->id();
        if ($label = $entity->label()) {
        $names[$entity_id] = new TranslatableMarkup('@label (@id)', ['@label' => $label, '@id' => $entity_id]);
        $names[$entity_id] = new TranslatableMarkup('@id (@label)', ['@label' => $label, '@id' => $entity_id]);
        }
        else {
        $names[$entity_id] = $entity_id;
        ......
        ......@@ -278,7 +278,7 @@ public function testExport() {
        // Verify that the fallback date format config entity is selected when
        // specified in the URL.
        $this->drupalGet('admin/config/development/configuration/single/export/date_format/fallback');
        $option_node = $this->assertSession()->optionExists("config_name", 'Fallback date format (fallback)');
        $option_node = $this->assertSession()->optionExists("config_name", 'fallback (Fallback date format)');
        $this->assertTrue($option_node->isSelected());
        $fallback_date = \Drupal::entityTypeManager()->getStorage('date_format')->load('fallback');
        $yaml_text = $this->assertSession()->fieldExists('export')->getValue();
        ......
        ......@@ -4,6 +4,7 @@
        namespace Drupal\Tests\config\FunctionalJavascript;
        use Drupal\block_content\Entity\BlockContent;
        use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
        /**
        ......@@ -16,19 +17,71 @@ class ConfigExportTest extends WebDriverTestBase {
        /**
        * {@inheritdoc}
        */
        protected static $modules = ['config', 'system'];
        protected static $modules = ['config', 'system', 'block', 'block_content'];
        /**
        * {@inheritdoc}
        */
        protected $defaultTheme = 'stark';
        /**
        * @var string
        * A prefix string used in naming the test blocks.
        */
        protected string $blockNamePrefix = 'aaaaaa_config_export_test_block';
        /**
        * {@inheritdoc}
        */
        protected function setUp(): void {
        parent::setUp();
        $this->drupalLogin($this->drupalCreateUser([
        'administer blocks',
        'access block library',
        'administer block types',
        'administer block content',
        ]));
        // Create test blocks, so we know what the titles will be to check their order.
        foreach ([1, 2, 3, 4] as $num) {
        $block_name = $this->blockNamePrefix . $num;
        $new_block = $this->createBlockContent($block_name);
        $this->drupalPlaceBlock('block_content:' . $new_block->uuid(), [
        'id' => $block_name,
        'label' => $this->randomMachineName(),
        'theme' => $this->defaultTheme,
        'region' => 'sidebar_first',
        ]);
        }
        }
        /**
        * Creates test blocks.
        *
        * @param $title
        * Title of the block.
        *
        * @return \Drupal\block_content\Entity\BlockContent
        *
        * @throws \Drupal\Core\Entity\EntityStorageException
        */
        protected function createBlockContent($title) {
        $block_content = BlockContent::create([
        'info' => $title,
        'type' => 'basic',
        ]);
        $block_content->save();
        return $block_content;
        }
        /**
        * Tests Ajax form functionality on the config export page.
        */
        public function testAjaxOnExportPage() {
        $this->drupalLogin($this->drupalCreateUser([
        'export configuration',
        'administer blocks',
        ]));
        $page = $this->getSession()->getPage();
        ......@@ -53,6 +106,17 @@ public function testAjaxOnExportPage() {
        $page->selectFieldOption('config_type', 'Action');
        $this->assertSession()->assertWaitOnAjaxRequest();
        $this->assertSession()->fieldValueEquals('export', '');
        // Check that the 'Configuration name' list is sorted alphabetically by ID,
        // which always begins with our prefix, and not the label, which is randomized.
        $page->selectFieldOption('config_type', 'Block');
        $this->assertSession()->assertWaitOnAjaxRequest();
        $options = $page->findField('config_name')->findAll('css', 'option');
        foreach ([1, 2, 3, 4] as $num) {
        $block_name = $this->blockNamePrefix . $num;
        $this->assertStringStartsWith($block_name, $options[$num]->getText());
        $this->assertEquals($block_name, $options[$num]->getValue());
        }
        }
        }
        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