Verified Commit eb870efd authored by Dave Long's avatar Dave Long
Browse files

task: #3538654 Hide promote/sticky fields for page content type on new sites

By: acbramley
By: berdir
By: xjm
By: thejimbirch
(cherry picked from commit 387e40c5)
parent 23f25b33
Loading
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
@@ -48,13 +48,6 @@ content:
    region: content
    settings: {  }
    third_party_settings: {  }
  promote:
    type: boolean_checkbox
    weight: 3
    region: content
    settings:
      display_label: true
    third_party_settings: {  }
  status:
    type: boolean_checkbox
    weight: 7
@@ -62,13 +55,6 @@ content:
    settings:
      display_label: true
    third_party_settings: {  }
  sticky:
    type: boolean_checkbox
    weight: 4
    region: content
    settings:
      display_label: true
    third_party_settings: {  }
  title:
    type: string_textfield
    weight: 0
@@ -94,3 +80,5 @@ content:
    third_party_settings: {  }
hidden:
  layout_builder__layout: true
  promote: true
  sticky: true
+3 −15
Original line number Diff line number Diff line
@@ -34,13 +34,6 @@ content:
    region: content
    settings: {  }
    third_party_settings: {  }
  promote:
    type: boolean_checkbox
    weight: 15
    region: content
    settings:
      display_label: true
    third_party_settings: {  }
  status:
    type: boolean_checkbox
    weight: 120
@@ -48,13 +41,6 @@ content:
    settings:
      display_label: true
    third_party_settings: {  }
  sticky:
    type: boolean_checkbox
    weight: 16
    region: content
    settings:
      display_label: true
    third_party_settings: {  }
  title:
    type: string_textfield
    weight: -5
@@ -73,4 +59,6 @@ content:
      size: 60
      placeholder: ''
    third_party_settings: {  }
hidden: {  }
hidden:
  promote: true
  sticky: true
+10 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ public function testStandard(): void {

    // Test anonymous user can access 'Main navigation' block.
    $this->adminUser = $this->drupalCreateUser([
      'administer nodes',
      'administer blocks',
      'administer block content',
      'post comments',
@@ -93,6 +94,15 @@ public function testStandard(): void {
    $this->assertSession()->responseContains('Foobar');
    $this->assertSession()->responseNotContains('Then she picked out two somebodies, Sally and me');

    // Test promote and sticky fields are hidden by default for the page content
    // type and visible for the article content type.
    $this->drupalGet('node/add/page');
    $this->assertSession()->fieldNotExists('promote[value]');
    $this->assertSession()->fieldNotExists('sticky[value]');
    $this->drupalGet('node/add/article');
    $this->assertSession()->fieldExists('promote[value]');
    $this->assertSession()->fieldExists('sticky[value]');

    // Ensure block body exists.
    $this->drupalGet('block/add');
    $this->assertSession()->fieldExists('body[0][value]');
+3 −15
Original line number Diff line number Diff line
@@ -34,13 +34,6 @@ content:
    region: content
    settings: {  }
    third_party_settings: {  }
  promote:
    type: boolean_checkbox
    weight: 15
    region: content
    settings:
      display_label: true
    third_party_settings: {  }
  status:
    type: boolean_checkbox
    weight: 120
@@ -48,13 +41,6 @@ content:
    settings:
      display_label: true
    third_party_settings: {  }
  sticky:
    type: boolean_checkbox
    weight: 16
    region: content
    settings:
      display_label: true
    third_party_settings: {  }
  title:
    type: string_textfield
    weight: -5
@@ -73,4 +59,6 @@ content:
      size: 60
      placeholder: ''
    third_party_settings: {  }
hidden: {  }
hidden:
  promote: true
  sticky: true
+3 −15
Original line number Diff line number Diff line
@@ -34,13 +34,6 @@ content:
    region: content
    settings: {  }
    third_party_settings: {  }
  promote:
    type: boolean_checkbox
    weight: 15
    region: content
    settings:
      display_label: true
    third_party_settings: {  }
  status:
    type: boolean_checkbox
    weight: 120
@@ -48,13 +41,6 @@ content:
    settings:
      display_label: true
    third_party_settings: {  }
  sticky:
    type: boolean_checkbox
    weight: 16
    region: content
    settings:
      display_label: true
    third_party_settings: {  }
  title:
    type: string_textfield
    weight: -5
@@ -73,4 +59,6 @@ content:
      size: 60
      placeholder: ''
    third_party_settings: {  }
hidden: {  }
hidden:
  promote: true
  sticky: true