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

ISTWCMS-3002 Make sure 'Clone' tab exist for all content types except site footer

parent e4c3b1eb
......@@ -549,6 +549,15 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->drupalPostForm('node/add/' . $content_type, $edit, 'Save');
// Make sure no 'Revert to default' on the above content type layout page.
$this->assertSession()->buttonNotExists('Revert to defaults');
// Make sure 'Clone' tab not exist for site footer content type.
if ($content_type === 'uw_ct_site_footer') {
$this->assertSession()->linkNotExists('Clone');
}
// Make sure 'Clone' tab exist for web page, blog, news,
// events and catalog content types.
else {
$this->assertSession()->linkExists('Clone');
}
// Get the node ID of the newly-created node, store in $content_nids.
$nid = $this->xpath('//a[text() = "View"]');
......@@ -632,6 +641,8 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->drupalPostForm('node/add/uw_ct_sidebar', $edit, 'Save');
// Make sure no 'Revert to defaults' button on sidebar layout page.
$this->assertSession()->buttonNotExists('Revert to defaults');
// Make sure 'Clone' tab exist for sidebar content type.
$this->assertSession()->linkExists('Clone');
// Verify that the user is redirected to the layout edit page.
$this->assertSession()->addressMatches('/^\/[a-z0-9-\/]+\/layout$/');
......@@ -2180,6 +2191,8 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->submitForm($req_fields, 'Save');
// Make sure not 'Revert to defaults' button on profile layout page.
$this->assertSession()->buttonNotExists('Revert to defaults');
// Make sure 'Clone' tab found for profile content type.
$this->assertSession()->linkExists('Clone');
// Validate new content has been created with same name.
$this->assertSession()->pageTextContains('Profile ' . $profile_name . ' has been created.');
......@@ -2705,7 +2718,6 @@ class UwWcmsBasicTest extends BrowserTestBase {
$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