Commit graph

233 commits

Author SHA1 Message Date
Joshua A. Horton
fe585b88af chore(web): removal of 'kmw_ip' checks, references 2022-09-29 08:17:47 +07:00
Joshua A. Horton
7b498d60e1 chore(web): missed some spots 2022-09-29 08:17:46 +07:00
Joshua A. Horton
dfca726cf1 chore(web): fully removes touch-alias stuff 2022-09-29 08:17:45 +07:00
Joshua A. Horton
cf1088027b fix(common/web): mocks did not update deadkey positions on context manipulation 2022-09-22 08:57:45 +07:00
Marc Durdin
4434cdc30d chore(web): disable browserstack on non-web-specific builds
Because BrowserStack tests are unreliable, I am disabling them for any
builds that are not specifically targeting web. Two ways that the tests
can be enabled:

1. Include '(web)' in the PR title
2. Include the label test-browserstack

This only impacts builds in the CI test environment, not anything else.

See build-utils-ci.inc.sh for helper functions for accessing PR
metadata, and build-utils-ci.test.sh for unit tests for this
functionality.
2022-09-11 07:19:18 +10:00
jahorton
4d14bc6998 fix(web): fixes previously-unstable unit test 2022-08-02 16:10:04 +07:00
jahorton
8fab028632 chore(web): minor unit test issue review, tweak 2022-08-02 15:47:28 +07:00
jahorton
967e36e405 chore(web): cleaner promise flow for other tests 2022-08-02 15:42:51 +07:00
jahorton
d2a92494a5 fix(web): Promise logic for keyboard-loading tests 2022-08-02 15:36:34 +07:00
Joshua A. Horton
8f4198501d refactor(web): converts test_utils funcs to Promise use 2022-08-02 11:08:46 +07:00
Joshua A. Horton
bac2578039 chore(web): addresses PR review comment 2022-08-02 08:10:01 +07:00
Joshua A. Horton
205312c451 chore(web): timeout-adapter implementation 2022-08-01 13:06:15 +07:00
Joshua A. Horton
5a7840753f chore(web): centralizes test-start timeout config logic 2022-08-01 11:39:14 +07:00
Joshua A. Horton
405a553c06 chore(web): requireable module for common CI test-config 2022-08-01 10:54:57 +07:00
Marc Durdin
ab54c0ecb9 chore(common): more bin bashes 2022-07-25 16:03:22 +10:00
Joshua Horton
f6841333a2
Merge pull request #6557 from keymanapp/change/web/5943-ie-rooting
change(web): drops old IE-related handling code
2022-06-24 08:35:03 +07:00
Marc Durdin
0212727b98 chore: Merge branch 'master' into chore/beta-to-master-A16S4 2022-06-15 12:54:35 +10:00
jahorton
44fdec6ff5 chore(web): Merge branch 'beta' into change/web/browser-test-timeouts 2022-06-06 12:51:23 +07:00
jahorton
6e9ebb433a change(web): browser test timeout tweaks 2022-06-06 12:42:26 +07:00
Marc Durdin
f521b6ce19 chore(web): switch on additional BrowserStack reporting
Per support case with BrowserStack, am turning on deeper
reporting for BrowserStack-based testing in karma.
2022-06-05 07:53:20 +10:00
jahorton
326dc4d720 chore(web): drops IE from unit test manual-run config 2022-05-31 09:38:07 +07:00
jahorton
eb62bcb7ee chore(web): rips out document.createEvent 2022-05-31 09:11:16 +07:00
Marc Durdin
05a4c33200 chore(web): move common/core/web to common/web
Relates to #5816.

Moves folders under common/core/web to common/web:

* input-processor -> common/web/input-processor
* keyboard-processor -> common/web/keyboard-processor
* tools/recorder -> common/web/recorder
* tools/sentry-manager -> common/web/sentry-manager
* utils -> common/web/utils

Updates scripts and configuration to point to new folders.
2022-05-18 06:01:03 +10:00
Marc Durdin
4f0185dd1e chore(web): cleanup unit tests
Fixes the build for unit tests (and fixes corresponding bug in KMW
build) to eliminate Lerna dependencies.
2022-05-11 12:05:44 +10:00
Marc Durdin
21744d0ed6 chore(web): fixup test paths
Fixes some of the test paths required for core tests.
2022-05-09 13:29:41 +10:00
Marc Durdin
4d94786852 chore(web): replace lerna with npm workspaces and ts projects
Fixes #6320.

Part 1 of moving from lerna to a simpler, maintained monorepo solution,
using TypeScript Projects and NPM Workspaces.

