OLD | NEW |
(Empty) | |
| 1 Tests various scenarios for caret position when direction is auto |
| 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 |
| 5 |
| 6 PASS textarea.value is "א!" |
| 7 1. Caret is at right if text is in LTR direction |
| 8 PASS textarea.value is "א!\nhello" |
| 9 Compares lines if they are different |
| 10 PASS beforeCaretPos[1] is not afterCaretPos[1] |
| 11 New text is in LTR direction, start of caret will differ |
| 12 PASS beforeCaretPos[0] is > afterCaretPos[0] |
| 13 2. Addition of RTL text in middle of LTR text, caret moves to the left of the li
ne. |
| 14 PASS textarea.value is "א!\nhelloאא" |
| 15 RTL text added will be move caret to start of position where hello begins |
| 16 PASS beforeCaretPos[0] is afterCaretPos[0]+afterCaretPos[2] |
| 17 3. Adding LTR text after RTL should move caret towards right. |
| 18 PASS textarea.value is "א!\nhelloאאbye" |
| 19 Start position of caret is same |
| 20 PASS beforeCaretPos[0]+beforeCaretPos[2] is afterCaretPos[0] |
| 21 But end position differs |
| 22 PASS beforeCaretPos[0]+beforeCaretPos[2] is not afterCaretPos[0]+afterCaretPos[2
] |
| 23 4. Adding space, caret should move caret |
| 24 PASS textarea.value is "א!\nhelloאאbye " |
| 25 PASS afterCaretPos[0]+afterCaretPos[2] is > beforeCaretPos[0]+beforeCaretPos[2] |
| 26 PASS successfullyParsed is true |
| 27 |
| 28 TEST COMPLETE |
| 29 |
OLD | NEW |