Verified Commit 64e10dfa authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3365229 by narendraR, lauriii, bnjmnm, Chris Matthews, yoroy, ckrina,...

Issue #3365229 by narendraR, lauriii, bnjmnm, Chris Matthews, yoroy, ckrina, hooroomoo: Add separate 'Save' and 'Save and add fields' to Add Content, Comment, Media and Block Type Forms
parent b5bff583
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -86,7 +86,11 @@ public function testBlockContentTypeCreation() {
      'id' => 'foo',
      'label' => 'title for foo',
    ];
    $this->submitForm($edit, 'Save');
    $this->submitForm($edit, 'Save and manage fields');

    // Asserts that form submit redirects to the expected manage fields page.
    $this->assertSession()->addressEquals('admin/structure/block-content/manage/' . $edit['id'] . '/fields');

    $block_type = BlockContentType::load('foo');
    $this->assertInstanceOf(BlockContentType::class, $block_type);

+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ protected function setUp(): void {
    // Set "Article" content type to use multilingual support.
    $edit = ['language_configuration[language_alterable]' => TRUE];
    $this->drupalGet('admin/structure/types/manage/article');
    $this->submitForm($edit, 'Save content type');
    $this->submitForm($edit, 'Save');

    // Enable content language negotiation UI.
    \Drupal::state()->set('language_test.content_language_type', TRUE);
+5 −1
Original line number Diff line number Diff line
@@ -76,7 +76,11 @@ public function testCommentTypeCreation() {
      'target_entity_type_id' => 'node',
    ];
    $this->drupalGet('admin/structure/comment/types/add');
    $this->submitForm($edit, 'Save');
    $this->submitForm($edit, 'Save and manage fields');

    // Asserts that form submit redirects to the expected manage fields page.
    $this->assertSession()->addressEquals('admin/structure/comment/manage/' . $edit['id'] . '/fields');

    $comment_type = CommentType::load('foo');
    $this->assertInstanceOf(CommentType::class, $comment_type);

+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ public function testEnforceRevisionsEntityFormAlter() {
    // Ensure checkboxes in the 'workflow' section can be altered, even when
    // 'revision' is enforced and disabled.
    $this->drupalGet('admin/structure/types/manage/moderated');
    $this->submitForm(['options[promote]' => TRUE], 'Save content type');
    $this->submitForm(['options[promote]' => TRUE], 'Save');
    $this->drupalGet('admin/structure/types/manage/moderated');
    $this->assertSession()->checkboxChecked('options[promote]');
  }
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ protected function createContentTypeFromUi($content_type_name, $content_type_id,
      'name' => $content_type_name,
      'type' => $content_type_id,
    ];
    $this->submitForm($edit, 'Save content type');
    $this->submitForm($edit, 'Save');

    // Check the content type has been set to create new revisions.
    $this->assertTrue(NodeType::load($content_type_id)->shouldCreateNewRevision());
Loading