Skip to content

Commit

Permalink
#5530: fix flakey storyshot
Browse files Browse the repository at this point in the history
  • Loading branch information
twschiller committed Apr 23, 2023
1 parent cccf2da commit 1c69fe6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 37 deletions.
38 changes: 4 additions & 34 deletions src/__snapshots__/Storyshots.test.js.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions src/extensionConsole/components/IDBErrorDisplay.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,30 @@ const quotaError = new Error(
"Encountered full disk while opening backing store for indexedDB.open."
);
const connectionError = new Error("Error Opening IndexedDB");
// Hard-code a stack because the stack includes the file path on local/CI builds, so Storyshots will fail
const stack =
"ContextError: Encountered full disk while opening backing store for indexedDB.open.\nat k (chrome-extension://mpjjildhmpddojocokjkgmlkkkfjnepo/bundles/85282.bundle.js:2:35318)\n at $ (chrome-extension://mpjjildhmpddojocokjkgmlkkkfjnepo/bundles/85282.bundle.js:2:36577)\n at async L.runExtension (chrome-extension://mpjjildhmpddojocokjkgmlkkkfjnepo/bundles/contentScriptCore.bundle.js:1:220194)";

export const NormalError = Template.bind({});
NormalError.args = {
error: normalError,
errorMessage: getErrorMessage(normalError),
stack: normalError.stack,
stack,
hasError: true,
};

export const QuotaError = Template.bind({});
QuotaError.args = {
error: quotaError,
errorMessage: getErrorMessage(quotaError),
stack: quotaError.stack,
stack,
hasError: true,
};

export const ConnectionError = Template.bind({});
ConnectionError.args = {
error: connectionError,
errorMessage: getErrorMessage(connectionError),
stack: connectionError.stack,
stack,
hasError: true,
};

0 comments on commit 1c69fe6

Please sign in to comment.