Commit graph

602 commits

Author SHA1 Message Date
Marc Durdin
0e076d5389 chore(web): declare scope for stubAndKeyboardCache members
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Also remove redundant `fetchKeyboardForStub` function, as it had only a
single use (and was not unit tested directly).

Test-bot: skip
2026-07-11 14:47:32 +02:00
Joshua Horton
21c43452e0
Merge pull request #16209 from keymanapp/fix/auto-test-cookies-and-paths
fix(web): fixes cookie unit-tests and path for OSK resources during testing
2026-07-09 00:45:43 +07:00
Joshua Horton
81b0c0b706 fix(web): fixes cookie unit-tests and path for OSK resources during testing
Build-bot: skip build:web
Test-bot: skip
2026-07-06 11:13:24 -05: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
bda4b50e2a
test(web): add e2e tests for examples from guide
Build-bot: skip build:web
Test-bot: skip
2026-06-18 19:43:12 +02:00
Eberhard Beilharz
31843db6f9
Merge pull request #16083 from keymanapp/chore/web/kmxsample
chore(web): hide KMX keyboard test page
2026-06-10 08:13:13 +02:00
Eberhard Beilharz
52e6854d9f
Merge pull request #16070 from keymanapp/chore/web/improvedoc
chore(web): more improvements to documentation

- some small updates to the text
2026-06-09 18:19:00 +02:00
Eberhard Beilharz
517e9d26f3
Merge pull request #16064 from keymanapp/chore/web/449_rm_kmw
chore(web): improve the KeymanWeb integration documentation

- replace use of `kmw` with `keyman` 
- unify pattern to load keyboards: do it in `keyman.init().then()` instead   of in the document `onload`

Part-of: keymanapp/keyman.com#449
2026-06-09 18:08:15 +02:00
Eberhard Beilharz
f697cffe58
chore(web): Merge branch 'chore/web/449_rm_kmw' into chore/web/improvedoc 2026-06-09 18:03:50 +02:00
Eberhard Beilharz
a354ba1f4a
chore(web): clean up some test headers 2026-06-09 17:39:41 +02:00
Eberhard Beilharz
52b2e676cf
chore(web): hide KMX keyboard test page
Since we removed the .kmx keyboard loading from Keyman 19 the test page
no longer works. This change hides the link to the test page.

Build-bot: skip
Test-bot: skip
2026-06-09 17:21:54 +02:00
Eberhard Beilharz
cea706c562
chore(web): address code review comments 2026-06-09 17:13:47 +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
15d020298e
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-06-08 18:14:25 +02:00
Eberhard Beilharz
f218aa92db
refactor(web): reformatting of files
Test-bot: skip
2026-06-03 19:51:44 +02:00
Eberhard Beilharz
d7439e68ac
chore(web): more improvements to documentation
- update text in `__control-by-control.html` sample
- some small updates to the text

Build-bot: skip
Test-bot: skip
2026-06-03 19:40:01 +02:00
Eberhard Beilharz
9ced04684a
chore(web): improve the KeymanWeb integration documentation
- replace use of `kmw` with `keyman`
- unify pattern to load keyboards: do it in `keyman.init().then()` instead
  of in the document `onload`

Part-of: keymanapp/keyman.com#449
Test-bot: skip
2026-06-03 19:37:08 +02:00
Marc Durdin
dec447f210 chore(web): disable .kmx baseline tests 2026-06-02 10:10:03 +02:00
Marc Durdin
29618fb943 chore: remove kmx-specific keyboard tests
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-06-02 08:26:21 +02:00
Marc Durdin
439bdce6b5
Merge branch 'chore/web-core-preflight' into chore/web-core-strip-core 2026-06-02 00:52:28 +10:00
Marc Durdin
bb66bf42f0
Merge branch 'chore/web-core-preflight' into chore/web-core-strip-core 2026-06-02 00:48:52 +10:00
Marc Durdin
fc82f28b2d chore(web): web-core preflight - strip core references
In order to maintain roughly the current build artifact size, strip out
the unfinished core integration from what we merge with preflight.

Test-bot: skip
Build-bot: release:android,ios,developer,web
2026-06-01 14:44:45 +02:00
Marc Durdin
691ee626b5
Merge branch 'chore/web-core-preflight-replay-15888-kbdDetails' into chore/web-core-preflight-replay-15899-15894_test-index
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-06-01 16:11:20 +10:00
Marc Durdin
56bdc83863
Merge branch 'chore/web-core-preflight-replay-15949-15895_WindowsTc' into chore/web-core-preflight-replay-15858-squiggles
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-06-01 16:10:55 +10:00
Eberhard Beilharz
9423ee504f chore(web): cleanup web/src/app/browser/src/test-index.ts exports
The export of `test-index.ts` were intended to be used by tests only,
but over time they contained also exports that were consumed else where,
e.g. in UI classes like `kmwuibutton.ts`. This change removes unused
exports, moves test-only classes to a `unitTestEndPoints` container and
marks test-only types with `@internal`.

Build-bot: skip build:web
Test-bot: skip
2026-05-29 12:02:19 +02:00
Eberhard Beilharz
0d266cf873 chore(web): fix red squiggles in .ts test files in vscode
VSCode shows red squiggles under things like `describe` or `it` in
.ts test files for web. This change adds the types to the `tsconfig.json`
file which fixes this problem.

