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(client): clearContext after complete sent #3657

Merged
merged 1 commit into from Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 3 additions & 4 deletions client/karma.js
Expand Up @@ -236,13 +236,12 @@ function Karma (updater, socket, iframe, opener, navigator, location, document)
// to ensure the error from an incorrect navigate is processed.
var config = this.config
setTimeout(function () {
socket.emit('complete', result || {})
if (config.clearContext) {
navigateContextTo('about:blank')
} else {
self.updater.updateTestStatus('complete')
}

socket.emit('complete', result || {})
self.updater.updateTestStatus('complete')

if (returnUrl) {
location.href = returnUrl
}
Expand Down
7 changes: 3 additions & 4 deletions static/karma.js
Expand Up @@ -246,13 +246,12 @@ function Karma (updater, socket, iframe, opener, navigator, location, document)
// to ensure the error from an incorrect navigate is processed.
var config = this.config
setTimeout(function () {
socket.emit('complete', result || {})
if (config.clearContext) {
navigateContextTo('about:blank')
} else {
self.updater.updateTestStatus('complete')
}

socket.emit('complete', result || {})
self.updater.updateTestStatus('complete')

if (returnUrl) {
location.href = returnUrl
}
Expand Down