Problem/Motivation
Since TestSiteInstallCommand supports install profile and langcode parameters, it would be a good idea to make them customizable in the drupalInstall command as well.
Proposed resolution
Add instappProfile and langode to drupalInstall.js.
Remaining tasks
Provide a patch.
User interface changes
Nothing.
API changes
New params in drupalInstall command.
Release notes snippet
@todo
module.exports = {
'@tags': ['core'],
before(browser) {
browser.drupalInstall({
setupFile: 'core/tests/Drupal/TestSite/TestSiteInstallTestScript.php',
installProfile: 'standard',
langcode: 'de',
});
},
after(browser) {
browser.drupalUninstall();
},
'Test page': browser => {
browser
.drupalRelativeURL('/test-page')
.waitForElementVisible('body', 1000)
.assert.containsText('body', 'Test page text')
.drupalLogAndEnd({ onlyOnError: false });
},
};
Comments
Comment #2
huzookaComment #3
dawehnerI'm wondering whether you could write some test which uses a different language and install profile to ensure this actually works.
Comment #5
finnsky commentedHello!
Added french langcode installation test
Comment #6
andypostComment #7
finnsky commentedReworked with demo_umami install profile test case.
Comment #9
nevergoneDrupal 8.8.0?
Comment #10
lauriiiComment #11
lauriii@alwaysworking said on Slack that he'd review this issue.
Comment #12
mogtofu33 commentedUpdated patch for 8.8.x.
Comment #13
andrewmacpherson commentedWe have a use for this in the Umami demo profile. There are some JS menu buttons that we want to write keyboard functional tests for, but we need nightwatch to install the Umami demo profile.
Comment #14
GrandmaGlassesRopeManComment #16
mogtofu33 commentedUpdated patch for 8.9.x
Comment #17
alexpottThis looks great.
The usage is simple and the test coverage is there. +1
Comment #18
lauriiiNit pick 🔬👁: Could we move
nightwatch_testingas the default value on the function declaration?Comment #19
alexpottSure we can do that. Removes a condition which is really nice. Also fixed...
As these changes are very minimal setting back to rtbc.
Comment #22
lauriiiCommitted b496f2d and pushed to 9.0.x and 8.9.x. Thanks!