Skip to content

Commit

Permalink
fix: replaced warning message text
Browse files Browse the repository at this point in the history
  • Loading branch information
Bayheck committed Dec 21, 2023
1 parent f88a02d commit da797f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/notifications/warning-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
screenshotMarkNotFound: 'Unable to locate the page area in the browser window screenshot at {screenshotPath}, because the page area mark with ID {markId} is not found in the screenshot.',
screenshotsFullPageNotSupported: 'TestCafe does not support full-page screenshots in {browserAlias}.',
screenshotRewritingError: 'The file at "{screenshotPath}" already exists. It has just been rewritten with a recent screenshot. This situation can possibly cause issues. To avoid them, make sure that each screenshot has a unique path. If a test runs in multiple browsers, consider including the user agent in the screenshot path or generate a unique identifier in another way.',
screenshotPathOverridesPathPattern: 'The screenshot path "{customPath}" overrides the "{customPathPattern}" pathPattern parameter. Choose only one of the parameters to specify the screenshot path.',
screenshotPathOverridesPathPattern: 'The t.takeScreenshot method includes two conflicting parameters: "path" ({customPath}) and "pathPattern" ({customPathPattern}). TestCafe applied the "path" parameter, and ignored the "pathPattern" parameter. Remove one of the parameters to dismiss this warning.',
browserManipulationsOnRemoteBrowser: 'The screenshot and window resize functionalities are not supported in a remote browser. They can function only if the browser is running on the same machine and in the same environment as the TestCafe server.',
screenshotNotSupportedByBrowserProvider: 'The screenshot functionality is not supported by the "{providerName}" browser provider.',
videoNotSupportedByBrowser: 'Video recording is not supported by the "{browserAlias}" browser.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ describe('[API] t.takeScreenshot()', function () {
const screenshotsCheckingOptions = { baseDir: 'screenshots', forError: false, screenshotsCount: 2, customPath: screenshotPath };

expect(assertionHelper.checkScreenshotsCreated(screenshotsCheckingOptions)).eql(true);
expect(warningResult.warnings[0].message).eql('The screenshot path "screenshot-path/custom" overrides the "${TEST}/custom" pathPattern parameter. Choose only one of the parameters to specify the screenshot path.');
expect(warningResult.warnings[0].message).eql('The t.takeScreenshot method includes two conflicting parameters: "path" (screenshot-path/custom) and "pathPattern" (${TEST}/custom). TestCafe applied the "path" parameter, and ignored the "pathPattern" parameter. Remove one of the parameters to dismiss this warning.');
assertReporterWarnings('takeScreenshot');
return assertionHelper.removeScreenshotDir('screenshots');
});
Expand Down

0 comments on commit da797f4

Please sign in to comment.