Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): make exchangeArrayState be right when move #2357

Merged
merged 2 commits into from
Oct 27, 2021

Conversation

xyuanbuilds
Copy link
Contributor

@xyuanbuilds xyuanbuilds commented Oct 27, 2021

Before submitting a pull request, please make sure the following is done...

  • Ensure the pull request title and commit message follow the Commit Specific in English.
  • Fork the repo and create your branch from master or formily_next.
  • If you've added code that should be tested, add tests!
  • If you've changed APIs, update the documentation.
  • Ensure the test suite passes (npm test).
  • Make sure your code lints (npm run lint) - we've done our best to make sure these rules match our internal linting guidelines.

Please do not delete the above content


What have you changed?

#2355

@CLAassistant
Copy link

CLAassistant commented Oct 27, 2021

CLA assistant check
All committers have signed the CLA.

@@ -411,8 +411,9 @@ test('array field move api with children', async () => {
})
)
await array.move(0, 2)
expect(form.fields['array.0.name']).not.toBeUndefined()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么要删掉呢?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个单元测试是之前的 交换 的逻辑,实际应该验证的逻辑是现在的,插入后再移动

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 -> 2,原先是 0, 1, 2(name),就变成 1, 2(name), 0,所以测试应该是 0 和 2 位没有,1 位有

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

@codecov
Copy link

codecov bot commented Oct 27, 2021

Codecov Report

Merging #2357 (c61ae01) into formily_next (e878103) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##           formily_next    #2357   +/-   ##
=============================================
  Coverage         95.31%   95.31%           
=============================================
  Files               140      140           
  Lines              6120     6129    +9     
  Branches           1543     1547    +4     
=============================================
+ Hits               5833     5842    +9     
  Misses              282      282           
  Partials              5        5           
Impacted Files Coverage Δ
packages/core/src/shared/internals.ts 99.82% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e878103...c61ae01. Read the comment docs.

@janryWang janryWang merged commit a218946 into alibaba:formily_next Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants