diff --git a/docs/tests.md b/docs/tests.md index 556c4db2648..b0977007853 100644 --- a/docs/tests.md +++ b/docs/tests.md @@ -34,6 +34,21 @@ You can run a subset of tests which match a `description` or `it` with: Where `expression` could be for example `^tabs` to match all tests which start with the word tabs. This works for all testing modes (test, unittest). +## Things you should know + +### Background image for new tab page is disabled by default + +To speed-up tests, background image for new tab page is disabled by default. If your new webdriver test needs the background to be visible you'll need to enable this setting again, for example: + +```js +it('shows new tab page background', function * () { + yield this.app.client + // enable setting again: + .changeSetting('tabs.show-dashboard-images', true) + // keep testing... +}) +``` + ## Best practices for writing tests - If you do anything that opens a new tab, you have to validate that the tab has opened before trying to switch to diff --git a/js/entry.js b/js/entry.js index 51d9fa4adb3..fd63b1c2eb0 100644 --- a/js/entry.js +++ b/js/entry.js @@ -26,6 +26,7 @@ const webFrame = electron.webFrame const windowStore = require('./stores/windowStore') const appStoreRenderer = require('./stores/appStoreRenderer') const windowActions = require('./actions/windowActions') +const appActions = require('./actions/appActions') const messages = require('./constants/messages') const Immutable = require('immutable') const patch = require('immutablepatch') @@ -46,6 +47,7 @@ if (process.env.NODE_ENV === 'test') { windowActions, windowStore } + appActions.changeSetting('tabs.show-dashboard-images', false) } ipc.on(messages.APP_STATE_CHANGE, (e, action) => {