-
Notifications
You must be signed in to change notification settings - Fork 676
Don't create thumbnails by default #6078
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
Conversation
❌ Tests for the commit 9a95ddc have failed. See details: |
❌ Tests for the commit ab8e7a8 have failed. See details: |
❌ Tests for the commit c9b7a07 have failed. See details: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! The code is very good, but I feel that we should discuss some points:
- Disabling thumbnails by default can be considered as a breaking change. If someone has a scripts that simply counts all files in the
screenshots
directory, they will have failed tests after this change. So let's just usetrue
as the default value for thethumbnails
options. - It's awesome that you added a functional test. Could you please add some a unit test for the configuration parser:
https://github.com/DevExpress/testcafe/blob/master/test/server/configuration-test.js#L159
Hi @taiki-fw, would you like to address my suggestions? If you don't plan to maintain this PR anymore, I can assign myself or some other TestCafe developer to it. |
Hi! @AndreyBelym. Thank you for replying to the message. |
Hi! @AndreyBelym. |
@taiki-fw, thank you for addressing the suggestions. We'll review this PR and get back to you soon. |
1.16.0
|
I ran a test using the programmatic interface - everything works correctly on my side. (async () => {
const createTestCafe = require('testcafe');
const testcafe = await createTestCafe();
await testcafe
.createRunner()
.src('test.ts')
.browsers('chrome')
.screenshots({ thumbnails: false })
.run();
await testcafe.close();
})(); test.ts fixture `Fixture`;
test('test', async t => {
await t.takeScreenshot();
}); Could you please share an example where the issue is reproduced?
I created a PR with the definition update. |
Confirm that object style option works as per your example. Which i will switch to as soon as that TS Def is available :) But, comment refered to the parameter style option https://testcafe.io/documentation/402654/reference/testcafe-api/runner/screenshots which is described as: Definition of If parameter style option is still supported, this case is not working. Plus the TS Def for that style is also missing. Example: |
Yes, you are right.
The new options are only supported when using the 'object parameter' style. The TypeScript definitions are present for the supported options. In the future, we have plans to add a warning when using deprecated API. |
Purpose
Make thumbnails generation customizable when taking screenshots.
(By default, thumbnails are not generated when taking screenshots.)
Approach
-s thumbnails=true
)takeScreenshot({thumbnails: true})
)References
resolved #1550
Pre-Merge TODO