Commit graph

233 commits

Author SHA1 Message Date
Marc Durdin
cb8f9584cf fix(android): improve clarity of keyboard script error popup
* Remove irrelevant context from toast and add more context for Sentry
  report.
* Add a test keyboard with a script error that will trigger the toast on
  first keystroke.
* Rearrange common/test/keyboards/invalid to make a good place for
  compiled invalid keyboards.

Fixes: #16145
Test-bot: skip
2026-07-13 11:21:42 +02:00
Marc Durdin
cda7dc6d24 chore: remove deprecated "X-UA-Compatible" and "apple-mobile-web-app-capable" metas
For Keyman Developer Server, add app.webmanifest so that it can be saved
to the home screen; other pages should not require this.

Fixes: #16172
Test-bot: skip
2026-07-01 10:27:22 +02:00
Eberhard Beilharz
c1113ac21d
chore(web): address code review comments
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Also change a few places that I missed.
2026-06-08 19:27:12 +02:00
Eberhard Beilharz
81bae574b9 maint(web): output name of TC reporter
This change outputs the name of the TC reporter used for a test. This
will help in troubleshooting.

Build-bot: skip build:web
Test-bot: skip
2026-05-29 11:57:27 +02:00
Eberhard Beilharz
697e6972ee fix(web): further simplification
Turns out `end(result, true)` didn't actually do anything except calling
`end(result, true)` on each child, which resulted basically in a no-op.
Therefore this change removes the `force` parameter from `end()`.
2026-05-29 11:34:07 +02:00
Eberhard Beilharz
5dab671f22 fix(web): address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-05-29 11:34:06 +02:00
Eberhard Beilharz
73a0dd5318 maint(web): fix Playwright TC reporter
Previously the loop at the beginning of `end` had an infinite loop
because the child was never removed from `childrenToVisit`. This change
refactors and fixes the loop.

Build-bot: skip build:web
Test-bot: skip
2026-05-29 11:34:05 +02:00
Eberhard Beilharz
d93fc5aa7e
refactor(web): output id in console error of playwright TC reporter
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-17 10:05:33 +02:00
Eberhard Beilharz
933361a520
feat(web): add and use RTL test keyboard
Build-bot: skip:all, build:web
Test-bot: skip
2026-01-29 14:52:56 +01:00
Marc Durdin
f6b8bfb463
Merge branch 'epic/web-core' into auto/A19S20-merge-master-into-web-core 2026-01-16 08:40:12 +01:00
Eberhard Beilharz
b339a9772c
docs(common): improve documentation for .kmn test files
Build-bot: skip
Test-bot: skip
2026-01-14 18:16:57 +01:00
Eberhard Beilharz
afe6f467e3
Merge branch 'epic/web-core' into test/web/problem 2026-01-07 11:37:49 +01:00
Eberhard Beilharz
5666b4296e
Merge branch 'epic/web-core' into test/common/baseline 2026-01-06 18:54:37 +01:00
Eberhard Beilharz
65642ae2d4
Merge pull request #15341 from keymanapp/test/web/jsbaseline
test(web): add baseline tests for .js keyboards

