Skip to content
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

Percy on Automate: Making async create comparisons #1371

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/core/src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ export function createPercyServer(percy, port) {
}))
.route('post', '/percy/automateScreenshot', async (req, res) => {
req = percyAutomateRequestHandler(req, percy.build);
percy.upload(await new WebdriverUtils(req.body).automateScreenshot());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check #1369

I've tried this, though this doesn't make it async, since we need to have a way to make that await removed which will require some more code changes. though this version is much simplified then what it is in master.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is not full await however this unblocks PoA SDK. CLI can keep on waiting but if we add await which is master as of now that blocks the PoA. So if we have this thing then we do see speed improvements.

Copy link
Contributor

@itsjwala itsjwala Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can close this PR, as I've updated this in the linked PR. (if the changes are same)

Also can you please review other bit in that PR?

res.json(200, {
success: await (percy.upload(await new WebdriverUtils(req.body).automateScreenshot())).then(() => true)
success: true
});
})
// stops percy at the end of the current event loop
Expand Down
Loading