Commit graph

193 commits

Author SHA1 Message Date
Marc Durdin
e1d8abcb5a chore(common): rebuild keyboard fixture with kmcomp 2025-03-22 06:08:16 +07:00
Eberhard Beilharz
930de0f04f
test(common): add baseline test for resetting context 2025-03-21 18:15:46 +01:00
Marc Durdin
03001bd971 chore(common): add unit test for nul and context() in context part of rule
The compiler and Core appear to be working correctly in this situation;
this test verifies Core's behaviour.

Fixes: #13299
2025-03-04 11:22:35 +01:00
Marc Durdin
2b9b8eb419 chore(core): add unit tests to validate nul with index and context
Add 4 test keyboards to validate `nul` and `if` used in conjunction with
`index` and `context` and corresponding references in core unit tests.

Add a script to rebuild baseline keyboards using a copy of kmcomp.exe
16.0.138; this is setup and tested only on Windows (YMMV on WINE, etc).

Add the 4 additional baseline test keyboards to kmcmplib unit tests for
build consistency between kmcomp 16 and kmcmplib 18 (all pass).

Note: two of the new Core tests currently fail. This is expected, see
issue #13304.

Fixes: #13303
2025-02-21 13:06:29 +07:00
Eberhard Beilharz
b9aa9ccd8c
refactor(web): move predictive-textworker-main
This moves `common/predictive-text/` →
`web/src/engine/predictive-text/worker-main/`.

This also moves `common/test/predictive-text/` →
`web/src/test/manual/predictive-text/`. Note though that this testing
tool is still broken.

Fixes: #12134
2024-08-15 12:26:50 +02:00
Joshua A. Horton
ae02e7d110 change(web): perform suggestion dupe-detection based on applied string, not displayAs 2024-06-28 14:13:08 +07:00
Joshua A. Horton
34986503c9 fix(web): patch-up automated tests that utilize dummy models
The dummy model never set a prediction's probability on the suggestion, so it never emitted p, lexical-p, or correction-p values before this branch's changes.
2024-06-27 09:49:09 +07:00
Joshua A. Horton
8841dd9ee2 chore(web): define common timeout variable for automated testing
Fixes: #11499
2024-06-20 11:43:11 +07:00
Joshua A. Horton
e527317d3a fix(common): remove subpackge entries for older TS version 2024-06-10 09:14:03 +07:00
Joshua A. Horton
7f9b1f0c35 chore(web): converts common/predictive-text browser-based tests 2024-05-15 14:31:36 +07:00
Joshua A. Horton
9942d5691c chore(web): removes unused flowId stuff, old resolved TODO 2024-05-15 14:09:42 +07:00
Joshua A. Horton
8e8906ddc4 fix(web): TC-reporter had mismatch in name for file suite start and end; also adds polish 2024-05-10 09:17:23 +07:00
Joshua A. Horton
b9b86e760c feat(web): adds 'stability reporter', exposing error reports when a test-runner launcher fails 2024-05-09 09:18:01 +07:00
Joshua A. Horton
b83a16d0ac chore(web): extra TC-reporter polish 2024-05-09 09:18:00 +07:00
Joshua A. Horton
53e84ff0ad feat(web): better cause-of-failure reporting; notes if spec'd test-files never ran 2024-05-09 09:14:01 +07:00
Joshua A. Horton
c765d3217b chore(web): figured out how to disambiguate browser configs 2024-05-09 09:13:13 +07:00
Joshua A. Horton
eecacc94e9 chore(web): initial TC-style string-escaping implementation 2024-05-09 09:12:47 +07:00
Joshua A. Horton
33dcfe31bf feat(web): prototype TC-reporter for @web/test-runner 2024-05-09 09:12:42 +07:00
Joshua A. Horton
7b9bff10b2 chore(web): Merge branch 'chore/web/chai-update' into chore/web/consistent-npm-types 2024-05-09 08:10:12 +07:00
Joshua A. Horton
5c43042589 chore(web): update Safari BrowserStack target as stopgap measure 2024-05-08 16:08:11 +07:00
Joshua A. Horton
01d0019d86 chore(web): removes package.json references to old @npm/types versions 2024-05-07 14:38:41 +07:00
Joshua A. Horton
398b9e0ae2 chore(common): drops package-specific 'chai', '@types/chai' versions
chore(web): missed leaving these out of the rebase
2024-05-07 14:35:09 +07:00
Marc Durdin
cd8121ef65 chore(common): builder scripts now use /resources/build/builder.inc.sh
Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).

This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
2024-05-02 15:54:31 +07:00
Marc Durdin
0f390d47cc chore(common): maintenance on build scripts - cd
Fixes #11324.

* Always `cd "$THIS_SCRIPT_PATH"`
* Remove unnecessary `cd` from all build.sh
* Remove unnecessary `set -eu` from all build.sh (and `# set -x`)
* Replace old build-utils.sh incantation in a few build.sh scripts
2024-05-02 15:54:29 +07:00
Marc Durdin
457275e46f fix(developer): ensure fatal errors report message or made non-fatal
Fixes #10678.

