Unverified Commit 8aef9a84 authored by alexpott's avatar alexpott

Issue #2976593 by drpal, justafish, dawehner: Prefix Nightwatch commands with a "drupal" namespace

parent 8f6fcbdd
......@@ -14,7 +14,7 @@ import { commandAsWebserver } from '../globals';
* @return {object}
* The 'browser' object.
*/
exports.command = function installDrupal({ setupFile = '' }, callback) {
exports.command = function drupalInstall({ setupFile = '' }, callback) {
const self = this;
try {
......
......@@ -11,7 +11,7 @@
* @return {object}
* The 'browser' object.
*/
exports.command = function logAndEnd({ onlyOnError = true }, callback) {
exports.command = function drupalLogAndEnd({ onlyOnError = true }, callback) {
const self = this;
this.drupalLogConsole = true;
this.drupalLogConsoleOnlyOnError = onlyOnError;
......
......@@ -10,7 +10,7 @@
* @return {object}
* The 'browser' object.
*/
exports.command = function relativeURL(pathname, callback) {
exports.command = function drupalRelativeURL(pathname, callback) {
const self = this;
this.url(`${process.env.DRUPAL_TEST_BASE_URL}${pathname}`);
......
......@@ -9,7 +9,7 @@ import { commandAsWebserver } from '../globals';
* @return {object}
* The 'browser' object.
*/
exports.command = function uninstallDrupal(callback) {
exports.command = function drupalUninstal(callback) {
const self = this;
const prefix = self.drupalDbPrefix;
......
......@@ -2,18 +2,18 @@ module.exports = {
'@tags': ['core'],
before(browser) {
browser
.installDrupal({ setupFile: 'core/tests/Drupal/TestSite/TestSiteInstallTestScript.php' });
.drupalInstall({ setupFile: 'core/tests/Drupal/TestSite/TestSiteInstallTestScript.php' });
},
after(browser) {
browser
.uninstallDrupal();
.drupalUninstall();
},
'Test page': (browser) => {
browser
.relativeURL('/test-page')
.drupalRelativeURL('/test-page')
.waitForElementVisible('body', 1000)
.assert.containsText('body', 'Test page text')
.logAndEnd({ onlyOnError: false });
.drupalLogAndEnd({ onlyOnError: false });
},
/**
'Example failing test': (browser) => {
......@@ -25,7 +25,7 @@ module.exports = {
// Wait for some errors to build up.
.pause(5000)
.assert.containsText('h1', 'I\'m the operator with my pocket calculator')
.logAndEnd();
.drupalLogAndEnd();
},
**/
};
Markdown is supported
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