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

merge-requests/1654/head
Alex Pott 2018-06-01 09:27:51 +02:00
parent 8f6fcbdd50
commit 8aef9a84d4
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
5 changed files with 9 additions and 9 deletions

View File

@ -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 {

View File

@ -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;

View File

@ -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}`);

View File

@ -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;

View File

@ -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();
},
**/
};