Some messages have been reduced to ERROR instead of FATAL, as they are
not internal compiler errors.

Where fatal messages are raised, the message will now be reported
through correctly to Sentry.
2024-02-20 11:10:39 +07:00
Joshua A. Horton
64ce55854a feat(web): adds sil_ipa, armenian keyboards for KMW testing 2024-01-23 14:02:12 +07:00
rc-swag
1cb288144c chore(core): Merge branch 'master' into fix/core/clear-core-context-invalidate 2023-12-19 09:13:43 +10:00
rc-swag
2f737981f7 fix(core): add expected_context to keyboard unit tests
The unit tests needed to be updated to handle the cases
where the context is invalidated by a keystroke. However, they
still need to be able to verify the final string the application
should recieve. To do this a expected context token has been added
to the unit test format.
2023-12-15 11:20:08 +10:00
rc-swag
8e20fcf6b2 fix(core): missed checking in baseline.kpj 2023-12-14 14:20:05 +10:00
rc-swag
437f938368 fix(core): fix baseline test cases k_000 and k_0008
Test k_000___null_keyboard has been updated as the [RALT K_B] should
cause the context to be reset.

Test k_008___vkey_input__ctrl_alt_2_ has been updated as the [LCTRL LALT
K_B] does not match a keyboard rule the context is deemed invalid and should be
reset.

It could be a consideration to modify the text_store object to better
reflect the state of a applications context however this would mean
we would need two expected results one for the application and one
for the context
2023-12-14 12:25:32 +10:00
rc-swag
4a511bde1e fix(core): clear core context on invalidate cache 2023-12-12 23:49:04 +10:00
Joshua A. Horton
3c4e5d6ebd chore(web): Merge branch 'master' into chore/web/conflict-fix 2023-12-01 14:16:18 +07:00
Eberhard Beilharz
f56033f537 chore(web): Add TAB output to test keyboard 2023-11-23 18:02:36 +01:00
Eberhard Beilharz
ef8b9888c8 chore(web): Update touch layout 2023-11-23 17:22:24 +01:00
Eberhard Beilharz
fb7c19fee4
chore(core): Add test keyboard for text selection tests
Part of #9073.
2023-11-23 10:51:59 +01:00
Marc Durdin
33da132eab
Merge branch 'feature-gestures' into chore/merge-master-into-feature-gestures 2023-11-13 09:44:55 +11:00
Eberhard Beilharz
46cdd07e22
fix(linux): Fix baseline tests
Change the test to use characters in the context that don't appear in
the keyboard.
2023-11-08 12:13:56 +07:00
Eberhard Beilharz
fde460ecea chore(core): Recompile keyboard with kmcomp 2023-11-07 05:02:30 +01:00
Eberhard Beilharz
eb64ca4d01
chore(core): Fix test keyboard 2023-11-07 08:29:45 +07:00
Eberhard Beilharz
09843634bb
chore(web): Address code review comments 2023-11-06 17:28:25 +07:00
Eberhard Beilharz
4851c547a9
chore(core): Enhance core test 2023-11-06 15:57:07 +07:00
Eberhard Beilharz
abe6cee202
chore(web): Additional tests for backspace
Addresses code review comments.
2023-11-06 15:51:29 +07:00
Eberhard Beilharz
2e71ec9e70
chore(web): Add failing test for deadkey bug
Also adds a similar testcase to the baseline keyboard tests.
2023-11-06 13:28:49 +07:00
Eberhard Beilharz
fa0b3e839e
refactor(core): Remove obsolete comments
Since things are working in both cases it seems that the problem got
fixed and the comments are obsolete.
2023-11-06 12:20:56 +07:00
Marc Durdin
236b1ebc54 fix(developer): enable and update unit tests
Several unit tests were not running as they were not referenced in
developer/src/test/auto/Makefile. This meant that some tests were
outdated:

* two keyboard fixtures needed recompiling with kmcomp in order to match
* some interfaces had changed slightly, necessitating updates to
  corresponding unit tests.
2023-10-31 13:50:34 +07:00
Joshua A. Horton
23ac3cc673 chore(common): Merge branch 'feature-gestures' into chore/merge-master-into-feature-gestures 2023-10-12 08:14:30 +07:00
Marc Durdin
a093507a4c chore(developer): remove .keyboard_info sources
Fixes #9551.

Removes various .keyboard_info files from test fixtures and also removes
generation of .keyboard_info source files from kmconvert, alongside now-
redundant tests (cvt.dpr).
2023-09-25 12:19:26 +07:00
Marc Durdin
7f3d7ce17d chore: fixup targets for build_index 2023-09-16 15:46:37 +07:00
Marc Durdin
f140b5e18d chore: convert keyboards build.sh to builder script 2023-09-16 15:41:07 +07:00
Marc Durdin
454448bc63 chore: use kmc instead of kmcomp to build test keyboards 2023-09-16 15:24:46 +07:00