There is more work to be done here. At this point, KeymanWeb builds and
runs without errors, but the built file is substantially different,
mostly in include order.

Using TypeScript Projects, we move away from the need to run build
scripts in various locations for almost all the Typescript modules.

TODO: Embedded versions and tests have not been verified.

TODO: developer/server is not yet verified.

TODO: developer/js (needs a rename!) is not yet verified.

TODO: Currently, the predictive-text folder needs refactoring to move
the construction of the worker wrapper out of the Predictive Text build
and into the final assembly of keymanweb.js (as it should be valid to
run it as a separate .js anyway).

TODO: Most of the `<reference>` paths need to be re-verified. Ideally
there should be no references outside the current module for any given
.ts.

TODO: The embedded vs browser vs node (headless) builds should be tidied
up for consistency so that it's obvious what depends on what. This is
currently messiest in the predictive-text folder, where the output names
diverge from the filenames and the various files are mixed in the same
folder (as evidenced by the exclusions listed in each tsconfig.json).

TODO: `npm install` should be removed from most build scripts and
instead `npm ci` (#6196) should be run only once from the top-level
folder for any given build. I've had eliminated side-effects from the
`install` action for npm, which makes it easier to reason about state.

TODO: verify_npm_setup and related functions can probably be eliminated.

TODO: most of the build scripts should be largely eliminated for web.

TODO: several ts projects use inconsistent output folders.

TODO: it may be possible to generate a .d.ts for models/types so that
we can use a consistent reference for those as well.

TODO: build.sh, tsconfig.json should always be in the module's top-level
folder, not in a subfolder such as src (e.g. see input-processor/src,
keyboard-processor/src, web/source).

TODO: resources/web-environment should be in common/web.

TODO: other js node_modules imports should be wrapped like es6-shim.

TODO: fix up the publish code for npm modules

TODO: eliminate version numbers from package.json if possible?

Whew, that's most of the stuff I noticed!
2022-04-12 21:02:33 +10:00
Marc Durdin
9f153ecc17 chore(common): cleanup sh global color variables
Some of the global color variables in shellHelperFunctions.sh were a
little dangerously named. This cleans that up and removes a couple of
redundant functions from other locations.

mac/bashHelperFunctions.sh should be removed and replaced with
references to shellHelperFunctions.sh -- but I wanted to leave that for
a separate branch.
2022-03-10 10:12:09 +11:00
Marc Durdin
7273028192 chore(web): add unit test for selection and matching rule 2022-02-25 15:06:11 +11:00
Marc Durdin
c331758ec1 chore: address review suggestions 2022-02-25 08:52:20 +11:00
Marc Durdin
b1ba2d24d7 chore: enable all test cases 2022-02-25 08:47:14 +11:00
Marc Durdin
bf2270aa69 chore(web): add smp tests for text selection 2022-02-24 15:59:16 +11:00
Marc Durdin
6ba75c54f5 chore(web): disable text selection tests on mobile 2022-02-24 14:14:15 +11:00
Marc Durdin
b58ce45ef7 fix(web): add Input text selection tests 2022-02-24 11:29:34 +11:00
Marc Durdin
9b84af8a2f fix(web): add unit tests for selection
This adds a set of unit tests for the TextArea element, initially, to
verify that selection and context are working as expected.
2022-02-24 11:25:21 +11:00
Marc Durdin
003665b6df chore(web): disable legacy edge testing
Legacy edge struggles with selection direction. We
no longer support it anyway, so disable testing.
2022-02-23 15:13:10 +11:00
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
Darcy Wong
1a791bb5f7 fix(web): Fix handling of addKeyboards args 2021-06-30 14:36:17 +07:00
Darcy Wong
5831495294 chore(web): Investigate failing unit test 2021-06-30 12:16:08 +07:00
Marc Durdin
5fac633fb6 fix(common): build script help param
When working on a new build script, I tripped over the `-?` question
mark help parameter here, as it needs to be escaped. Opted to fix all
the instances in our scripts, although AFAICT there would not have been
current bugs arising from this, as there were no conflicting one
character options lower in the case list.
2021-05-28 09:50:40 +10:00
jahorton
2d422a8626 feat(web): unit tests 2021-01-28 14:39:20 +07:00
jahorton
25277eaa0e chore(common/core/web): Merge branch 'master' into feat/common/core/web/input-processor-unit-tests 2020-11-10 08:27:15 +07:00
jahorton
905300b114 change(web): adds set -e to test.sh 2020-10-09 16:08:00 +07:00