Skip to content

Commit a6a0cd7

Browse files
AlexKamaevtiterman
andauthored
fix error message for :userProfile (#7972)
already checked by @titerman --------- Co-authored-by: titerman <[email protected]>
1 parent d26cb24 commit a6a0cd7

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/errors/runtime/templates.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/functional/fixtures/regression/gh-7925/test.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ const { expect } = require('chai');
33
const createTestCafe = require('../../../../../lib');
44
const { onlyInNativeAutomation } = require('../../../utils/skip-in');
55

6-
const EXPECTED_ERROR = 'The "userProfile" option is enabled for the following browsers: "chrome:userProfile".\n' +
7-
'The "userProfile" option is not supported in the Native Automation mode.\n' +
8-
'Use the "disable native automation" option or remove "userProfile" option to continue.';
6+
const EXPECTED_ERROR = 'Cannot initialize the test run. ' +
7+
'When TestCafe uses native automation, it can only launch browsers with an empty user profile. ' +
8+
'Disable native automation, or remove the "userProfile" suffix from the following ' +
9+
'browser aliases: "chrome:userProfile, chrome:userProfile".';
910

1011
let testcafe = null;
1112
let error = null;
@@ -33,7 +34,7 @@ function runTests (browsers) {
3334

3435
describe('[Regression](GH-7925) Browsers with "userProfile" option in Native Automation', function () {
3536
onlyInNativeAutomation('chrome:userProfile', function () {
36-
return runTests(['chrome:userProfile'])
37+
return runTests(['chrome:userProfile', 'chrome:userProfile'])
3738
.then(() => {
3839
expect(error.message).contains(EXPECTED_ERROR);
3940
});

test/server/bootstrapper-test.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,9 @@ describe('Bootstrapper', () => {
184184
throw new Error('Promise rejection expected');
185185
}
186186
catch (err) {
187-
expect(err.message).eql('The "userProfile" option is enabled for the following browsers: "chrome, edge".\n' +
188-
'The "userProfile" option is not supported in the Native Automation mode.\n' +
189-
'Use the "disable native automation" option or remove "userProfile" option to continue.'
190-
);
187+
expect(err.message).eql('Cannot initialize the test run. When TestCafe uses native automation, it can only ' +
188+
'launch browsers with an empty user profile. Disable native automation, or remove ' +
189+
'the "userProfile" suffix from the following browser aliases: "chrome, edge".');
191190
}
192191
});
193192
});

0 commit comments

Comments
 (0)