-
Notifications
You must be signed in to change notification settings - Fork 45
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
feat: added defer uploads for percy-storybook #847
Conversation
src/snapshots.js
Outdated
options.domSnapshot = domSnapshot; | ||
// validate without logging to prune all other options | ||
PercyConfig.validate(options, '/snapshot/dom'); | ||
// validate without logging to prune all other options |
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.
incorrect comment
src/snapshots.js
Outdated
} else { | ||
log.debug(`Loading story: ${options.name}`); | ||
// when not dry-running and javascript is not enabled, capture the story dom | ||
yield page.eval(evalSetCurrentStory, { id, args, globals, queryParams }); | ||
/* istanbul ignore next: tested, but coverage is stripped */ | ||
let { dom, domSnapshot = dom } = yield page.snapshot(options); | ||
options.domSnapshot = domSnapshot; | ||
for (let i = 0; i < percy.config.snapshot.widths.length; i++) { |
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.
This will increase User's CI time considerably, we've seen few customers using on packed CI with multiple widhts.
we should ideally ship this behind feature, or have it as accepted bug.
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.
There are also issues with logging, we are only doing an alpha release for testing it with client tentatively and we will need to fix some things [ logging, multiple widths etc ] before we can add this to stable
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.
done, we will rely on the customer's percy config to provide defer-uploads
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.
Currently it also means that we dont have tests with defer uploads true. But okay for alpha poc
This PR is stale because it has been open for more than 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This PR was closed because it has been stalled for 28 days with no activity. |
Context-
defer-uploads
is used for capturing multiple dom snapshots, for same webpage.defer-uploads
configdefer-uploads
config, and then takes multiple snapshots for same webpage depending on number of widthsWhy test cases have changes so much ?
1.24.0
defer-uploads
config was not passed successfully from cli -> storybook due to configSchema being outdated in1.24.0
cli-command
package to1.27.4
which fixed this issue anddefer-uploads
tests started working.1.27.4
we also updated the createTestServer mock service with this particular PR./iframe.html
and/iframe.html?id=1
as different requests and responds to them differently.iframe.html
get all stories and then navigate toiframe.html?id={storyId}
which is not available anymore.iframe.html
andiframe.html?id={storyId}&viewMode=story
route.Related PRs-