annotate core/tests/Drupal/Nightwatch/Tests/exampleTest.js @ 5:12f9dff5fda9
tip
Update to Drupal core 8.7.1
author |
Chris Cannam |
date |
Thu, 09 May 2019 15:34:47 +0100 |
parents |
a9cd425dd02b |
children |
|
rev |
line source |
Chris@4
|
1 module.exports = {
|
Chris@4
|
2 '@tags': ['core'],
|
Chris@4
|
3 before(browser) {
|
Chris@4
|
4 browser.drupalInstall({
|
Chris@4
|
5 setupFile: 'core/tests/Drupal/TestSite/TestSiteInstallTestScript.php',
|
Chris@4
|
6 });
|
Chris@4
|
7 },
|
Chris@4
|
8 after(browser) {
|
Chris@4
|
9 browser.drupalUninstall();
|
Chris@4
|
10 },
|
Chris@4
|
11 'Test page': browser => {
|
Chris@4
|
12 browser
|
Chris@4
|
13 .drupalRelativeURL('/test-page')
|
Chris@4
|
14 .waitForElementVisible('body', 1000)
|
Chris@4
|
15 .assert.containsText('body', 'Test page text')
|
Chris@4
|
16 .drupalLogAndEnd({ onlyOnError: false });
|
Chris@4
|
17 },
|
Chris@5
|
18 'Page objects test page': browser => {
|
Chris@5
|
19 const testPage = browser.page.TestPage();
|
Chris@5
|
20
|
Chris@5
|
21 testPage
|
Chris@5
|
22 .drupalRelativeURL('/test-page')
|
Chris@5
|
23 .waitForElementVisible('@body', testPage.props.timeout)
|
Chris@5
|
24 .assert.containsText('@body', testPage.props.text)
|
Chris@5
|
25 .drupalLogAndEnd({ onlyOnError: false });
|
Chris@5
|
26 },
|
Chris@4
|
27 };
|