diff --git a/core/modules/workspace/tests/src/Functional/ExistingContentTest.php b/core/modules/workspace/tests/src/Functional/ExistingContentTest.php index 007ef363a5..e0be9b443a 100644 --- a/core/modules/workspace/tests/src/Functional/ExistingContentTest.php +++ b/core/modules/workspace/tests/src/Functional/ExistingContentTest.php @@ -55,14 +55,15 @@ public function testExistingContent() { $session->pageTextContains('Published node'); $this->drupalPostForm(NULL, [ 'title[0][value]' => 'Published Stage node' - ], t('Save and keep published')); + ], t('Save')); $session->pageTextContains('Published stage node'); $this->drupalGet('/node/' . $unpublished_node->id() . '/edit'); $session->pageTextContains('Unpublished node'); $this->drupalPostForm(NULL, [ - 'title[0][value]' => 'Published Unpublished Stage node' - ], t('Save and publish')); + 'title[0][value]' => 'Published Unpublished Stage node', + 'status[value]' => TRUE, + ], t('Save')); $session->pageTextContains('Published Unpublished stage node'); $this->drupalGet(''); diff --git a/core/modules/workspace/tests/src/Functional/WorkspaceEntityTest.php b/core/modules/workspace/tests/src/Functional/WorkspaceEntityTest.php index 6011298b0f..ac788dc14f 100644 --- a/core/modules/workspace/tests/src/Functional/WorkspaceEntityTest.php +++ b/core/modules/workspace/tests/src/Functional/WorkspaceEntityTest.php @@ -79,8 +79,9 @@ public function testNodeEntity($initial_workspace) { $this->assertSession()->pageTextContains('Chocolate node'); $this->drupalPostForm('/node/' . $chocolate_node->id() . '/edit', [ - 'title[0][value]' => 'Mint node' - ], t('Save and publish')); + 'title[0][value]' => 'Mint node', + 'status[value]' => TRUE, + ], t('Save')); $this->drupalGet('/node'); $this->assertSession()->pageTextContains('Mint node'); diff --git a/core/modules/workspace/tests/src/Functional/WorkspaceTestUtilities.php b/core/modules/workspace/tests/src/Functional/WorkspaceTestUtilities.php index 6d5dd20dd7..fdb77e52c1 100644 --- a/core/modules/workspace/tests/src/Functional/WorkspaceTestUtilities.php +++ b/core/modules/workspace/tests/src/Functional/WorkspaceTestUtilities.php @@ -164,11 +164,11 @@ protected function createNodeThroughUI($label, $bundle, $publish = TRUE) { $page = $session->getPage(); $page->fillField('Title', $label); if ($publish) { - $button = $page->findButton(t('Save and publish')) ?: $page->findButton(t('Save')); - $button->click(); + $page->findButton(t('Save'))->click(); } else { - $page->findButton(t('Save as unpublished'))->click(); + $page->uncheckField('Published'); + $page->findButton(t('Save'))->click(); } $session->getPage()->hasContent("{$label} has been created");