Commit graph

35 commits

Author SHA1 Message Date
Eberhard Beilharz
1d9b8cc883
maint(web): address code review comments
- inline consts so that we don't have to export them for unit testing
- create `getKeymanRoot` and `getWebTestResourcesPath` helper functions
  to DRY out the code
- run `languageProcessortests.js` without coverage to prevent a failure
  creating the coverage report.
2026-03-20 15:53:41 +01:00
Eberhard Beilharz
e2b31c488b
maint(web): re-add engine .js tests
PR #15093 merged multiple engine modules into one. However, in doing so
we lost the .js tests and ran only the .ts ones. This change re-adds the
.js tests and fixes them where the code diverged since then.

Other changes:
- rename `queryEngine.ts` to `cloudQueryEngine.ts` to match the class name
- remove unused `keyboard-storage/cloud/index.ts`
- expose `CLOUD_TIMEOUT_ERR` and `CLOUD_STUB_REGISTRATION_ERR` as
  `unitTestEndpoints`
- add `test/resources` to exports in `web/package.json`. This was necessary
  because the compiled .ts test files are under `web/build` whereas the
  .js test files are under `web/src` and so the relative paths in imports
  no longer work. Also fix the imports in test files.
- apply fix from #15477 if KEYMAN_ROOT is not set

I'm not happy to put the compiled files under
`web/src/test/auto/resources/build`, but that's the only way I got it
to work. If I put the compiled files in `web/build/test/resources` it
couldn't find the types for `promise-status-async`.

Also, running the .js tests succeeded but then creating the coverage
report failed. I was not able to find the reason or a fix for that. As a
hack to work around this problem we check the number of failed tests
instead of relying on the exit code of the test.

Follows: #15093
Test-bot: skip
2026-01-26 18:05:23 +01:00
Eberhard Beilharz
d1ddff8b56
refactor(web): cleanup and clarifications
Build-bot: skip
Test-bot: skip
2025-12-09 20:15:50 +01:00
Marc Durdin
86a903dcf5 refactor(web): move sentry-manager and es-bundling to common
sentry-manager is used by Keyman Engine for Android and Keyman Engine
for iOS, but not directly by KeymanWeb, nor does it have any
dependencies on /web. So it does not make sense to keep it under /web.

es-bundling is used by sentry-manager and potentially other /common/web
tools in the future, so moving it under /common/tools makes it more
consistent in the future.

This is part of simplifying the web source tree; these changes do not
make significant build performance differences at this time.

Test-bot: skip
2025-11-06 15:28:04 +01:00
Marc Durdin
9d2c23e0d3 refactor(web): merge engine modules
In order to simplify and make the build significantly faster, as well as
reduce duplication of configuration files, we have merged most of the
engine modules into a single module, engine:
  * engine/attachment
  * engine/core-processor
  * engine/dom-utils
  * engine/element-wrappers
  * engine/events
  * engine/interfaces
  * engine/js-processor
  * engine/keyboard
  * engine/keyboard-storage
  * engine/main
  * engine/osk

A few test-specific files have been moved from engine to test, such as
nodeCloudRequester.ts and nodeKeyboardLoader.ts.
2025-11-04 19:13:17 +01: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
Marc Durdin
f3fb3ac87b maint(common): move build-utils-ci.inc.sh to ci/ci-publish.inc.sh
Removes a number of unused functions from the file, renames remaining
functions to match our builder script prefix patterns, removes unused
imports from various build scripts (e.g. Android).

