Opened 10 years ago
Closed 10 years ago
#12309 closed Bug (fixed)
Test test_getDocumentPosition in core.dom.element.element in unstable
Reported by: | Artur Delura | Owned by: | Artur Delura |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.4.5 |
Component: | General | Version: | |
Keywords: | Cc: |
Description
http://tests.ckeditor.dev:1030/tests/core/dom/element/element#test_getDocumentPosition
On IE11 I've something like this: Expected: 350 (number) Actual: 351 (number)
We should add some acceptance error range.
Change History (11)
comment:1 Changed 10 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 10 years ago by
Owner: | set to Artur Delura |
---|---|
Status: | confirmed → assigned |
comment:3 Changed 10 years ago by
Status: | assigned → review |
---|
comment:4 Changed 10 years ago by
Status: | review → assigned |
---|
comment:5 Changed 10 years ago by
Status: | assigned → review |
---|
Improved tests - changes in the same branch.
comment:6 Changed 10 years ago by
Status: | review → review_failed |
---|
- The assertion function does not check type of expected value.
- Instead of swapping min with max better throw an error because if min>max, then it means that the code using assertion is wrong. Swapping leads to a silent error.
- You used the assertion function in the wrong way - you mixed expected value with a range in element/element.js
comment:7 Changed 10 years ago by
Status: | review_failed → assigned |
---|
comment:9 follow-up: 10 Changed 10 years ago by
Status: | review → review_failed |
---|
- tests/utils/assert/isNumberInRange.js - wrong file name
- https://github.com/cksource/ckeditor-dev/commit/c150c3ad8a54145299e8b5722ce50f0287a2f9f0#diff-29fe8c260592a68a6c2e2a5f2dea1f0fL10 - what's this? :P
- https://github.com/cksource/ckeditor-dev/commit/c150c3ad8a54145299e8b5722ce50f0287a2f9f0#diff-43a3fceb3bf7ceb96aabbe46fd4a9101R93 - you can use assert.isNumber and you won't need to throw errors manually.
comment:10 Changed 10 years ago by
Status: | review_failed → review |
---|
Replying to Reinmar:
- tests/utils/assert/isNumberInRange.js - wrong file name
Done.
Removed, to keep consistency with closest environment.
- https://github.com/cksource/ckeditor-dev/commit/c150c3ad8a54145299e8b5722ce50f0287a2f9f0#diff-43a3fceb3bf7ceb96aabbe46fd4a9101R93 - you can use assert.isNumber and you won't need to throw errors manually.
Yeach, less code :)
Changes in the same branch:t/12309.
comment:11 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | review → closed |
Merged to master with git:b60bb80.
I added one commit which improved tests and made min==max invalid (because in such case assert.areEqual/areSame should be used).
Changes in branch:t/12309