-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(Progress): improve ts, doc and tc
refactor(Progress): import type fix refactor(Progress): fix code review refactor(Progress): fix code review fix(Progress): fix tc
- Loading branch information
1 parent
d8161d6
commit 020d6e2
Showing
13 changed files
with
231 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,18 @@ | ||
import React from 'react'; | ||
import Enzyme from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
import Progress from '../index'; | ||
import '../style'; | ||
import { unmount, testReact } from '../../util/__tests__/legacy/a11y/validate'; | ||
import { testReact } from '../../util/__tests__/a11y/validate'; | ||
|
||
Enzyme.configure({ adapter: new Adapter() }); | ||
|
||
/* eslint-disable no-undef, react/jsx-filename-extension */ | ||
describe('Progress A11y', () => { | ||
let wrapper; | ||
|
||
afterEach(() => { | ||
if (wrapper) { | ||
wrapper.unmount(); | ||
wrapper = null; | ||
} | ||
unmount(); | ||
}); | ||
|
||
it('should not have any violations for Line Progress', async () => { | ||
wrapper = await testReact(<Progress percent={30} />, { | ||
await testReact(<Progress percent={30} />, { | ||
incomplete: true, | ||
}); | ||
return wrapper; | ||
}); | ||
|
||
it('should not have any violations for Circle Progress', async () => { | ||
wrapper = await testReact(<Progress shape="circle" percent={30} />, { | ||
await testReact(<Progress shape="circle" percent={30} />, { | ||
incomplete: true, | ||
}); | ||
return wrapper; | ||
}); | ||
}); |
Oops, something went wrong.