Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
WCMS
uw_base_profile
Commits
208504f5
Commit
208504f5
authored
Oct 13, 2021
by
Eric Bremner
Committed by
Liam Morland
Oct 13, 2021
Browse files
ISTWCMS-4820: adding tests for diff headers on revisions page
parent
35fe0bca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
tests/src/Functional/UwWcmsBasicTest.php
tests/src/Functional/UwWcmsBasicTest.php
+44
-0
No files found.
tests/src/Functional/UwWcmsBasicTest.php
View file @
208504f5
...
...
@@ -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.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment