Issue #3272727 by mherchel, nod_: Nightwatch's drupalModuleInstall() doesn't handle test modules or modules w underscores in machine name

merge-requests/1789/merge
Lauri Eskola 2022-04-04 13:59:01 +03:00
parent 248d012cb1
commit c4b374ba92
No known key found for this signature in database
GPG Key ID: 382FC0F5B0DF53F8
1 changed files with 4 additions and 1 deletions

View File

@ -12,7 +12,10 @@ exports.command = function drupalInstallModule(module, callback) {
const self = this;
this.drupalLoginAsAdmin(() => {
this.drupalRelativeURL('/admin/modules')
.click(`input[data-drupal-selector="edit-modules-${module}-enable"]`)
// Filter module list to ensure that collapsable <details> elements are expanded.
.updateValue('[data-drupal-selector="edit-text"]', module)
.waitForElementVisible(`[name="modules[${module}][enable]"]`, 10000)
.click(`[name="modules[${module}][enable]"]`)
.click('input[data-drupal-selector="edit-submit"]')
// Wait for the install message to show up.
.waitForElementVisible('.system-modules', 10000);