Skip to content
Snippets Groups Projects
Unverified Commit 8aef9a84 authored by Alex Pott's avatar Alex Pott
Browse files

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

parent 8f6fcbdd
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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();
},
**/
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment