Commit 208504f5 authored by Eric Bremner's avatar Eric Bremner Committed by Liam Morland
Browse files

ISTWCMS-4820: adding tests for diff headers on revisions page

parent 35fe0bca
......@@ -79,6 +79,7 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->layoutSectionConfigurationFormTest();
$this->webformTests();
$this->createContent();
$this->diffHeaders();
$this->taxonomies();
$this->catalogTest();
$this->schemaTest();
......@@ -753,6 +754,49 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->assertSession()->statusCodeEquals(403);
}
/**
* Tests for diff headers.
*/
private function diffHeaders() {
// Login to site.
$this->drupalLogin($this->drupalUsers['uw_role_site_manager']);
// Go to add node of web page.
$this->drupalGet('node/add/uw_ct_web_page');
$this->assertSession()->statusCodeEquals(200);
// Fields to fill in for web page.
$edit = [
'edit-title-0-value' => $this->randomString(),
'edit-field-uw-meta-description-0-value' => $this->randomString(),
'edit-moderation-state-0-state' => 'published',
];
// Submit the add node form.
$this->submitForm($edit, 'Save');
// Click on the edit link to change a value of the node.
$this->clickLink('Edit');
// Change the values.
$edit = [
'edit-title-0-value' => $this->randomString(),
'edit-field-uw-meta-description-0-value' => $this->randomString(),
'edit-moderation-state-0-state' => 'published',
];
// Submit to node edit form.
$this->submitForm($edit, 'Save');
// Click on the Revisions link.
$this->clickLink('Revisions');
// Ensure that the SELECT REVISION headers are on the page.
$this->assertSession()->pageTextContains('SELECT REVISION A');
$this->assertSession()->pageTextContains('SELECT REVISION B');
}
/**
* Test taxonomies.
*/
......
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