Merge actions test data struct and some of the data for the actions API
unit tests. actions_update_app_context_nfu.tests.cpp data has not been
merged because the expected results are different, as it does not do
normalization, unlike actions_get_api and actions_normalize.
Merging of that data could be done, but would require adding extra
fields to each test result, which would make the data considerably
harder to read! Thus I have left it alone for now, just merged the
struct, which is still a win.
Fixes: #15913
* Rename citems and eliminate shadowed class member
* Cleanup is_identical_context and related helper functions and make
consistent name and signature, to assert_identical_context.
* Use clearer variable names for expected and actual values.
Relates-to: #15913
1. Rename various shorthand variables
2. Split simple tests into separate Google Test cases (have not tackled
the more complex tests which have loops and/or setup)
3. Remove redundant logging from simple tests
Relates-to: #15913
Move all Keyman Core header API documentation to javadoc-style so that
we can get inline documentation and simplify the readability of the
header files.
Update api-header-extractor to support minimal javadoc formatting of the
comments.
Test-bot: skip
Move all Keyman Core header API documentation to javadoc-style so that
we can get inline documentation and simplify the readability of the
header files.
Update api-header-extractor to support minimal javadoc formatting of the
comments.
Test-bot: skip
chore(web): cleanup `web/src/app/browser/src/test-index.ts` exports
The exports of `test-index.ts` were intended to be used by tests only, but over time they contained also exports that were consumed elsewhere, 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`.
Fixes: #15894
refactor(web): move common code to abstract `KeyboardProcessor` base class
This change moves code that was implemented in both `JSKeyboardProcessor` and `CoreKeyboardProcessor` to the `AbstractKeyboardProcessor`. This got renamed from `KeyboardProcessor` and is now a generic abstract class.
Also removed some of the band-aids in `CoreKeyboardInterface` and `JSKeyboardInterface` that I put in before: Typescript allows implementations to have a slightly different method signature and still matches the interface as long as the used types are derived from the ones specified in the interface.
Follows: #15870
The convention is to use the `.d.ts` extension for typescript types, and
that's what is used elsewhere in the `package.json` file. This change
fixes the two instances that had `.d.js`.
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
feat(web): clarify return type of `KeymanEngine.getKeyboardDetails` 🧼🎼
`getKeyboardDetails` can return `null` if `stub` is falsy. This PR changes the return type accordingly to improve type safety.
Follows: #15889
feat(web): implement getting keyboard details for KMX keyboards 🧼🎼
Turns out that we can use `KeyboardStub` for both JS and KMX keyboards.
Follows: #15888
This change moves code that was implemented in both `JSKeyboardProcessor`
and `CoreKeyboardProcessor` to the `AbstractKeyboardProcessor`. This got
renamed from `KeyboardProcessor` and is now a generic abstract class.
Also removed some of the band-aids in `CoreKeyboardInterface` and
`JSKeyboardInterface` that I put in before: Typescript allows
implementations to have a slightly different method signature and still
matches the interface as long as the used types are derived from the ones
specified in the interface.
Follows: #15870
Build-bot: skip build:web
Test-bot: skip
This change will ignore keyboards where `getKeyboardDetails` returns
`null` and will not push them to the `detailsForAllKeyboards` array.
Addresses a code review comment.
refactor(web): use `KeyboardDetails` type 🧼🎼
PR #15856 introduced the `KeyboardDetails` type but overlooked the use in one file.
Follow-up-of: #15856
Follows: #15887
feat(web): get list of store names from stores defined in core
This implements `CoreKeyboardInterface.loadSerializedOptions` by getting the list of all variable store names from Core and then trying to load these.
Also change `VariableStoreSerializer.loadStore` signature so that it can return `undefined`. This allows to return only those options from `loadSerializedOptions` that have a non-default value, i.e. were serialized before.
Follow-up-of: #15470
Consolidate test frameworks and cleanup, including:
* all tests use Google Test
* reorganize folders, esp. kmnkbd -> api
* move all api tests into api folder
* replace references to test_assert or test_color with gtest equivalents
* leverage gtest patterns to remove boilerplate code
* dramatically simplify meson.build files and localize variables
* move shared helper code into helpers/ folder
* make test names unique and add gtest protocol for reporting back to
teamcity
Fixes:
* CLDR test keyboards had invalid unicodeset escapes (needs to be raised
upstream also) - was not failing tests because files were not loading
but returning success
Test-bot: skip
`getKeyboardDetails` can return `null` if `stub` is falsy. This PR changes
the return type accordingly to improve type safety.
Follows: #15889
Build-bot: skip build:web
Test-bot: skip
PR #15856 introduced the `KeyboardDetails` type but overlooked the use in
one file.
Follow-up-of: #15856
Follows: #15887
Build-bot: skip build:web
Test-bot: skip
Having a file header that mentions an old version can be confusing, so
this change updates the file headers for the UI files with the current
header.
Build-bot: skip
Test-bot: skip