This change adds baseline tests for .js keyboards. Several of those tests fail and so are skipped for now (#15342).

This test also includes the .js files of the baseline keyboards because they can't easily be generated on non-Windows platforms. This is similar to the .kmx files that are also included in the repo for the same reason.
2026-01-06 18:52:45 +01:00
Eberhard Beilharz
f65a752b47
test(web): address code review comments 2026-01-06 18:19:07 +01:00
Eberhard Beilharz
7447c49ede
chore(web): escape some additional values in TC service messages
See: https://www.jetbrains.com/help/teamcity/service-messages.html#Escaped+Values.

Follow-up-of: #15374
Build-bot: skip:all build:web
Test-bot: skip
2025-12-22 14:47:37 +01:00
Eberhard Beilharz
0dbbcc452e
maint(web): escape single quotes in TC service messages
This fixes a problem where TC shows an error because it can't find the
end of the service message for a failed test. Single quotes (and some
other characters) have to be escaped with `|'` inside of a message.

Build-bot: skip:all build:web
Test-bot: skip
2025-12-19 19:53:06 +01:00
Eberhard Beilharz
e6a6b75115
test(common): add new baseline test k_0202___alt.kmn
This is basically the same test as `k_0201___ralt_2.kmn` but uses
ALT instead of RALT in the rule.

Also update `k_0201___ralt_2.kmn` to be a bit more extensive.

Note: since the change in `k_0201___ralt_2.kmn` is only in the test
data, i.e. the comments, the .js and .kmx files don't change.

Related-to: #15358
Test-bot: skip
2025-12-16 16:52:13 +01:00
Eberhard Beilharz
6de40e903b
test(common): better group baseline tests
This change groups similar tests together. Also update `build.sh` to
compile .js files.

Follow-up-of: #15341
Test-bot: skip
2025-12-15 18:12:01 +01:00
Eberhard Beilharz
80c1f8864a
test(web): add baseline tests for .js keyboards
Test-bot: skip
2025-12-12 18:23:39 +01:00
Eberhard Beilharz
8cea94dd8c
test(web): add TC reporter for Playwright tests
This adds a custom reporter used when building on TeamCity that outputs
the test results in a form that TeamCity can show them nicely.

Build-bot: skip:all build:web
Test-bot: skip
2025-12-05 19:16:27 +01:00
Darcy Wong
b566bcfaf4 fix(common): Set test9469 to Keyman 14 for build warnings 2025-10-30 15:39:19 +07:00
Darcy Wong
3872f57cbf fix(common): Update references to test9469 keyboard 2025-10-30 13:03:09 +07:00
Darcy Wong
66b5aeb614 chore(common): Move test9469 keyboard to common/test/keyboards/ 2025-10-30 11:56:07 +07:00
Darcy Wong
9b426a432a fix(common): Add keyboard description 2025-10-28 15:58:59 +07:00
Darcy Wong
66bf1c5f73 fix(common): Move source files to source/ 2025-10-28 14:11:17 +07:00
Darcy Wong
2e9dfec30c fix(common): Revert kpj changes 2025-10-28 13:33:22 +07:00
Darcy Wong
5bf5a5941f chore(common): Move platformtest to common/test/keyboards 2025-10-28 07:18:49 +07:00
Darcy Wong
d0ea16b975 chore(web): Move chirality.js to common/test/resources/keyboards/ 2025-10-21 13:49:37 +07:00
Eberhard Beilharz
229bdf8270
maint(resources): nest unit tests under parent block
This adds a modified `mocha-teamcity-reporter` that allows to nest the
unit tests under the parent block.

Fixes: #14839
Test-bot: skip
2025-10-06 16:09:47 +02:00
Joshua Horton
e9a1f6c349 maint(web): converts worker-thread tests to TS 2025-08-12 15:38:53 -05:00
Marc Durdin
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
65158a0526 maint(common): rename shellHelperFunctions.sh to utils.inc.sh
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.

Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
2025-08-02 06:58:40 +10:00
Eberhard Beilharz
3b136fcec9
maint(common): consolidate functions to determine OS
- add `builder_is_windows`, `builder_is_macos` and `builder_is_linux`
  functions
- add/move `BUILDER_OS` env variable to `resources/builder.inc.sh`
- use the new functions and env variable

Fixes: #14109
Test-bot: skip
2025-07-09 18:33:09 +02:00
Darcy Wong
838861d9b6
Update common/test/keyboards/build.sh
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-06-09 21:26:58 -05:00
Darcy Wong
f02553df0b fix(common): Use zip.inc.sh for common test keyboards 2025-06-09 09:43:10 -05:00
Marc Durdin
9f15e7c7ec maint: add empty 'scripts' tag to package.json to silence warning
Also removes './' from front of gosh.js to address another npm cleanup
(from `npm pkg fix`).

Fixes: #13833
2025-05-25 06:35:28 +07:00
Eberhard Beilharz
4d81589f48
maint(common): use unique names for Keyman version variables
Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.

This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.

Test-bot: skip
2025-05-07 18:46:51 +02:00
Joshua Horton
dc450cde9e chore(web): finalize removal of side-effect KMWString implementation 2025-04-22 11:40:57 +07:00
Joshua Horton
418f3d6aec chore(web): update all Web engine uses of kmwLength, kmwCodePointToCodeUnit, kmwCodeUnitToCodePoint 2025-04-22 10:17:07 +07:00
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