Build-bot: skip build:web
Test-bot: skip
2026-05-29 11:59:04 +02:00
Eberhard Beilharz
6af638b9a8 maint(web): fix starting local dev server for e2e tests
Starting the local dev server before running the e2e tests with
`web/build.sh start` didn't work on Windows. This change now directly
calls `node` to start the server which seems to work cross-platform.

Fixes: #15895
Build-bot: skip build:web
Test-bot: skip
2026-05-29 11:57:28 +02:00
Marc Durdin
9f75726344 chore(web): Merge branch 'master' into chore/web-core-preflight 2026-05-28 13:47:36 +02:00
Eberhard Beilharz
748ad4aa01
chore(web): add filename to link text of manual web tests
This change appends the filename to the description of the tests on
the index page of the manual web tests. This makes it easier to find
the test on the rendered index page when having the directory name
of the test available.

Build-bot: skip
Test-bot: skip
2026-05-27 19:34:09 +02:00
Marc Durdin
49a2887c24
Merge branch 'epic/web-core' into feat/web/varStoresCleanup
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-18 01:29:29 +10:00
Marc Durdin
b15f9548ef chore(web): add ref to headless-resources 2026-04-17 17:26:16 +02:00
Marc Durdin
50139a0ebd refactor(web): eliminate nullable variableStoreSerializer code paths
To reduce the number of possible failure cases within KeymanWeb,
require variableStoreSerializer to always be initialized. This impacts
only unit tests in practice. There remains a unit test special case in
the variable store code itself which needs to be removed in the future.

Create a mock VariableStoreTestSerializer class so that unit tests can
run without impacting state or requiring cookies. (We should leverage
this in future tests to verify that variable stores are saved
correctly.)

Establish keyman/test/headless-resources, so that we can include shared
resources such as VariableStoreTestSerializer without creating a
dependency on either DOM or Node.
2026-04-17 15:36:11 +02:00
Eberhard Beilharz
6677c2b198
refactor(web): address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-04-17 14:49:10 +02:00
Marc Durdin
d6c2b213ee
Merge branch 'epic/web-core' into feat/web/varStoresCleanup 2026-04-17 20:44:06 +10:00
Marc Durdin
7df5b94cc2 refactor(web): simplify VariableStore type
Remove the unnecessary nested set patterns for `VariableStore` and
rename the type to `VariableStores` to match its actual use.
2026-04-17 12:08:58 +02:00
Eberhard Beilharz
115ab18d71
refactor(web): add abstract Keyboard base class
Also rename `JSKeyboardData` → `KeyboardData`.

Test-bot: skip
2026-04-16 22:18:08 +02:00
Eberhard Beilharz
bbad490154
maint(web): cleanup imports
For the files touched in this PR:

- fix the order of the imports according to style guide
- use `node:` prefix for node modules
- add header
2026-03-23 15:43:17 +01:00
Eberhard Beilharz
06f7f22cd0
maint(web): address more code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-03-23 15:43:17 +01:00
Eberhard Beilharz
745fa36d24
chore(web): Merge branch 'epic/web-core' into maint/web/jstests
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-03-20 18:03:47 +01:00
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
Marc Durdin
6c6780aa28
Merge pull request #15748 from keymanapp/auto/A19S24-merge-master-into-web-core
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
auto: A19S24 merge master into web-core 🎼
2026-03-17 15:29:10 +11:00
Marc Durdin
2c3b03c78b maint(web): use gosh to execute web server in e2e tests
Fixes: #15758
Test-bot: skip
2026-03-16 16:29:51 +01:00
Marc Durdin
70c54b0b40 chore: Merge branch 'epic/web-core' into auto/A19S24-merge-master-into-web-core
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-03-16 04:49:38 +01:00
Marc Durdin
529a49431e maint(developer): make TestCompilerCallbacks usage more consistent and simplify
Simplify usage of `TestCompilerCallbacks` by making it responsible for
the `beforeEach` and `afterEach` incantations itself. There are a couple
of more complex usages of `TestCompilerCallbacks` which have been
excluded from this change on purpose.

Renamed `testCallbacks` to `callbacks` in the one place where it was
different.

Hoist @types/node and @types/mocha because inconsistent versions of
@types/mocha were causing compiler errors with this change.

Also added a cast to `fs.readFileSync` to `Uint8Array` to eliminate
compiler warnings/errors in test files.

Fixes: #15654
Test-bot: skip
2026-03-03 16:44:06 +01:00
Eberhard Beilharz
7f1b925633
chore(web): fix buggy merge 2026-02-13 11:44:33 +01:00
Marc Durdin
ed63b70bb4
Merge branch 'epic/web-core' into auto/A19S22-merge-master-into-web-core 2026-02-13 11:08:05 +07:00
Joshua Horton
b3e045a7a8 change(web): define, utilize cleaner Web test-resource import paths
Build-bot: skip build:web
Test-bot: skip
2026-02-05 10:11:14 -06: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
Eberhard Beilharz
4992268b77
feat(web): add unit test for RTL
This change stubs out `KMXKeyboard.isRTL` and adds a unit test for RTL
with .js and  .kmx (currently skipped) keyboards. Also change some code
to use `Keyboard` instead of `JSKeyboard` and stub out additional methods.

The RTL functionality will have to be completed when the necessary
extensions to the Core API are implemented (#15482).

Fixes: #15288
Test-bot: skip
2026-01-29 14:52:55 +01:00
Eberhard Beilharz
84aedb8616
refactor(web): rename keyboard.tests.ts → jskeyboard.tests.ts
Test-bot: skip
2026-01-29 14:52:55 +01:00