Skip to content

Commit

Permalink
fix: load existing story instead of iframe.html
Browse files Browse the repository at this point in the history
  • Loading branch information
nilshah98 committed Oct 31, 2023
1 parent 83b5369 commit c76d9ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ export async function* takeStorybookSnapshots(percy, callback, { baseUrl, flags
while (snapshots.length) {
try {
// use a single page to capture story snapshots without reloading
yield* withPage(percy, previewUrl, async function*(page) {
// loading an existing story instead of just iframe.html as that triggers `storyMissing` event
// This in turn leads to promise rejection and failure
yield* withPage(percy, `${previewUrl}?id=${snapshots[0].id}&viewMode=story`, async function*(page) {
// determines when to retry page crashes
lastCount = snapshots.length;

Expand Down

0 comments on commit c76d9ec

Please sign in to comment.