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

Issue #3439835 by pooja_sharma, thebumik, FeyP, smustgrave, vensires: Fix...

Issue #3439835 by pooja_sharma, thebumik, FeyP, smustgrave, vensires: Fix Field UI tests that rely on UID1's super user behavior

(cherry picked from commit 139bf729)
parent a3e710d7
No related branches found
No related tags found
10 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,...,!6502Draft: Resolve #2938524 "Plach testing issue",!38582585169-10.1.x,!3226Issue #2987537: Custom menu link entity type should not declare "bundle" entity key
Pipeline #235986 passed with warnings
Pipeline: drupal

#235992

    ......@@ -25,14 +25,6 @@ class EntityReferenceXSSTest extends BrowserTestBase {
    */
    protected static $modules = ['node'];
    /**
    * {@inheritdoc}
    *
    * @todo Remove and fix test to not rely on super user.
    * @see https://www.drupal.org/project/drupal/issues/3437620
    */
    protected bool $usesSuperUserAccessPolicy = TRUE;
    /**
    * {@inheritdoc}
    */
    ......@@ -68,7 +60,9 @@ public function testEntityReferenceXSS(): void {
    ->save();
    // Create a node and reference the node with markup in the title.
    $this->drupalLogin($this->rootUser);
    $this->drupalLogin($this->drupalCreateUser([
    'create article content',
    ]));
    $this->drupalGet('node/add/article');
    $this->assertSession()->assertEscaped($referenced_node->getTitle());
    $this->assertSession()->assertEscaped($node_type_two->label());
    ......
    ......@@ -22,14 +22,6 @@ class FieldDefaultValueCallbackTest extends BrowserTestBase {
    */
    protected static $modules = ['node', 'field_test', 'field_ui'];
    /**
    * {@inheritdoc}
    *
    * @todo Remove and fix test to not rely on super user.
    * @see https://www.drupal.org/project/drupal/issues/3437620
    */
    protected bool $usesSuperUserAccessPolicy = TRUE;
    /**
    * {@inheritdoc}
    */
    ......@@ -58,6 +50,10 @@ protected function setUp(): void {
    ]);
    }
    $this->drupalLogin($this->drupalCreateUser([
    'administer node fields',
    ]));
    }
    public function testDefaultValueCallbackForm(): void {
    ......@@ -76,8 +72,6 @@ public function testDefaultValueCallbackForm(): void {
    ]);
    $field_config->save();
    $this->drupalLogin($this->rootUser);
    // Check that the default field form is visible when no callback is set.
    $this->drupalGet('/admin/structure/types/manage/article/fields/node.article.field_test');
    $this->assertSession()->fieldValueEquals('default_value_input[field_test][0][value]', '');
    ......
    ......@@ -22,14 +22,6 @@ class FieldUIRouteTest extends BrowserTestBase {
    */
    protected static $modules = ['block', 'entity_test', 'field_ui'];
    /**
    * {@inheritdoc}
    *
    * @todo Remove and fix test to not rely on super user.
    * @see https://www.drupal.org/project/drupal/issues/3437620
    */
    protected bool $usesSuperUserAccessPolicy = TRUE;
    /**
    * {@inheritdoc}
    */
    ......@@ -41,7 +33,6 @@ class FieldUIRouteTest extends BrowserTestBase {
    protected function setUp(): void {
    parent::setUp();
    $this->drupalLogin($this->rootUser);
    $this->drupalPlaceBlock('local_tasks_block');
    }
    ......@@ -49,6 +40,13 @@ protected function setUp(): void {
    * Ensures that entity types with bundles do not break following entity types.
    */
    public function testFieldUIRoutes(): void {
    $this->drupalLogin($this->drupalCreateUser([
    'administer account settings',
    'administer entity_test_no_id fields',
    'administer user fields',
    'administer user form display',
    'administer user display',
    ]));
    $this->drupalGet('entity_test_no_id/structure/entity_test/fields');
    $this->assertSession()->pageTextContains('No fields are present yet.');
    ......
    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