Commit 6fb90658 authored by l26yan's avatar l26yan
Browse files

ISTWCMS-4812 Make sure no 'Revert to defaults' button on the layout page

parent 3bdd98b8
......@@ -282,6 +282,8 @@ 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');
// Get the node ID of the newly-created node, store in $content_nids.
$nid = $this->xpath('//a[text() = "View"]');
......@@ -363,6 +365,9 @@ class UwWcmsBasicTest extends BrowserTestBase {
'edit-field-uw-attach-page-0-target-id' => 'Title (1)',
];
$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');
// Verify that the user is redirected to the layout edit page.
$this->assertSession()->addressMatches('/^\/[a-z0-9-\/]+\/layout$/');
$this->assertSession()->pageTextContains('You are editing the layout for this Sidebar content item.');
......@@ -1735,6 +1740,8 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->submitForm($req_fields, 'Save');
// Contact successfully created when only required fields are submitted.
$this->assertSession()->statusCodeEquals(200);
// Make sure not 'Revert to defaults' button on contact layout page.
$this->assertSession()->buttonNotExists('Revert to defaults');
// Check pathauto pattern to make sure they are in same row.
$this->drupalGet('admin/config/search/path/patterns');
......@@ -1805,6 +1812,8 @@ class UwWcmsBasicTest extends BrowserTestBase {
// Submit form with required fields.
$this->submitForm($req_fields, 'Save');
// Make sure not 'Revert to defaults' button on profile layout page.
$this->assertSession()->buttonNotExists('Revert to defaults');
// Validate new content has been created with same name.
$this->assertSession()->pageTextContains('Profile ' . $profile_name . ' has been created.');
......
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