Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(browser): allow updating total specs count #3264

Merged
merged 3 commits into from Feb 13, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/browser.js
Expand Up @@ -60,6 +60,8 @@ class Browser {

if (helper.isDefined(info.log)) {
this.emitter.emit('browser_log', this, info.log, info.type)
} else if (helper.isDefined(info.total)) {
this.lastResult.total = info.total
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you guard the update to results with state EXECUTING then the tests will pass. You can add a similar test with mock state EXECUTING to verify the change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to fix the test should ignore if browser not executing I would suggest to wrap all those if-clauses with a check for state EXECUTING.
Should this.refreshNoActivityTimeout() be still called then?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should log events in any state, they could be error messages for corner cases. So remove the line in the test that checks the .dump path.

The this.refreshNoActivityTimeout() should always be called, it signals that the browser is still on the line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I've pushed my changes.

} else if (!helper.isDefined(info.dump)) {
this.emitter.emit('browser_info', this, info)
}
Expand Down