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

Issue #3463548 by catch, smustgrave: Consolidate methods on FormElementsLabelsTest

(cherry picked from commit f82e35fb)
parent e1ba327c
No related branches found
No related tags found
18 merge requests!10663Issue #3495778: Update phpdoc in FileSaveHtaccessLoggingTest,!10451Issue #3472458 by watergate, smustgrave: CKEditor 5 show blocks label is not translated,!103032838547 Fix punctuation rules for inline label suffix colon with CSS only,!10150Issue #3467294 by quietone, nod_, smustgrave, catch, longwave: Change string...,!10130Resolve #3480321 "Second level menu",!9936Issue #3483087: Check the module:// prefix in the translation server path and replace it with the actual module path,!9933Issue #3394728 by ankondrat4: Undefined array key "#prefix" and deprecated function: explode() in Drupal\file\Element\ManagedFile::uploadAjaxCallback(),!9914Issue #3451136 by quietone, gapple, ghost of drupal past: Improve...,!9882Draft: Issue #3481777 In bulk_form ensure the triggering element is the bulk_form button,!9839Issue #3445469 by pooja_sharma, smustgrave: Add additional test coverage for...,!9815Issue #3480025: There is no way to remove entity cache items,!9757Issue #3478869 Add "All" or overview links to parent links,!9752Issue #3439910 by pooja_sharma, vensires: Fix Toolbar tests that rely on UID1's super user behavior,!9749Issue #3439910 by pooja_sharma, vensires: Fix Toolbar tests that rely on UID1's super user behavior,!9678Issue #3465132 by catch, Spokje, nod_: Show test run time by class in run-tests.sh output,!9578Issue #3304746 by scott_euser, casey, smustgrave: BigPipe cannot handle (GET)...,!9449Issue #3344041: Allow textarea widgets to be used for text (formatted) fields,!8945🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥...
Pipeline #234964 passed with warnings
Pipeline: drupal

#234989

    Pipeline: drupal

    #234981

      Pipeline: drupal

      #234970

        ...@@ -26,6 +26,16 @@ class ElementsLabelsTest extends BrowserTestBase { ...@@ -26,6 +26,16 @@ class ElementsLabelsTest extends BrowserTestBase {
        */ */
        protected $defaultTheme = 'stark'; protected $defaultTheme = 'stark';
        /**
        * Tests form elements.
        */
        public function testFormElements(): void {
        $this->testFormLabels();
        $this->testTitleEscaping();
        $this->testFormDescriptions();
        $this->testFormsInThemeLessEnvironments();
        }
        /** /**
        * Tests form element rendering. * Tests form element rendering.
        * *
        ...@@ -35,7 +45,7 @@ class ElementsLabelsTest extends BrowserTestBase { ...@@ -35,7 +45,7 @@ class ElementsLabelsTest extends BrowserTestBase {
        * - Prefix and suffix render element placement. * - Prefix and suffix render element placement.
        * - Form element title attributes. * - Form element title attributes.
        */ */
        public function testFormLabels(): void { protected function testFormLabels(): void {
        $this->drupalGet('form_test/form-labels'); $this->drupalGet('form_test/form-labels');
        // Check that the checkbox/radio processing is not interfering with // Check that the checkbox/radio processing is not interfering with
        ...@@ -104,7 +114,7 @@ public function testFormLabels(): void { ...@@ -104,7 +114,7 @@ public function testFormLabels(): void {
        /** /**
        * Tests XSS-protection of element labels. * Tests XSS-protection of element labels.
        */ */
        public function testTitleEscaping(): void { protected function testTitleEscaping(): void {
        $this->drupalGet('form_test/form-labels'); $this->drupalGet('form_test/form-labels');
        foreach (FormTestLabelForm::$typesWithTitle as $type) { foreach (FormTestLabelForm::$typesWithTitle as $type) {
        $this->assertSession()->responseContains("$type alert('XSS') is XSS filtered!"); $this->assertSession()->responseContains("$type alert('XSS') is XSS filtered!");
        ...@@ -115,7 +125,7 @@ public function testTitleEscaping(): void { ...@@ -115,7 +125,7 @@ public function testTitleEscaping(): void {
        /** /**
        * Tests different display options for form element descriptions. * Tests different display options for form element descriptions.
        */ */
        public function testFormDescriptions(): void { protected function testFormDescriptions(): void {
        $this->drupalGet('form_test/form-descriptions'); $this->drupalGet('form_test/form-descriptions');
        // Check #description placement with #description_display='after'. // Check #description placement with #description_display='after'.
        ...@@ -142,7 +152,7 @@ public function testFormDescriptions(): void { ...@@ -142,7 +152,7 @@ public function testFormDescriptions(): void {
        /** /**
        * Tests forms in theme-less environments. * Tests forms in theme-less environments.
        */ */
        public function testFormsInThemeLessEnvironments(): void { protected function testFormsInThemeLessEnvironments(): void {
        $form = $this->getFormWithLimitedProperties(); $form = $this->getFormWithLimitedProperties();
        $render_service = $this->container->get('renderer'); $render_service = $this->container->get('renderer');
        // This should not throw any notices. // This should not throw any notices.
        ......
        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