-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: make failing e2e tests to create screenshot #22536
Conversation
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.
tests/e2e/utils/CheReporter.ts
Outdated
|
||
// take page source and write to file | ||
const pageSource: string = await this.driverHelper.getDriver().getPageSource(); | ||
const pageSourceStream: WriteStream = fs.createWriteStream(pageSourceFileName); | ||
pageSourceStream.write(Buffer.from(pageSource)); | ||
pageSourceStream.end(); | ||
pageSourceStream.write(Buffer.from(pageSource), (): WriteStream => pageSourceStream.end()); |
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.
I am getting an error when I run npm run test
because of WriteStream
type:
Generating index.ts file...
utils/CheReporter.ts:156:81 - error TS2322: Type 'void' is not assignable to type 'WriteStream'.
156 screenshotStream.write(Buffer.from(screenshot, 'base64'), (): WriteStream => screenshotStream.end());
~~~~~~~~~~~~~~~~~~~~~~
utils/CheReporter.ts:161:71 - error TS2322: Type 'void' is not assignable to type 'WriteStream'.
161 pageSourceStream.write(Buffer.from(pageSource), (): WriteStream => pageSourceStream.end());
~~~~~~~~~~~~~~~~~~~~~~
Found 2 errors in the same file, starting at: utils/CheReporter.ts:156
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.
indeed
updated hasky pre-commit hook to prevent this kind of errors
9a52699
to
248a967
Compare
Signed-off-by: mdolhalo <[email protected]>
Signed-off-by: mdolhalo <[email protected]>
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.
looks good to merge
What does this PR do?
fix #22529
Screenshot/screencast of this PR
What issues does this PR fix or reference?
#22529
How to test this PR?
export USERSRORY=SmokeTest && npm run test
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.