Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderMoskovkin committed Oct 4, 2017
1 parent 2dc0753 commit 6b90e32
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
8 changes: 2 additions & 6 deletions src/client/driver/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,8 @@ export default class Driver {
}

_addConsoleMessagesToStatus (status) {
var messages = this.consoleMessages;

if (messages) {
status.consoleMessages = messages;
this.consoleMessages = null;
}
status.consoleMessages = this.consoleMessages;
this.consoleMessages = null;
}

_sendStatus (status) {
Expand Down
3 changes: 1 addition & 2 deletions src/test-run/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,7 @@ export default class TestRun extends Session {

var currentTaskRejectedByError = pageError && this._handlePageErrorStatus(pageError);

if (driverStatus.consoleMessages)
this.consoleMessages.concat(driverStatus.consoleMessages);
this.consoleMessages.concat(driverStatus.consoleMessages);

if (!currentTaskRejectedByError && driverStatus.isCommandResult) {
if (this.currentDriverTask.command.type === COMMAND_TYPE.testDone) {
Expand Down
2 changes: 1 addition & 1 deletion test/functional/fixtures/api/es-next/roles/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('[API] t.useRole()', function () {
return runTests('./testcafe-fixtures/configuration-test.js', 'Clear configuration', TEST_WITH_IFRAME_FAILED_RUN_OPTIONS)
.catch(function (errs) {
expect(errs[0]).contains('- Error in Role initializer - A native alert dialog was invoked');
expect(errs[0]).contains('> 32 | await t.click(showAlertBtn);');
expect(errs[0]).contains('> 34 | await t.click(showAlertBtn);');
});
});

Expand Down

0 comments on commit 6b90e32

Please sign in to comment.