diff --git a/.dumi/theme/common/ComponentChangelog/ComponentChangelog.tsx b/.dumi/theme/common/ComponentChangelog/ComponentChangelog.tsx index 65cc1e78e7..d65a61187b 100644 --- a/.dumi/theme/common/ComponentChangelog/ComponentChangelog.tsx +++ b/.dumi/theme/common/ComponentChangelog/ComponentChangelog.tsx @@ -176,12 +176,13 @@ const RefLinks: React.FC<{ refs: string[] }> = ({ refs }) => { const RenderChangelogList: React.FC<{ changelogList: ChangelogInfo[] }> = ({ changelogList }) => { const elements: React.ReactNode[] = []; const { styles } = useStyle(); - for (let i = 0; i < changelogList.length; i += 1) { + const len = changelogList.length; + for (let i = 0; i < len; i += 1) { const { refs, changelog } = changelogList[i]; // Check if the next line is an image link and append it to the current line - if (i + 1 < changelogList.length && changelogList[i + 1].changelog.trim().startsWith('('img'); elements.push(
  • diff --git a/components/affix/__tests__/Affix.test.tsx b/components/affix/__tests__/Affix.test.tsx index 2bf977c87b..7a1b0cbd17 100644 --- a/components/affix/__tests__/Affix.test.tsx +++ b/components/affix/__tests__/Affix.test.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useRef } from 'react'; import Affix from '..'; -import accessibilityTest from '../../../tests/shared/accessibilityTest'; +import { accessibilityTest } from '../../../tests/shared/accessibilityTest'; import rtlTest from '../../../tests/shared/rtlTest'; import { render, triggerResize, waitFakeTimer } from '../../../tests/utils'; import Button from '../../button'; diff --git a/components/affix/__tests__/a11y.test.ts b/components/affix/__tests__/a11y.test.ts new file mode 100644 index 0000000000..f8bd0be946 --- /dev/null +++ b/components/affix/__tests__/a11y.test.ts @@ -0,0 +1,5 @@ +import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; + +describe('affix demo a11y', () => { + accessibilityDemoTest('affix'); +}); diff --git a/components/alert/__tests__/a11y.test.ts b/components/alert/__tests__/a11y.test.ts new file mode 100644 index 0000000000..563f233ed3 --- /dev/null +++ b/components/alert/__tests__/a11y.test.ts @@ -0,0 +1,5 @@ +import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; + +describe('alert demo a11y', () => { + accessibilityDemoTest('alert', { disabledRules: ['button-name'] }); +}); diff --git a/components/alert/__tests__/index.test.tsx b/components/alert/__tests__/index.test.tsx index 68e554c711..8e55d6f612 100644 --- a/components/alert/__tests__/index.test.tsx +++ b/components/alert/__tests__/index.test.tsx @@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'; import { resetWarned } from 'rc-util/lib/warning'; import Alert from '..'; -import accessibilityTest from '../../../tests/shared/accessibilityTest'; +import { accessibilityTest } from '../../../tests/shared/accessibilityTest'; import rtlTest from '../../../tests/shared/rtlTest'; import { act, render, screen, waitFakeTimer } from '../../../tests/utils'; import Button from '../../button'; diff --git a/components/anchor/__tests__/a11y.test.ts b/components/anchor/__tests__/a11y.test.ts new file mode 100644 index 0000000000..279baa3edd --- /dev/null +++ b/components/anchor/__tests__/a11y.test.ts @@ -0,0 +1,5 @@ +import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; + +describe('anchor demo a11y', () => { + accessibilityDemoTest('anchor'); +}); diff --git a/components/app/__tests__/a11y.test.ts b/components/app/__tests__/a11y.test.ts new file mode 100644 index 0000000000..a7563c3867 --- /dev/null +++ b/components/app/__tests__/a11y.test.ts @@ -0,0 +1,5 @@ +import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; + +describe('app demo a11y', () => { + accessibilityDemoTest('app'); +}); diff --git a/components/auto-complete/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/auto-complete/__tests__/__snapshots__/demo-extend.test.ts.snap index 0069607e5e..7afbfe9254 100644 --- a/components/auto-complete/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/auto-complete/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -10,26 +10,30 @@ Array [ class="ant-select-selector" > - - - - UnClearable + + + + + UnClearable +
    - - - - Customized clear icon + + + + + Customized clear icon +
    - - - - input here + + + + + input here +
    - - - - control mode + + + + + control mode +
    - - + + + -
    -