Skip to content

Commit

Permalink
test: fix upload test case
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Apr 26, 2022
1 parent 42525ff commit 2a79f85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Expand Up @@ -301,8 +301,8 @@ exports[`Upload List should be uploading when upload a file 2`] = `
class="ant-upload-list ant-upload-list-text"
>
<div
class="ant-upload-list-text-container ant-upload-animate-appear ant-upload-animate-appear-start ant-upload-animate"
style="height: 0px; opacity: 0;"
class="ant-upload-list-text-container ant-upload-animate-appear ant-upload-animate-appear-active ant-upload-animate"
style="height: 0px; opacity: 1;"
>
<div
class="ant-upload-list-item ant-upload-list-item-done ant-upload-list-item-list-type-text"
Expand Down
10 changes: 7 additions & 3 deletions components/upload/__tests__/uploadlist.test.js
Expand Up @@ -160,9 +160,13 @@ describe('Upload List', () => {
expect(wrapper.render()).toMatchSnapshot();
}
if (file.status === 'done') {
expect(wrapper.render()).toMatchSnapshot();
wrapper.unmount();
done();
(async function run() {
await sleep(200);
wrapper.update();
expect(wrapper.render()).toMatchSnapshot();
wrapper.unmount();
done();
})();
}

latestFileList = eventFileList;
Expand Down

0 comments on commit 2a79f85

Please sign in to comment.