From 2764a85a70f681b464cd22d1a0748416bb2c6115 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Tue, 7 Feb 2023 13:06:46 +0700 Subject: [PATCH 1/5] refactor(common/web): minor build-bundler tweak post-rebase --- common/web/keyboard-processor/build-bundler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/web/keyboard-processor/build-bundler.js b/common/web/keyboard-processor/build-bundler.js index f58dbab703..a5ce55af2b 100644 --- a/common/web/keyboard-processor/build-bundler.js +++ b/common/web/keyboard-processor/build-bundler.js @@ -12,8 +12,7 @@ import { spawn } from 'child_process'; const commonConfig = { bundle: true, sourcemap: true, - tsconfig: 'tsconfig.json', - target: 'es5', + format: "esm", // Sets 'common/web' as a root folder for module resolution; // this allows the keyman-version and utils imports to resolve. // @@ -36,6 +35,7 @@ esbuild.buildSync({ outfile: 'build/lib/index.cjs', bundle: true, sourcemap: true, + external: ['fs', 'vm'], format: "cjs", ...commonConfig }); From 1a0d60e1b13a425f2bb3785f2a0b770030c2987d Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Tue, 7 Feb 2023 13:49:08 +0700 Subject: [PATCH 2/5] chore(common/web): more import path fun --- common/web/keyboard-processor/build-bundler.js | 1 - 1 file changed, 1 deletion(-) diff --git a/common/web/keyboard-processor/build-bundler.js b/common/web/keyboard-processor/build-bundler.js index a5ce55af2b..5973588f9b 100644 --- a/common/web/keyboard-processor/build-bundler.js +++ b/common/web/keyboard-processor/build-bundler.js @@ -35,7 +35,6 @@ esbuild.buildSync({ outfile: 'build/lib/index.cjs', bundle: true, sourcemap: true, - external: ['fs', 'vm'], format: "cjs", ...commonConfig }); From 09c598ca8f5033bad8489f5fb4d9580454bfa159 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Thu, 16 Feb 2023 10:28:00 +0700 Subject: [PATCH 3/5] refactor(web): extracts common config settings, creates corresponding esmodule --- web/src/engine/build.sh | 20 ++++-- .../engine/configuration/src/configuration.ts | 41 +++++++++++ .../configuration/src/optionSpec.interface.ts | 57 +++++++++++++++ .../configuration/src/pathConfiguration.ts | 71 ++++++++++++++++++ web/src/engine/configuration/tsconfig.json | 24 +++++++ .../device-detect/{ => src}/kmwdevice.ts | 25 ++++--- .../{ => src}/utils/styleConstants.ts | 0 web/src/engine/device-detect/tsconfig.json | 3 +- web/src/engine/main/kmwbase.ts | 3 + .../configuration/pathConfiguration.js | 72 +++++++++++++++++++ 10 files changed, 302 insertions(+), 14 deletions(-) create mode 100644 web/src/engine/configuration/src/configuration.ts create mode 100644 web/src/engine/configuration/src/optionSpec.interface.ts create mode 100644 web/src/engine/configuration/src/pathConfiguration.ts create mode 100644 web/src/engine/configuration/tsconfig.json rename web/src/engine/device-detect/{ => src}/kmwdevice.ts (90%) rename web/src/engine/device-detect/{ => src}/utils/styleConstants.ts (100%) create mode 100644 web/src/test/auto/headless/configuration/pathConfiguration.js diff --git a/web/src/engine/build.sh b/web/src/engine/build.sh index 69bdc5a205..af4f1608e5 100755 --- a/web/src/engine/build.sh +++ b/web/src/engine/build.sh @@ -24,6 +24,7 @@ cd "$THIS_SCRIPT_PATH" # Definition of global compile constants MAIN=engine/main # Covers all engine code, including submodules like those listed below. +CONFIGURATION=engine/configuration DEVICEDETECT=engine/device-detect DOMUTILS=engine/dom-utils KEYBOARDCACHE=engine/keyboard-cache @@ -90,6 +91,7 @@ builder_describe "Builds engine modules for Keyman Engine for Web (KMW)." \ "clean" \ "configure" \ "build" \ + ":configuration Subset used to configure KMW" \ ":device-detect Subset used for device-detection " \ ":dom-utils A common subset of function used for DOM calculations, layout, etc" \ ":element-wrappers Subset used to integrate with website elements" \ @@ -102,13 +104,15 @@ builder_describe "Builds engine modules for Keyman Engine for Web (KMW)." \ builder_describe_outputs \ configure ../../../node_modules \ + configure:configuration ../../../node_modules \ configure:device-detect ../../../node_modules \ configure:dom-utils ../../../node_modules \ configure:element-wrappers ../../../node_modules \ configure:keyboard-cache ../../../node_modules \ configure:main ../../../node_modules \ configure:osk ../../../node_modules \ - build:device-detect $(output_path $DEVICEDETECT $OUTPUT_DIR)/index.js \ + build:device-detect $(output_path $CONFIGURATION $OUTPUT_DIR)/index.js \ + build:device-detect $(output_path $DEVICEDETECT $OUTPUT_DIR)/kmwdevice.js \ build:dom-utils $(output_path $DOMUTILS $OUTPUT_DIR)/index.js \ build:element-wrappers $(output_path $ELEMENTWRAPPERS $OUTPUT_DIR)/index.js \ build:keyboard-cache $(output_path $KEYBOARDCACHE $OUTPUT_DIR)/index.js \ @@ -193,6 +197,12 @@ if builder_start_action build:device-detect; then builder_finish_action success build:device-detect fi +if builder_start_action build:configuration; then + compile $CONFIGURATION + + builder_finish_action success build:configuration +fi + if builder_start_action build:dom-utils; then compile $DOMUTILS @@ -217,8 +227,8 @@ if builder_start_action build:osk; then builder_finish_action success build:osk fi -if builder_start_action build:main; then - compile $MAIN +# if builder_start_action build:main; then +# compile $MAIN - builder_finish_action success build:main -fi \ No newline at end of file +# builder_finish_action success build:main +# fi \ No newline at end of file diff --git a/web/src/engine/configuration/src/configuration.ts b/web/src/engine/configuration/src/configuration.ts new file mode 100644 index 0000000000..448cdd6e33 --- /dev/null +++ b/web/src/engine/configuration/src/configuration.ts @@ -0,0 +1,41 @@ +import { physicalKeyDeviceAlias } from "../../../../build/engine/device-detect/obj/kmwdevice.js"; +import { DeviceSpec, type SpacebarText } from "@keymanapp/keyboard-processor"; +import { OptionSpec } from "./optionSpec.interface.js"; +import PathConfiguration from "./pathConfiguration.js"; + +export default class Configuration { + readonly paths: PathConfiguration; + readonly activateFirstKeyboard: boolean; + readonly defaultSpacebarText: SpacebarText; + + readonly hostDevice: DeviceSpec; + readonly embeddingApp: string; + + // sourcePath: see `var sPath =` in kmwbase.ts. It is not obtainable headlessly. + constructor(options: Required, device: DeviceSpec, sourcePath: string) { + this.paths = new PathConfiguration(options, sourcePath); + if(typeof options.setActiveOnRegister == 'boolean') { + this.activateFirstKeyboard = options.setActiveOnRegister; + } else if (typeof options.setActiveOnRegister == 'string') { + let str = options.setActiveOnRegister.toLowerCase(); + this.activateFirstKeyboard = str === 'true'; + } else { + this.activateFirstKeyboard = true; + } + + this.defaultSpacebarText = options.spacebarText; + this.hostDevice = device; + + if(options.embeddingApp) { + this.embeddingApp = options.embeddingApp; + } + } + + get softDevice(): DeviceSpec { + return this.hostDevice; + } + + get hardDevice(): DeviceSpec { + return physicalKeyDeviceAlias(this.hostDevice); + } +} \ No newline at end of file diff --git a/web/src/engine/configuration/src/optionSpec.interface.ts b/web/src/engine/configuration/src/optionSpec.interface.ts new file mode 100644 index 0000000000..8216323758 --- /dev/null +++ b/web/src/engine/configuration/src/optionSpec.interface.ts @@ -0,0 +1,57 @@ +import { SpacebarText } from "@keymanapp/keyboard-processor"; + +export interface PathOptionSpec { + /** + * If defined, specifies the root path of the default location hosting KMW resources. + * Is typically just the protocol + domain name. + */ + root?: string; + + /** + * The base path to prepend on relative paths for other types of resources. + */ + resources?: string; + + /** + * The base path to prepend on relative paths when loading keyboards. + */ + keyboards?: string; + + /** + * The base path to prepend on relative paths when loading fonts. + */ + fonts?: string; +} + +export interface OptionSpec extends PathOptionSpec { + /** + * May be used to denote the name of the embedding application + */ + embeddingApp?: string | undefined; + + // ui?: string; + + /** + * If set to true || "true" or if left undefined, the engine will automatically select the first available + * keyboard for activation. + * + * Note that keyboards specified locally are synchronously loaded while cloud keyboards are async; as a + * result, a locally-specified keyboard will generally be available "sooner", even if added "later". + */ + setActiveOnRegister?: string | boolean; // TODO: Convert to boolean. Option loader needs to be able to receive this as a string or boolean + + /** + * Determines the default text shown on the spacebar. If undefined, uses `LANGUAGE_KEYBOARD` + */ + spacebarText?: SpacebarText; +} + +export const OptionDefaults: Required = { + embeddingApp: undefined, + root: '', + resources: '', + keyboards: '', + fonts: '', + setActiveOnRegister: true, + spacebarText: SpacebarText.LANGUAGE_KEYBOARD, +} \ No newline at end of file diff --git a/web/src/engine/configuration/src/pathConfiguration.ts b/web/src/engine/configuration/src/pathConfiguration.ts new file mode 100644 index 0000000000..301d9210e6 --- /dev/null +++ b/web/src/engine/configuration/src/pathConfiguration.ts @@ -0,0 +1,71 @@ +import { PathOptionSpec } from "./optionSpec.interface.js"; + +export default class PathConfiguration { + readonly root: string; + readonly resources: string; + readonly keyboards: string; + readonly fonts: string; + readonly protocol: string; + + constructor(pathSpec: Required, sourcePath: string) { + const addDelimiter = (p: string) => { + // Add delimiter if missing + if(p.substring(p.length-1, p.length) != '/') { + return p + '/'; + } else { + return p; + } + } + + sourcePath = addDelimiter(sourcePath); + const _rootPath = sourcePath.replace(/(https?:\/\/)([^\/]*)(.*)/,'$1$2/'); + this.protocol = sourcePath.replace(/(.{3,5}:)(.*)/,'$1'); + + // Local function to convert relative to absolute URLs + // with respect to the source path, server root and protocol + const fixPath = (p: string) => { + if(p.length == 0) { + return p; + } + + p = addDelimiter(p); + + // Absolute + if((p.replace(/^(http)s?:.*/,'$1') == 'http') || (p.replace(/^(file):.*/,'$1') == 'file')) { + return p; + } + + // Absolute (except for protocol) + if(p.substring(0,2) == '//') { + return this.protocol + p; + } + + // Relative to server root + if(p.substring(0,1) == '/') { + return this.root + p.substring(1); + } + + // Otherwise, assume relative to source path + return sourcePath + p; + } + + // Get default paths and device options + this.root = _rootPath; + if(pathSpec.root != '') { + this.root = fixPath(pathSpec.root); + } else { + this.root = fixPath(_rootPath); + } + + // Resources are located with respect to the engine by default + let resources = pathSpec.resources; // avoid mutating the parameter! + if(resources == '') { + resources = sourcePath; + } + + // Convert resource, keyboard and font paths to absolute URLs + this.resources = fixPath(resources); + this.keyboards = fixPath(pathSpec.keyboards); + this.fonts = fixPath(pathSpec.fonts); + } +} \ No newline at end of file diff --git a/web/src/engine/configuration/tsconfig.json b/web/src/engine/configuration/tsconfig.json new file mode 100644 index 0000000000..3763953f3f --- /dev/null +++ b/web/src/engine/configuration/tsconfig.json @@ -0,0 +1,24 @@ +{ + "extends": "../../../../tsconfig-base.json", + + "compilerOptions": { + "allowJs": false, + "inlineSources": true, + "allowSyntheticDefaultImports": true, + "module": "es6", + "moduleResolution": "Node", + "sourceMap": true, + "target": "es5", + "baseUrl": "./", + "outDir": "../../../build/engine/configuration/obj/", + "tsBuildInfoFile": "../../../build/engine/configuration/obj/tsconfig.tsbuildinfo", + "rootDir": "./src" + }, + + "include": [ "**/*.ts" ], + + "references": [ + { "path": "../../../../common/web/keyman-version" }, + { "path": "../../../../common/web/utils" } + ] +} diff --git a/web/src/engine/device-detect/kmwdevice.ts b/web/src/engine/device-detect/src/kmwdevice.ts similarity index 90% rename from web/src/engine/device-detect/kmwdevice.ts rename to web/src/engine/device-detect/src/kmwdevice.ts index e3e2c8b75c..7bae69a0c2 100644 --- a/web/src/engine/device-detect/kmwdevice.ts +++ b/web/src/engine/device-detect/src/kmwdevice.ts @@ -4,29 +4,34 @@ import { DeviceSpec, Version } from "@keymanapp/web-utils"; // The Device object definition ------------------------------------------------- export class Device { + // These correspond directly to the properties & parameters for `DeviceSpec`. touchable: boolean; OS: string; formFactor: string; - dyPortrait: number; - dyLandscape: number; - version: string; - orientation: string|number; browser: string; - colorScheme: 'light' | 'dark'; + + // These components aren't needed for key events. All but `version` could be a sort + // of `DeviceStyle`. + dyPortrait: number; // Its value is only referenced by an unused method. + dyLandscape: number; // Its value is only referenced by an unused method. + orientation: string|number; // Appears to be unused as well? + colorScheme: 'light' | 'dark'; // Also unused? + version: string; // As in, device version; only really persisted for Android. + // No real sign of actual use, though. private detected: boolean = false; - private _styles: StyleConstants; // Generates a default Device value. constructor() { this.touchable = !!('ontouchstart' in window); this.OS = ''; this.formFactor='desktop'; + this.browser=''; + this.dyPortrait=0; this.dyLandscape=0; this.version='0'; this.orientation=window.orientation; - this.browser=''; } /** @@ -200,4 +205,8 @@ export class Device { } } -export default Device; \ No newline at end of file +export default Device; + +export function physicalKeyDeviceAlias(device: DeviceSpec) { + return new DeviceSpec(device.browser, DeviceSpec.FormFactor.Desktop, device.OS, false); +} \ No newline at end of file diff --git a/web/src/engine/device-detect/utils/styleConstants.ts b/web/src/engine/device-detect/src/utils/styleConstants.ts similarity index 100% rename from web/src/engine/device-detect/utils/styleConstants.ts rename to web/src/engine/device-detect/src/utils/styleConstants.ts diff --git a/web/src/engine/device-detect/tsconfig.json b/web/src/engine/device-detect/tsconfig.json index 1ab64945ab..7c4ab9a952 100644 --- a/web/src/engine/device-detect/tsconfig.json +++ b/web/src/engine/device-detect/tsconfig.json @@ -5,6 +5,7 @@ "allowJs": false, "declaration": true, "inlineSources": true, + "allowSyntheticDefaultImports": true, "module": "es6", "moduleResolution": "Node16", "sourceMap": true, @@ -12,7 +13,7 @@ "baseUrl": "./", "outDir": "../../../build/engine/device-detect/obj/", "tsBuildInfoFile": "../../../build/engine/device-detect/obj/tsconfig.tsbuildinfo", - "rootDir": "." + "rootDir": "./src" }, "include": [ "**/*.ts" ], diff --git a/web/src/engine/main/kmwbase.ts b/web/src/engine/main/kmwbase.ts index 6bee28be1d..a45efa742b 100644 --- a/web/src/engine/main/kmwbase.ts +++ b/web/src/engine/main/kmwbase.ts @@ -39,6 +39,8 @@ namespace com.keyman { resources?: string; keyboards?: string; fonts?: string; + // attachType and ui are 100% ignored for embedded (app-WebView hosted) contexts. + // They should only be expected for website-based KMW use. attachType?: 'auto' | 'manual' | ''; // If blank or undefined, attachType will be assigned to "auto" or "manual" ui?: string; setActiveOnRegister?: string; // TODO: Convert to boolean. Option loader needs to be able to receive this as a string or boolean @@ -47,6 +49,7 @@ namespace com.keyman { spacebarText?: SpacebarText; // Determines whether or not KeymanWeb should display its own alert messages + // Only relevant for website-based KMW use. useAlerts?: boolean; } diff --git a/web/src/test/auto/headless/configuration/pathConfiguration.js b/web/src/test/auto/headless/configuration/pathConfiguration.js new file mode 100644 index 0000000000..b4ff5847ad --- /dev/null +++ b/web/src/test/auto/headless/configuration/pathConfiguration.js @@ -0,0 +1,72 @@ +import { assert } from 'chai'; +import sinon from 'sinon'; + +import PathConfiguration from '../../../../../build/engine/configuration/obj/pathConfiguration.js'; +import { OptionDefaults } from '../../../../../build/engine/configuration/obj/optionSpec.interface.js'; + +// Tests the activation-state logic abstraction & implementations used to model and control OSK visibility. + +describe.only("Path Configuration", () => { + it('https://test.site.com/folder/, default options', () => { + const paths = new PathConfiguration(OptionDefaults, 'https://test.site.com/folder/'); + + assert.equal(paths.protocol, 'https:'); + assert.equal(paths.root, 'https://test.site.com/'); + assert.equal(paths.resources, 'https://test.site.com/folder/'); + assert.equal(paths.keyboards, ''); + assert.equal(paths.fonts, ''); + }); + + it('https://test.site.com/folder, non-standard option values', () => { + const paths = new PathConfiguration({...OptionDefaults, + keyboards: 'https://s.keyman.com/keyboard', + fonts: '/fonts', + resources: 'resources', + root: '//something.or.other' + }, 'https://test.site.com/folder/'); + + assert.equal(paths.protocol, 'https:'); + assert.equal(paths.root, 'https://something.or.other/'); + assert.equal(paths.resources, 'https://test.site.com/folder/resources/'); + assert.equal(paths.keyboards, 'https://s.keyman.com/keyboard/'); + assert.equal(paths.fonts, 'https://something.or.other/fonts/'); + }); + + it('http://test.site.com/folder, non-standard option values', () => { + const paths = new PathConfiguration({...OptionDefaults, + keyboards: 'https://s.keyman.com/keyboard', + fonts: '/fonts', + resources: 'resources', + root: '//something.or.other' + }, 'http://test.site.com/folder'); + + assert.equal(paths.protocol, 'http:'); + assert.equal(paths.root, 'http://something.or.other/'); + assert.equal(paths.resources, 'http://test.site.com/folder/resources/'); + assert.equal(paths.keyboards, 'https://s.keyman.com/keyboard/'); + assert.equal(paths.fonts, 'http://something.or.other/fonts/'); + }); + + it('http://localhost/keymanweb/src/test/manual/web', () => { + const paths = new PathConfiguration(OptionDefaults, 'http://localhost/keymanweb/src/test/manual/web'); + + assert.equal(paths.protocol, 'http:'); + assert.equal(paths.root, 'http://localhost/'); + assert.equal(paths.resources, 'http://localhost/keymanweb/src/test/manual/web/'); + assert.equal(paths.keyboards, ''); + assert.equal(paths.fonts, ''); + }); + + it('file:///C:/keymanapp/keyman/web/src/test/manual/web', () => { + const paths = new PathConfiguration({...OptionDefaults, + resources: '../../../../build/resources' + }, 'file:///C:/keymanapp/keyman/web/src/test/manual/web'); + + assert.equal(paths.protocol, 'file:'); + // Is this proper? We just treat 'root' differently (by default) if being served via file:/// ? + assert.equal(paths.root, 'file:///C:/keymanapp/keyman/web/src/test/manual/web/'); + assert.equal(paths.resources, 'file:///C:/keymanapp/keyman/web/src/test/manual/web/../../../../build/resources/'); + assert.equal(paths.keyboards, ''); + assert.equal(paths.fonts, ''); + }); +}); \ No newline at end of file From 281ffe2d8dcdca482a39acdd99aef08a052aefe8 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Mon, 20 Feb 2023 13:46:05 +0700 Subject: [PATCH 4/5] chore(web): fixes a describe_outputs --- web/src/engine/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/engine/build.sh b/web/src/engine/build.sh index af4f1608e5..e1736e468a 100755 --- a/web/src/engine/build.sh +++ b/web/src/engine/build.sh @@ -111,7 +111,7 @@ builder_describe_outputs \ configure:keyboard-cache ../../../node_modules \ configure:main ../../../node_modules \ configure:osk ../../../node_modules \ - build:device-detect $(output_path $CONFIGURATION $OUTPUT_DIR)/index.js \ + build:configuration $(output_path $CONFIGURATION $OUTPUT_DIR)/index.js \ build:device-detect $(output_path $DEVICEDETECT $OUTPUT_DIR)/kmwdevice.js \ build:dom-utils $(output_path $DOMUTILS $OUTPUT_DIR)/index.js \ build:element-wrappers $(output_path $ELEMENTWRAPPERS $OUTPUT_DIR)/index.js \ From 5f1099b8621f7ce827f37bc83173f00acfeb8c5f Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Tue, 21 Feb 2023 14:14:56 +0700 Subject: [PATCH 5/5] chore(web): cleans up config submodule import, export pathing --- web/package.json | 4 ++++ web/src/engine/configuration/src/configuration.ts | 3 ++- web/src/engine/configuration/src/index.ts | 3 +++ web/src/engine/configuration/tsconfig.json | 2 +- .../test/auto/headless/configuration/pathConfiguration.js | 5 ++--- 5 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 web/src/engine/configuration/src/index.ts diff --git a/web/package.json b/web/package.json index ace291d5cc..c91047aaea 100644 --- a/web/package.json +++ b/web/package.json @@ -2,6 +2,10 @@ "name": "keyman", "description": "Facilitates text input in any language.", "exports": { + "./engine/configuration": { + "types": "./build/engine/configuration/obj/index.d.ts", + "import": "./build/engine/configuration/obj/index.js" + }, "./engine/device-detect": { "types": "./build/engine/device-detect/obj/kmwdevice.d.ts", "import": "./build/engine/device-detect/obj/kmwdevice.js" diff --git a/web/src/engine/configuration/src/configuration.ts b/web/src/engine/configuration/src/configuration.ts index 448cdd6e33..1417bab2ec 100644 --- a/web/src/engine/configuration/src/configuration.ts +++ b/web/src/engine/configuration/src/configuration.ts @@ -1,5 +1,6 @@ -import { physicalKeyDeviceAlias } from "../../../../build/engine/device-detect/obj/kmwdevice.js"; +import { physicalKeyDeviceAlias } from "keyman/engine/device-detect"; import { DeviceSpec, type SpacebarText } from "@keymanapp/keyboard-processor"; + import { OptionSpec } from "./optionSpec.interface.js"; import PathConfiguration from "./pathConfiguration.js"; diff --git a/web/src/engine/configuration/src/index.ts b/web/src/engine/configuration/src/index.ts new file mode 100644 index 0000000000..c38815452d --- /dev/null +++ b/web/src/engine/configuration/src/index.ts @@ -0,0 +1,3 @@ +export { default as Configuration } from './configuration.js'; +export { default as PathConfiguration } from './pathConfiguration.js'; +export { OptionDefaults, OptionSpec, PathOptionSpec } from './optionSpec.interface.js'; \ No newline at end of file diff --git a/web/src/engine/configuration/tsconfig.json b/web/src/engine/configuration/tsconfig.json index 3763953f3f..29a3f1b8c8 100644 --- a/web/src/engine/configuration/tsconfig.json +++ b/web/src/engine/configuration/tsconfig.json @@ -6,7 +6,7 @@ "inlineSources": true, "allowSyntheticDefaultImports": true, "module": "es6", - "moduleResolution": "Node", + "moduleResolution": "Node16", "sourceMap": true, "target": "es5", "baseUrl": "./", diff --git a/web/src/test/auto/headless/configuration/pathConfiguration.js b/web/src/test/auto/headless/configuration/pathConfiguration.js index b4ff5847ad..f83934f567 100644 --- a/web/src/test/auto/headless/configuration/pathConfiguration.js +++ b/web/src/test/auto/headless/configuration/pathConfiguration.js @@ -1,12 +1,11 @@ import { assert } from 'chai'; import sinon from 'sinon'; -import PathConfiguration from '../../../../../build/engine/configuration/obj/pathConfiguration.js'; -import { OptionDefaults } from '../../../../../build/engine/configuration/obj/optionSpec.interface.js'; +import { OptionDefaults, PathConfiguration } from 'keyman/engine/configuration'; // Tests the activation-state logic abstraction & implementations used to model and control OSK visibility. -describe.only("Path Configuration", () => { +describe("Path Configuration", () => { it('https://test.site.com/folder/, default options', () => { const paths = new PathConfiguration(OptionDefaults, 'https://test.site.com/folder/');