Loading core/modules/ckeditor5/tests/src/Nightwatch/Tests/ckEditor5EditorHeightTest.js +5 −12 Original line number Diff line number Diff line module.exports = { '@tags': ['core', 'ckeditor5'], before(browser) { browser.drupalInstall({ installProfile: 'minimal' }); browser .drupalInstall({ installProfile: 'minimal' }) .drupalInstallModule('ckeditor5', true) .drupalInstallModule('field_ui'); // Set fixed (desktop-ish) size to ensure a maximum viewport. browser.resizeWindow(1920, 1080); }, Loading @@ -11,17 +15,6 @@ module.exports = { 'Ensure CKEditor respects field widget row value': (browser) => { browser.drupalLoginAsAdmin(() => { browser // Enable required modules. .drupalRelativeURL('/admin/modules') .click('[name="modules[ckeditor5][enable]"]') .click('[name="modules[field_ui][enable]"]') .submitForm('input[type="submit"]') // Submit module form. .waitForElementVisible( '.system-modules-confirm-form input[value="Continue"]', ) .submitForm('input[value="Continue"]') // Confirm installation of dependencies. .waitForElementVisible('.system-modules', 10000) // Create new input format. .drupalRelativeURL('/admin/config/content/formats/add') .waitForElementVisible('[data-drupal-selector="edit-name"]') Loading core/modules/toolbar/tests/src/Nightwatch/Tests/toolbarApiTest.js +1 −2 Original line number Diff line number Diff line Loading @@ -8,8 +8,7 @@ module.exports = { before(browser) { browser .drupalInstall() .drupalInstallModule('breakpoint') .drupalInstallModule('toolbar') .drupalInstallModule('toolbar', true) .drupalCreateUser({ name: 'user', password: '123', Loading core/modules/toolbar/tests/src/Nightwatch/Tests/toolbarTest.js +1 −2 Original line number Diff line number Diff line Loading @@ -15,8 +15,7 @@ module.exports = { before(browser) { browser .drupalInstall() .drupalInstallModule('breakpoint') .drupalInstallModule('toolbar') .drupalInstallModule('toolbar', true) .drupalCreateUser({ name: 'user', password: '123', Loading core/tests/Drupal/Nightwatch/Commands/drupalInstallModule.js +17 −6 Original line number Diff line number Diff line Loading @@ -3,12 +3,14 @@ * * @param {string} module * The module machine name to enable. * @param {boolean} force * Force to install dependencies if applicable. * @param {function} callback * A callback which will be called, when the module has been enabled. * @return {object} * The drupalInstallModule command. */ exports.command = function drupalInstallModule(module, callback) { exports.command = function drupalInstallModule(module, force, callback) { const self = this; this.drupalLoginAsAdmin(() => { this.drupalRelativeURL('/admin/modules') Loading @@ -22,10 +24,19 @@ exports.command = function drupalInstallModule(module, callback) { 10000, ) .click(`form.system-modules [name="modules[${module}][enable]"]`) .submitForm('form.system-modules') .submitForm('form.system-modules'); if (force) { // Click `Continue` if applicable. this.waitForElementPresent( '#system-modules-confirm-form', 10000, false, () => self.click('input[value=Continue]'), ); } // Wait for the checkbox for the module to be disabled as a sign that the // module has been enabled. .waitForElementPresent( this.waitForElementPresent( `form.system-modules [name="modules[${module}][enable]"]:disabled`, 10000, ); Loading core/tests/Drupal/Nightwatch/Tests/ajaxExecutionOrderTest.js +1 −14 Original line number Diff line number Diff line module.exports = { '@tags': ['core', 'ajax'], before(browser) { browser.drupalInstall().drupalLoginAsAdmin(() => { browser .drupalRelativeURL('/admin/modules') .setValue('input[type="search"]', 'Ajax test') .waitForElementVisible('input[name="modules[ajax_test][enable]"]', 1000) .click('input[name="modules[ajax_test][enable]"]') .submitForm('input[type="submit"]') // Submit module form. .waitForElementVisible( '.system-modules-confirm-form input[value="Continue"]', 2000, ) .submitForm('input[value="Continue"]') // Confirm installation of dependencies. .waitForElementVisible('.system-modules', 10000); }); browser.drupalInstall().drupalInstallModule('ajax_test', true); }, after(browser) { browser.drupalUninstall(); Loading Loading
core/modules/ckeditor5/tests/src/Nightwatch/Tests/ckEditor5EditorHeightTest.js +5 −12 Original line number Diff line number Diff line module.exports = { '@tags': ['core', 'ckeditor5'], before(browser) { browser.drupalInstall({ installProfile: 'minimal' }); browser .drupalInstall({ installProfile: 'minimal' }) .drupalInstallModule('ckeditor5', true) .drupalInstallModule('field_ui'); // Set fixed (desktop-ish) size to ensure a maximum viewport. browser.resizeWindow(1920, 1080); }, Loading @@ -11,17 +15,6 @@ module.exports = { 'Ensure CKEditor respects field widget row value': (browser) => { browser.drupalLoginAsAdmin(() => { browser // Enable required modules. .drupalRelativeURL('/admin/modules') .click('[name="modules[ckeditor5][enable]"]') .click('[name="modules[field_ui][enable]"]') .submitForm('input[type="submit"]') // Submit module form. .waitForElementVisible( '.system-modules-confirm-form input[value="Continue"]', ) .submitForm('input[value="Continue"]') // Confirm installation of dependencies. .waitForElementVisible('.system-modules', 10000) // Create new input format. .drupalRelativeURL('/admin/config/content/formats/add') .waitForElementVisible('[data-drupal-selector="edit-name"]') Loading
core/modules/toolbar/tests/src/Nightwatch/Tests/toolbarApiTest.js +1 −2 Original line number Diff line number Diff line Loading @@ -8,8 +8,7 @@ module.exports = { before(browser) { browser .drupalInstall() .drupalInstallModule('breakpoint') .drupalInstallModule('toolbar') .drupalInstallModule('toolbar', true) .drupalCreateUser({ name: 'user', password: '123', Loading
core/modules/toolbar/tests/src/Nightwatch/Tests/toolbarTest.js +1 −2 Original line number Diff line number Diff line Loading @@ -15,8 +15,7 @@ module.exports = { before(browser) { browser .drupalInstall() .drupalInstallModule('breakpoint') .drupalInstallModule('toolbar') .drupalInstallModule('toolbar', true) .drupalCreateUser({ name: 'user', password: '123', Loading
core/tests/Drupal/Nightwatch/Commands/drupalInstallModule.js +17 −6 Original line number Diff line number Diff line Loading @@ -3,12 +3,14 @@ * * @param {string} module * The module machine name to enable. * @param {boolean} force * Force to install dependencies if applicable. * @param {function} callback * A callback which will be called, when the module has been enabled. * @return {object} * The drupalInstallModule command. */ exports.command = function drupalInstallModule(module, callback) { exports.command = function drupalInstallModule(module, force, callback) { const self = this; this.drupalLoginAsAdmin(() => { this.drupalRelativeURL('/admin/modules') Loading @@ -22,10 +24,19 @@ exports.command = function drupalInstallModule(module, callback) { 10000, ) .click(`form.system-modules [name="modules[${module}][enable]"]`) .submitForm('form.system-modules') .submitForm('form.system-modules'); if (force) { // Click `Continue` if applicable. this.waitForElementPresent( '#system-modules-confirm-form', 10000, false, () => self.click('input[value=Continue]'), ); } // Wait for the checkbox for the module to be disabled as a sign that the // module has been enabled. .waitForElementPresent( this.waitForElementPresent( `form.system-modules [name="modules[${module}][enable]"]:disabled`, 10000, ); Loading
core/tests/Drupal/Nightwatch/Tests/ajaxExecutionOrderTest.js +1 −14 Original line number Diff line number Diff line module.exports = { '@tags': ['core', 'ajax'], before(browser) { browser.drupalInstall().drupalLoginAsAdmin(() => { browser .drupalRelativeURL('/admin/modules') .setValue('input[type="search"]', 'Ajax test') .waitForElementVisible('input[name="modules[ajax_test][enable]"]', 1000) .click('input[name="modules[ajax_test][enable]"]') .submitForm('input[type="submit"]') // Submit module form. .waitForElementVisible( '.system-modules-confirm-form input[value="Continue"]', 2000, ) .submitForm('input[value="Continue"]') // Confirm installation of dependencies. .waitForElementVisible('.system-modules', 10000); }); browser.drupalInstall().drupalInstallModule('ajax_test', true); }, after(browser) { browser.drupalUninstall(); Loading