Commit graph

125 commits

Author SHA1 Message Date
Marc Durdin
b05fda1c6a fix(web): selection direction and tests
Selection direction was not maintained in mutations, which could have
unexpected consequences. Added support for selection direction to input
and textarea.

The functions `getTextBeforeCaret()` and `getTextAfterCaret()` are named
somewhat incorrectly, as they actually get the text before and after the
active selection (and a collapsed zero-length selection is equivalent to
the caret). It would be worth renaming these in a future refactor.

This PR fixes the unit tests so that caret position is tested correctly
with an active selection -- the caret can be at either the start or the
end of the selection, corresponding with the direction in which the user
originally selected the text. It also fixes the assumptions around the
above named functions for `input` and `textarea` types.

Note that selection interactions are still buggy with prediction
selections; these bugs were present in 15.0.118-alpha and I will tackle
them in an upcoming commit.
2022-02-23 15:13:07 +11:00
Marc Durdin
3601ae95e4 chore(web): fix broken test 2021-11-29 10:54:05 +11:00
Marc Durdin
a6a7ed230b chore(web): disable registerstub test
See #5799.
2021-10-06 07:31:33 +11:00
jahorton
7fd62c51f4 refactor(web): centralizes element-oriented OSK display logic, polish for prior commits 2021-09-01 09:44:02 +07:00
jahorton
c2c5bb3d13 chore(web): restores branch unit tests; they were not against embedded tab 2021-08-05 12:23:23 +07:00
jahorton
4a2fec2d8f refactor(web): roots out embedded-tab code from source branch 2021-08-05 12:13:03 +07:00
jahorton
3066c1f246 chore(web): Merge branch 'master' into fix/web/final-match-group 2021-08-05 11:02:24 +07:00
Darcy Wong
20fa22dab6 fix(web): Move code to registerStub 2021-07-05 13:52:16 +07:00
Darcy Wong
d37e48c0cc fix(web): Start fixing registeruStub return 2021-07-02 16:53:23 +07:00
jahorton
2d422a8626 feat(web): unit tests 2021-01-28 14:39:20 +07:00
jahorton
b711577bee fix(web): fixes attachment test on mobile, removes migrated tests from prior commit 2020-05-01 14:55:19 +07:00
jahorton
914b105b15 feat(web/engine): bulk of engine rule checks now Node-based 2020-05-01 14:40:43 +07:00
jahorton
3e417fa4c4 feat(web/engine): basic store explosion test relocated 2020-05-01 12:32:43 +07:00
jahorton
0e8e32059d chore(web/engine): finalizes deadkey test move 2020-05-01 09:52:59 +07:00
jahorton
f06c94485e change(web): moves KMW test resources to common/core/web/tests/ 2020-05-01 08:10:32 +07:00
jahorton
b8aabfdbb4 change(web): more recorder spec renaming 2020-05-01 08:08:49 +07:00
jahorton
bdd41ec696 change(web): recorder: InputEvent -> InputEventSpec 2020-05-01 08:08:49 +07:00
jahorton
4a9f0c292b refactor(web): start of recorder's BrowserProctor 2020-05-01 08:06:55 +07:00
jahorton
5b7bf24c69 fix(web): fixes affected unit tests 2020-05-01 08:06:55 +07:00
jahorton
39e44fe4f6 change(web/engine): Converts version unit tests to headless 2020-04-29 16:17:35 +07:00
jahorton
2789d80bae change(web): converts transcription tests to headless 2020-04-29 16:17:35 +07:00
jahorton
7a04baa9a5 change(web/engine): kbdProcessor.core => core.keyboardProcessor 2020-04-06 13:17:32 +07:00
jahorton
8ecacd0476 fix(web): unit test adjustments for new namespacing
fix(web): missed resource
2020-03-26 13:00:45 +07:00
jahorton
38641559f0 test(web): Removes IE from unit-testing 2020-03-25 11:36:26 +07:00
jahorton
da9e866c7c test(web): Patches new unit tests 2020-03-24 13:14:59 +07:00
jahorton
a79b4dfa5e test(web/engine): Adds keystroke-sequence unit test 2020-03-24 12:51:00 +07:00
jahorton
44e3bb3364 test(web/engine): mildly white-box variable-store unit test 2020-03-24 12:51:00 +07:00
jahorton
fdc09c21b8 refactor(web/engine): KeyboardInterface now property of Processor 2020-03-20 20:39:53 +07:00
jahorton
efe440c659 fix(web): unit test reporting stability 2019-11-27 09:53:42 +07:00
Joshua A. Horton
dfcfa2343b feat(web): bounds check unit test 2019-10-31 11:48:00 +07:00
jahorton
74a2ad49df Adjustments based on PR reviews 2019-09-06 12:01:17 +07:00
jahorton
a88bed2a2b Adds a few simple test cases for version logic. 2019-09-05 11:45:06 +07:00
jahorton
889fd2dc41 Skipping iframe tests for now due to issues. 2019-07-22 15:44:08 +07:00
jahorton
4395706808 Increased error logging + timeout for iframe tests 2019-07-22 14:50:02 +07:00
jahorton
f15e893353 Fixes test-config.js canary test. 2019-06-03 15:03:03 +07:00
jahorton
f029bbfa0c Fixes tests without configured timeouts. 2019-06-03 14:32:50 +07:00
jahorton
36eccbcbe4 Starts addressing KMW's BrowserStack use. 2019-06-03 14:23:16 +07:00
jahorton
2f2ba2de00 Creates fat-finger 'alternates' for use in LMLayer 2019-05-24 15:20:16 +07:00
Joshua A. Horton
cff9640a25 Merge branch 'web-lmlayer-compilation' into web-text-deltas 2019-02-21 12:44:04 +07:00
Joshua A. Horton
1adc71ce98 Reworks the linkage between KMW and the LMLayer, updates target to ES6. 2019-02-21 12:30:50 +07:00
Joshua A. Horton
f2e2388143 Polishes Transcription work, adds a unit-test suite for it. 2019-02-21 10:20:35 +07:00
Joshua A. Horton
92179f3b4a A little test case tidying work. 2019-02-19 15:22:04 +07:00
Joshua A. Horton
099c23cdb1 Implements Mock-oriented unit-testing. 2019-02-19 15:19:26 +07:00
Joshua A. Horton
45db7ef566 Adds deadkey test for Mocks. 2019-02-08 01:03:00 +07:00
Joshua A. Horton
36e8aec6f0 Merge branch 'web-element-interface-deadkeys' into web-stub-output-target 2019-02-08 00:57:00 +07:00
Joshua A. Horton
0fc4a73834 Adds a deadkey recording + adjustment unit test for OutputTargets. 2019-02-08 00:39:20 +07:00
Joshua A. Horton
d6e8a8c043 Renames dom.EditableElement to text.OutputTarget. 2019-02-07 22:19:23 +07:00
Joshua A. Horton
11f93909e0 Brainstorming on mock-specific tests. 2019-02-07 02:01:56 +07:00
Joshua A. Horton
9e9180c6b7 Initial work on the Mock output-target type. 2019-02-07 01:53:54 +07:00
Joshua A. Horton
73b434473e Finishes refactoring of deadkey management, though refinement's needed. 2019-02-06 03:13:21 +07:00