
| Current Path : /var/www/html/rocksensor2/web/core/tests/Drupal/Nightwatch/Commands/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor2/web/core/tests/Drupal/Nightwatch/Commands/drupalRelativeURL.js |
/**
* Concatenate a DRUPAL_TEST_BASE_URL variable and a pathname.
*
* This provides a custom command, .relativeURL()
*
* @param {string} pathname
* The relative path to append to DRUPAL_TEST_BASE_URL
* @param {function} callback
* A callback which will be called.
* @return {object}
* The 'browser' object.
*/
exports.command = function drupalRelativeURL(pathname, callback) {
const self = this;
this.url(`${process.env.DRUPAL_TEST_BASE_URL}${pathname}`);
if (typeof callback === 'function') {
callback.call(self);
}
return this;
};