Fixes: #14453
2025-08-05 12:54:56 +10:00
Joshua Horton
cb5e3035a7 chore(web): replace --ci flag with builder_is_ci_build
Fixes: #12640
2025-05-02 09:39:39 +07:00
Joshua Horton
8f04951c80 chore(web): enable web/ linting 2025-04-29 12:01:42 +07:00
Joshua Horton
cdf7b9b0b3 chore(web): cleanup shell variable no longer being referenced 2025-02-13 15:47:14 +07:00
Joshua Horton
fc3a312178
chore(web): accept cleanup suggestion
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2025-02-13 15:14:21 +07:00
Joshua Horton
b2598e76ba chore(web): fix coverage-reporting artifact
Fixes: #13195
2025-02-12 15:56:54 +07:00
Eberhard Beilharz
d4a049f614
refactor(web): move to web/src/tools/es-bundling
Addresses code review comments.
2024-09-11 09:44:58 +02:00
Eberhard Beilharz
6553bd6233
refactor(web): move common/web/es-bundlingcommon/tools/es-bundling
Fixes: #12385
2024-09-10 18:57:42 +02:00
Eberhard Beilharz
b1fb8122c2
refactor(web): move gesture-processor tests under web/src/test
`gesture-processor/src/test/auto/browser/web-test-runner.config.mjs`
run the tests on iOS and Android. However, if we enable these browsers
in `web/src/test/auto/dom/web-test-runner.config.mjs` we get failing
tests in osk, therefore these browsers are commented for now.
2024-08-26 15:29:22 +07:00
Joshua A. Horton
13476d48c8 change(web): precompile all TS-based tests 2024-06-06 15:48:58 +07:00
Joshua A. Horton
ce650c8b9c fix(web): headless tests should properly do CI-style reporting 2024-05-09 09:11:56 +07:00
Joshua A. Horton
7c507abef2 chore(web): suggestions from pr review 2024-01-23 10:44:55 +07:00
Joshua A. Horton
3c0adc38e4 chore(web): sets up app/browser test suite, ensures Web TS test sets can be isolated 2024-01-22 13:12:40 +07:00
Joshua A. Horton
d554a0046f chore(web): Merge branch 'refactor/web/common-esbundling' into change/web/build-bundler-replacement 2023-12-22 12:54:53 +07:00
Joshua A. Horton
3230612d9a change(web): final KMW-bundler script cleanup 2023-12-18 10:23:28 +07:00
Joshua A. Horton
435bfec4e5 change(web): app/browser now uses common bundler script 2023-12-15 14:13:44 +07:00
Eberhard Beilharz
c9fac1b944
chore(web): Add unit tests for pageContextAttachment 2023-12-13 19:04:59 +01:00
Marc Durdin
fa3980f598 feat(developer): deploy kmc as ES module
Deploy kmc as an ES module, forced now by top-level await that we use in
the sentry load.

Moved NodeCompilerCallbacks to same util folder as schemas are found in,
to avoid rewriting schema loading with imports in this PR. It belongs
better there than messages/ anyway.

Distributed files are now .mjs. Removed --enable-source-maps from
launchers as logging will be managed with sentry anyway.
2023-07-12 10:20:35 +07:00
Joshua A. Horton
d47433da56 chore(web): normalizes srcMap paths for cleaner Sentry reports 2023-07-06 10:51:40 +07:00
Joshua A. Horton
194139be03 chore(web): paren spacing cleanup 2023-06-15 15:49:38 +07:00
Joshua A. Horton
6e8432383b chore(web): applies bulk of review suggestions 2023-06-15 15:48:53 +07:00
Joshua A. Horton
6fd6b7daff feat(web): c8 for lower-level headless child packages 2023-06-12 11:46:07 +07:00
Joshua A. Horton
d706c5c46a feat(web): adds filesize profiling to CI build logs 2023-05-31 15:27:43 +07:00
Joshua A. Horton
10868dce97 chore(web): prepares a build/publish folder with all artifacts neatly arranged for distribution 2023-05-30 11:37:08 +07:00
Joshua A. Horton
a95a091fcc chore(web): cleans build scripts, converts to use of builder_run_action 2023-05-18 10:06:37 +07:00
Joshua A. Horton
b35cd6b9b1 chore(web): remaining review nit 2023-03-14 12:45:35 +07:00
Joshua A. Horton
5988f5b1e2 chore(web): updates new scripts to optimized form (see #8416) 2023-03-14 12:38:26 +07:00
Joshua A. Horton
fa0a77f67e chore(web): drops a couple of build-script vars 2023-02-27 09:11:13 +07:00
Joshua A. Horton
b62f220d68 chore(web): renames common compile method .sh, defines child test actions for headless stuff 2023-02-22 14:46:04 +07:00
Renamed from web/.common.sh (Browse further)