Skip to content

Commit

Permalink
Merge pull request #520 from storybookjs/release/v0.20.1
Browse files Browse the repository at this point in the history
Release 0.20.1
  • Loading branch information
yannbf authored Dec 2, 2024
2 parents 8dabc7a + faeafe7 commit 7bc1bcf
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 117 deletions.
30 changes: 18 additions & 12 deletions src/csf/__snapshots__/transformCsf.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ if (!require.main) {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -121,10 +123,12 @@ if (!require.main) {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -187,10 +191,12 @@ if (!require.main) {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down
150 changes: 90 additions & 60 deletions src/playwright/transformPlaywright.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -140,10 +142,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -216,10 +220,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -292,10 +298,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -350,10 +358,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -439,10 +449,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -497,10 +509,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -555,10 +569,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -613,10 +629,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -695,10 +713,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -753,10 +773,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -831,10 +853,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -921,10 +945,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -995,10 +1021,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down Expand Up @@ -1069,10 +1097,12 @@ describe('Playwright', () => {
if (err.toString().includes('Execution context was destroyed')) {
throw err;
} else {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
if (globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {
...context,
hasFailure: true
});
}
throw err;
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/playwright/transformPlaywright.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export const testPrefixer: TestPrefixer = (context) => {
// Retry the test, possible Vite dep optimization flake
throw err;
} else {
await globalThis.__sbPostVisit(page, {...context, hasFailure: true });
if(globalThis.__sbPostVisit) {
await globalThis.__sbPostVisit(page, {...context, hasFailure: true });
}
throw err;
}
}
Expand Down
Loading

0 comments on commit 7bc1bcf

Please sign in to comment.