karma-runner / karma-runner/karma

v1.1.0 changes the focus to browsers

Open
#2,208 3 comments 1 reaction 0 assignees View on GitHub
needs: investigation windows
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

v0.13.22 and v1.0.0 keep the focus of IDE after running tests with watch mode. v1.1.1 changes the focus to browsers. So I must change the focus to IDE everytime. Its behavior is very unuseful.
### Expected behavior

Keep the focus.
### Actual behavior

Change the focus to browsers.
### Enviroment Details
- Karma version (output of `karma --version`): v1.1.0
- Relevant part of your `karma.config.js` file

``` js
module.exports = function (config) {
config.set({
basePath: '',
client: {
useIframe: false
},
frameworks: ['mocha'],
files: [
{ pattern: 'https://cdn.polyfill.io/v2/polyfill.min.js', watched: false, served: false, included: true },
{ pattern: 'node_modules/power-assert/build/power-assert.js', watched: true, served: true, included: true },
{ pattern: 'node_modules/lodash/lodash.js', watched: true, served: true, included: true },
{ pattern: 'node_modules/benchmark/benchmark.js', watched: true, served: true, included: true },
{ pattern: 'dist/*.js', watched: true, served: true, included: true }
],
exclude: [
],
espowerPreprocessor: {
options: {
emitActualCode: false,
ignoreUpstreamSourceMap: true
}
},
reporters: ['dots'],
coverageReporter: {
dir: 'coverage',
subdir: function (browser, platform) {
return browser.toLowerCase().split(' ')[0];
},
reporters: [
{ type: 'lcov' },
{ type: 'text-summary', subdir: '.', file: 'summary.txt' }
]
},
autoWatch: true,
browsers: ['Chrome'],
browserNoActivityTimeout: 100 * 1e3
});
};
```
### Steps to reproduce the behaviour
1. Clone https://github.com/falsandtru/spica
2. `npm i && npm i karma@1.1.0`
3. `gulp watch`
4. Update any source files in the src directory.
5. Karma runs incremental tests.
6. Karma changes the focus to browsers.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the supplied karma.config.js by running npm i && npm i karma@1.1.0, then gulp watch and editing a source file. Start by tracing the watch-mode incremental test run and browser launch behavior. Done means the IDE retains focus after tests rerun instead of switching to the browser.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.