Commit e4c3b1eb authored by Lily Yan's avatar Lily Yan Committed by Kevin Paxman
Browse files

ISTWCMS-3002 Add quick node clone test function

parent bfe92c35
......@@ -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');
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment