diff --git a/components/image/__tests__/image.test.ts b/components/image/__tests__/image.test.ts new file mode 100644 index 0000000000..2e0739bd81 --- /dev/null +++ b/components/image/__tests__/image.test.ts @@ -0,0 +1,5 @@ +import { imageDemoTest } from '../../../tests/shared/imageTest'; + +describe('Image image', () => { + imageDemoTest('image'); +}); diff --git a/components/message/style/index.tsx b/components/message/style/index.tsx index 4ab3477ff1..fcf59d8fdb 100644 --- a/components/message/style/index.tsx +++ b/components/message/style/index.tsx @@ -71,7 +71,6 @@ const genMessageStyle: GenerateStyle = (token) => { ...resetComponent(token), position: 'fixed', top: marginXS, - insetInlineStart: 0, // affected by ltr or rtl width: '100%', pointerEvents: 'none', zIndex: zIndexPopup, diff --git a/tests/shared/demoTest.tsx b/tests/shared/demoTest.tsx index 64e601ac68..2ea4eaf744 100644 --- a/tests/shared/demoTest.tsx +++ b/tests/shared/demoTest.tsx @@ -56,10 +56,11 @@ function baseText(doInject: boolean, component: string, options: Options = {}) { let cssinjsTest = false; files.forEach((file) => { - let testMethod = options.skip === true ? test.skip : test; - if (Array.isArray(options.skip) && options.skip.some((c) => file.includes(c))) { - testMethod = test.skip; - } + const testMethod = + options.skip === true || + (Array.isArray(options.skip) && options.skip.some((c) => file.includes(c))) + ? test.skip + : test; if (!doInject && !cssinjsTest && testMethod !== test.skip) { cssinjsTest = true; diff --git a/tests/shared/imageTest.tsx b/tests/shared/imageTest.tsx index e5f52d1f84..777a3f6044 100644 --- a/tests/shared/imageTest.tsx +++ b/tests/shared/imageTest.tsx @@ -65,14 +65,16 @@ type Options = { // eslint-disable-next-line jest/no-export export function imageDemoTest(component: string, options: Options = {}) { - let testMethod = options.skip === true ? describe.skip : describe; + let describeMethod = options.skip === true ? describe.skip : describe; const files = glob.sync(`./components/${component}/demo/*.tsx`); files.forEach((file) => { if (Array.isArray(options.skip) && options.skip.some((c) => file.includes(c))) { - testMethod = test.skip; + describeMethod = describe.skip; + } else { + describeMethod = describe; } - testMethod(`Test ${file} image`, () => { + describeMethod(`Test ${file} image`, () => { // eslint-disable-next-line global-require,import/no-dynamic-require let Demo = require(`../.${file}`).default; if (typeof Demo === 'function') {