chore: fix flaky test on CI #31013
Annotations
6 errors
Test:
packages/sanity/src/core/studio/Studio.test.tsx#L72
AssertionError: expected "error" to not be called at all, but actually been called 1 times
Received:
1st error call:
Array [
"Warning: An update to %s inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act",
"Root",
]
Number of calls: 1
❯ src/core/studio/Studio.test.tsx:72:31
|
Test:
packages/sanity/src/core/releases/tool/components/Table/Table.tsx#L31
AssertionError: expected "error" to not be called at all, but actually been called 15 times
Received:
1st error call:
Array [
"Warning: An update to %s inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act",
"Root",
]
2nd error call:
Array [
"Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s%s",
"undefined",
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check your code at Table.tsx:199.",
"
at TableInner (/home/runner/work/sanity/sanity/packages/sanity/src/core/releases/tool/components/Table/Table.tsx:31:3)
at TableProvider (/home/runner/work/sanity/sanity/packages/sanity/src/core/releases/tool/components/Table/TableProvider.tsx:6:40)
at TooltipDelayGroupProvider (file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:4479:13)
at TooltipDelayGroupProvider (/home/runner/work/sanity/sanity/packages/sanity/src/ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider.tsx:6:40)
at Table (/home/runner/work/sanity/sanity/packages/sanity/src/core/releases/tool/components/Table/Table.tsx:229:3)
at div
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1513:13
at div
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1513:13
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1691:13
at div
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1513:13
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3
|
Test:
packages/sanity/src/core/releases/tool/components/Table/Table.tsx#L31
AssertionError: expected "error" to not be called at all, but actually been called 29 times
Received:
1st error call:
Array [
"Warning: An update to %s inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act",
"Root",
]
2nd error call:
Array [
"Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s%s",
"undefined",
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check your code at Table.tsx:199.",
"
at TableInner (/home/runner/work/sanity/sanity/packages/sanity/src/core/releases/tool/components/Table/Table.tsx:31:3)
at TableProvider (/home/runner/work/sanity/sanity/packages/sanity/src/core/releases/tool/components/Table/TableProvider.tsx:6:40)
at TooltipDelayGroupProvider (file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:4479:13)
at TooltipDelayGroupProvider (/home/runner/work/sanity/sanity/packages/sanity/src/ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider.tsx:6:40)
at Table (/home/runner/work/sanity/sanity/packages/sanity/src/core/releases/tool/components/Table/Table.tsx:229:3)
at div
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1513:13
at div
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1513:13
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1691:13
at div
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1513:13
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3
|
Test:
packages/sanity/src/core/releases/tool/components/Table/Table.tsx#L31
AssertionError: expected "error" to not be called at all, but actually been called 43 times
Received:
1st error call:
Array [
"Warning: An update to %s inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act",
"Root",
]
2nd error call:
Array [
"Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s%s",
"undefined",
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check your code at Table.tsx:199.",
"
at TableInner (/home/runner/work/sanity/sanity/packages/sanity/src/core/releases/tool/components/Table/Table.tsx:31:3)
at TableProvider (/home/runner/work/sanity/sanity/packages/sanity/src/core/releases/tool/components/Table/TableProvider.tsx:6:40)
at TooltipDelayGroupProvider (file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:4479:13)
at TooltipDelayGroupProvider (/home/runner/work/sanity/sanity/packages/sanity/src/ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider.tsx:6:40)
at Table (/home/runner/work/sanity/sanity/packages/sanity/src/core/releases/tool/components/Table/Table.tsx:229:3)
at div
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1513:13
at div
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1513:13
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1691:13
at div
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1513:13
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3
|
Test:
packages/sanity/src/core/releases/tool/components/Table/Table.tsx#L31
AssertionError: expected "error" to not be called at all, but actually been called 57 times
Received:
1st error call:
Array [
"Warning: An update to %s inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act",
"Root",
]
2nd error call:
Array [
"Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s%s",
"undefined",
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check your code at Table.tsx:199.",
"
at TableInner (/home/runner/work/sanity/sanity/packages/sanity/src/core/releases/tool/components/Table/Table.tsx:31:3)
at TableProvider (/home/runner/work/sanity/sanity/packages/sanity/src/core/releases/tool/components/Table/TableProvider.tsx:6:40)
at TooltipDelayGroupProvider (file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:4479:13)
at TooltipDelayGroupProvider (/home/runner/work/sanity/sanity/packages/sanity/src/ui-components/tooltipDelayGroupProvider/TooltipDelayGroupProvider.tsx:6:40)
at Table (/home/runner/work/sanity/sanity/packages/sanity/src/core/releases/tool/components/Table/Table.tsx:229:3)
at div
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1513:13
at div
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1513:13
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1691:13
at div
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3yie/node_modules/@sanity/ui/dist/_chunks-es/_visual-editing.mjs:1513:13
at I (/home/runner/work/sanity/sanity/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/styled-components/dist/styled-components.cjs.js:1:22771)
at file:///home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity[email protected]_@[email protected][email protected][email protected][email protected]_5etdhb5zab2kletrytsics3
|
Test
Process completed with exit code 1.
|
Loading