
| Current Path : /var/www/html/sirius-pallets/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/sirius-pallets/web/core/tests/Drupal/Nightwatch/Commands/drupalEnableTheme.js |
/**
* Enable a given theme.
*
* @param themeMachineName
* The theme machine name to enable
* @param adminTheme
* If true, install the theme as the admin theme instead of default.
* @return {object}
* The drupalEnableTheme command.
*/
exports.command = function drupalEnableTheme(
themeMachineName,
adminTheme = false,
) {
this.drupalLoginAsAdmin(() => {
const path = adminTheme
? '/admin/theme/install_admin/'
: '/admin/theme/install_default/';
this.drupalRelativeURL(`${path}${themeMachineName}`).waitForElementPresent(
'#theme-installed',
10000,
);
});
return this;
};