diff --git a/tests/src/Functional/UwWcmsBasicTest.php b/tests/src/Functional/UwWcmsBasicTest.php index 686055b715a1302b26e5652c7865e6a72a5daad6..2058d048714a48f1a732de966894a6b4a2d83f55 100644 --- a/tests/src/Functional/UwWcmsBasicTest.php +++ b/tests/src/Functional/UwWcmsBasicTest.php @@ -102,6 +102,7 @@ class UwWcmsBasicTest extends BrowserTestBase { $this->bannerBlockTest(); $this->ofisTest(); $this->nodeRevisionDeleteTest(); + $this->quickNodeCloneTest(); } /** @@ -2656,4 +2657,55 @@ class UwWcmsBasicTest extends BrowserTestBase { $this->getSession()->getPage()->findField('edit-node-revision-delete-when-to-delete-time-time')->getValue('months'); } + /** + * Test for quick node clone. + */ + public function quickNodeCloneTest() { + $this->drupalLogin($this->drupalUsers['administrator']); + // Check quick node clone setting for node. + $this->drupalGet('admin/config/quick-node-clone'); + $this->assertSession()->statusCodeEquals(200); + $this->getSession()->getPage()->findField('edit-text-to-prepend-to-title')->getValue('Clone of'); + $this->assertSession()->checkboxNotChecked('edit-clone-status'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-ct-blog'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-ct-catalog-item'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-ct-contact'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-ct-event'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-ct-news-item'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-ct-profile'); + $this->assertSession()->checkboxChecked('edit-bundle-names-uw-ct-sidebar'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-ct-site-footer'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-ct-web-page'); + $this->assertSession()->checkboxChecked('edit-uw-ct-sidebar-field-uw-attach-page'); + $this->assertSession()->checkboxNotChecked('edit-uw-ct-sidebar-layout-builder-layout'); + $this->assertSession()->checkboxChecked('edit-allowed-bundles-uw-ct-blog'); + $this->assertSession()->checkboxChecked('edit-allowed-bundles-uw-ct-catalog-item'); + $this->assertSession()->checkboxChecked('edit-allowed-bundles-uw-ct-contact'); + $this->assertSession()->checkboxChecked('edit-allowed-bundles-uw-ct-event'); + $this->assertSession()->checkboxChecked('edit-allowed-bundles-uw-ct-news-item'); + $this->assertSession()->checkboxChecked('edit-allowed-bundles-uw-ct-profile'); + $this->assertSession()->checkboxChecked('edit-allowed-bundles-uw-ct-sidebar'); + $this->assertSession()->checkboxNotChecked('edit-allowed-bundles-uw-ct-site-footer'); + $this->assertSession()->checkboxChecked('edit-allowed-bundles-uw-ct-web-page'); + + // Check quick node clone setting for paragraph. + $this->drupalGet('admin/config/quick-node-clone-paragraph'); + $this->assertSession()->statusCodeEquals(200); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-para-call-to-action'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-para-fact-figure'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-para-ff'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-para-image-banner'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-para-local-video-banner'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-para-timeline'); + $this->assertSession()->checkboxNotChecked('edit-bundle-names-uw-para-vimeo-video-banner'); + $this->assertSession()->checkboxNotChecked('edit-allowed-bundles-uw-para-call-to-action'); + $this->assertSession()->checkboxNotChecked('edit-allowed-bundles-uw-para-fact-figure'); + $this->assertSession()->checkboxNotChecked('edit-allowed-bundles-uw-para-ff'); + $this->assertSession()->checkboxNotChecked('edit-allowed-bundles-uw-para-image-banner'); + $this->assertSession()->checkboxNotChecked('edit-allowed-bundles-uw-para-local-video-banner'); + $this->assertSession()->checkboxNotChecked('edit-allowed-bundles-uw-para-timeline'); + $this->assertSession()->checkboxNotChecked('edit-allowed-bundles-uw-para-vimeo-video-banner'); + + } + }