By nod_ on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
9.3.x
Introduced in version:
9.3.7
Issue links:
Description:
To facilitate enabling modules during nightwatch tests a new drupalModuleInstall command has been added.
Usage:
The command accepts a single string as parameter which is the machine name of the module to enable. This command does not handle enabling a module with dependencies (dependencies should be enabled first, also via a call to drupalModuleInstall). The command does not handle enabling experimental or obsolete modules. More generally, any module enabling that requires a confirmation step is not supported by this command.
// core/modules/toolbar/tests/src/Nightwatch/Tests/toolbarTest.js
module.exports = {
'@tags': ['core'],
before(browser) {
browser
.drupalInstall()
// The breakpoint module is a dependency of toolbar, enable it first.
.drupalInstallModule('breakpoint')
.drupalInstallModule('toolbar');
},
};
Impacts:
Module developers