From afb09789b822c1bcedbde6eb499b57c3c883497a Mon Sep 17 00:00:00 2001 From: EisenbergEffect Date: Sun, 5 Nov 2017 16:07:15 -0800 Subject: [PATCH] chore(all): prepare release 1.0.0-beta.4.0.0 --- bower.json | 2 +- dist/amd/aurelia-testing.d.ts | 6 + dist/amd/aurelia-testing.js | 18 +++ dist/amd/compile-spy.d.ts | 14 +++ dist/amd/compile-spy.js | 31 ++++++ dist/amd/component-tester.d.ts | 36 ++++++ dist/amd/component-tester.js | 116 +++++++++++++++++++ dist/amd/view-spy.d.ts | 37 +++++++ dist/amd/view-spy.js | 69 ++++++++++++ dist/amd/wait.d.ts | 23 ++++ dist/amd/wait.js | 52 +++++++++ dist/commonjs/aurelia-testing.d.ts | 6 + dist/commonjs/aurelia-testing.js | 16 +++ dist/commonjs/compile-spy.d.ts | 14 +++ dist/commonjs/compile-spy.js | 33 ++++++ dist/commonjs/component-tester.d.ts | 36 ++++++ dist/commonjs/component-tester.js | 116 +++++++++++++++++++ dist/commonjs/view-spy.d.ts | 37 +++++++ dist/commonjs/view-spy.js | 69 ++++++++++++ dist/commonjs/wait.d.ts | 23 ++++ dist/commonjs/wait.js | 50 +++++++++ dist/es2015/aurelia-testing.d.ts | 6 + dist/es2015/aurelia-testing.js | 10 ++ dist/es2015/compile-spy.d.ts | 14 +++ dist/es2015/compile-spy.js | 30 +++++ dist/es2015/component-tester.d.ts | 36 ++++++ dist/es2015/component-tester.js | 103 +++++++++++++++++ dist/es2015/view-spy.d.ts | 37 +++++++ dist/es2015/view-spy.js | 66 +++++++++++ dist/es2015/wait.d.ts | 23 ++++ dist/es2015/wait.js | 36 ++++++ dist/es2017/aurelia-testing.d.ts | 6 + dist/es2017/aurelia-testing.js | 10 ++ dist/es2017/compile-spy.d.ts | 14 +++ dist/es2017/compile-spy.js | 30 +++++ dist/es2017/component-tester.d.ts | 36 ++++++ dist/es2017/component-tester.js | 103 +++++++++++++++++ dist/es2017/view-spy.d.ts | 37 +++++++ dist/es2017/view-spy.js | 66 +++++++++++ dist/es2017/wait.d.ts | 23 ++++ dist/es2017/wait.js | 36 ++++++ dist/native-modules/aurelia-testing.d.ts | 6 + dist/native-modules/aurelia-testing.js | 10 ++ dist/native-modules/compile-spy.d.ts | 14 +++ dist/native-modules/compile-spy.js | 31 ++++++ dist/native-modules/component-tester.d.ts | 36 ++++++ dist/native-modules/component-tester.js | 114 +++++++++++++++++++ dist/native-modules/view-spy.d.ts | 37 +++++++ dist/native-modules/view-spy.js | 67 +++++++++++ dist/native-modules/wait.d.ts | 23 ++++ dist/native-modules/wait.js | 45 ++++++++ dist/system/aurelia-testing.d.ts | 6 + dist/system/aurelia-testing.js | 39 +++++++ dist/system/compile-spy.d.ts | 14 +++ dist/system/compile-spy.js | 45 ++++++++ dist/system/component-tester.d.ts | 36 ++++++ dist/system/component-tester.js | 129 ++++++++++++++++++++++ dist/system/view-spy.d.ts | 37 +++++++ dist/system/view-spy.js | 77 +++++++++++++ dist/system/wait.d.ts | 23 ++++ dist/system/wait.js | 57 ++++++++++ doc/CHANGELOG.md | 6 +- doc/api.json | 2 +- package.json | 16 +-- 64 files changed, 2378 insertions(+), 18 deletions(-) create mode 100644 dist/amd/aurelia-testing.d.ts create mode 100644 dist/amd/aurelia-testing.js create mode 100644 dist/amd/compile-spy.d.ts create mode 100644 dist/amd/compile-spy.js create mode 100644 dist/amd/component-tester.d.ts create mode 100644 dist/amd/component-tester.js create mode 100644 dist/amd/view-spy.d.ts create mode 100644 dist/amd/view-spy.js create mode 100644 dist/amd/wait.d.ts create mode 100644 dist/amd/wait.js create mode 100644 dist/commonjs/aurelia-testing.d.ts create mode 100644 dist/commonjs/aurelia-testing.js create mode 100644 dist/commonjs/compile-spy.d.ts create mode 100644 dist/commonjs/compile-spy.js create mode 100644 dist/commonjs/component-tester.d.ts create mode 100644 dist/commonjs/component-tester.js create mode 100644 dist/commonjs/view-spy.d.ts create mode 100644 dist/commonjs/view-spy.js create mode 100644 dist/commonjs/wait.d.ts create mode 100644 dist/commonjs/wait.js create mode 100644 dist/es2015/aurelia-testing.d.ts create mode 100644 dist/es2015/aurelia-testing.js create mode 100644 dist/es2015/compile-spy.d.ts create mode 100644 dist/es2015/compile-spy.js create mode 100644 dist/es2015/component-tester.d.ts create mode 100644 dist/es2015/component-tester.js create mode 100644 dist/es2015/view-spy.d.ts create mode 100644 dist/es2015/view-spy.js create mode 100644 dist/es2015/wait.d.ts create mode 100644 dist/es2015/wait.js create mode 100644 dist/es2017/aurelia-testing.d.ts create mode 100644 dist/es2017/aurelia-testing.js create mode 100644 dist/es2017/compile-spy.d.ts create mode 100644 dist/es2017/compile-spy.js create mode 100644 dist/es2017/component-tester.d.ts create mode 100644 dist/es2017/component-tester.js create mode 100644 dist/es2017/view-spy.d.ts create mode 100644 dist/es2017/view-spy.js create mode 100644 dist/es2017/wait.d.ts create mode 100644 dist/es2017/wait.js create mode 100644 dist/native-modules/aurelia-testing.d.ts create mode 100644 dist/native-modules/aurelia-testing.js create mode 100644 dist/native-modules/compile-spy.d.ts create mode 100644 dist/native-modules/compile-spy.js create mode 100644 dist/native-modules/component-tester.d.ts create mode 100644 dist/native-modules/component-tester.js create mode 100644 dist/native-modules/view-spy.d.ts create mode 100644 dist/native-modules/view-spy.js create mode 100644 dist/native-modules/wait.d.ts create mode 100644 dist/native-modules/wait.js create mode 100644 dist/system/aurelia-testing.d.ts create mode 100644 dist/system/aurelia-testing.js create mode 100644 dist/system/compile-spy.d.ts create mode 100644 dist/system/compile-spy.js create mode 100644 dist/system/component-tester.d.ts create mode 100644 dist/system/component-tester.js create mode 100644 dist/system/view-spy.d.ts create mode 100644 dist/system/view-spy.js create mode 100644 dist/system/wait.d.ts create mode 100644 dist/system/wait.js diff --git a/bower.json b/bower.json index 0e942bc..de55508 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-testing", - "version": "1.0.0-beta.3.0.1", + "version": "1.0.0-beta.4.0.0", "description": "A collection of helpers for testing Aurelia apps and components.", "keywords": [ "aurelia", diff --git a/dist/amd/aurelia-testing.d.ts b/dist/amd/aurelia-testing.d.ts new file mode 100644 index 0000000..e83a784 --- /dev/null +++ b/dist/amd/aurelia-testing.d.ts @@ -0,0 +1,6 @@ +import { FrameworkConfiguration } from 'aurelia-framework'; +export * from './compile-spy'; +export * from './view-spy'; +export * from './component-tester'; +export * from './wait'; +export declare function configure(config: FrameworkConfiguration): void; diff --git a/dist/amd/aurelia-testing.js b/dist/amd/aurelia-testing.js new file mode 100644 index 0000000..677aa74 --- /dev/null +++ b/dist/amd/aurelia-testing.js @@ -0,0 +1,18 @@ +define(["require", "exports", "./compile-spy", "./view-spy", "./component-tester", "./wait"], function (require, exports, compile_spy_1, view_spy_1, component_tester_1, wait_1) { + "use strict"; + function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; + } + Object.defineProperty(exports, "__esModule", { value: true }); + __export(compile_spy_1); + __export(view_spy_1); + __export(component_tester_1); + __export(wait_1); + function configure(config) { + config.globalResources([ + './compile-spy', + './view-spy' + ]); + } + exports.configure = configure; +}); diff --git a/dist/amd/compile-spy.d.ts b/dist/amd/compile-spy.d.ts new file mode 100644 index 0000000..48ff7e9 --- /dev/null +++ b/dist/amd/compile-spy.d.ts @@ -0,0 +1,14 @@ +import { TargetInstruction } from 'aurelia-templating'; +/** + * Attribute to be placed on any element to have it emit the View Compiler's + * TargetInstruction into the debug console, giving you insight into all the + * parsed bindings, behaviors and event handers for the targeted element. + */ +export declare class CompileSpy { + /** + * Creates and instanse of CompileSpy. + * @param element target element on where attribute is placed on. + * @param instruction instructions for how the target element should be enhanced. + */ + constructor(element: Element, instruction: TargetInstruction); +} diff --git a/dist/amd/compile-spy.js b/dist/amd/compile-spy.js new file mode 100644 index 0000000..5b7e746 --- /dev/null +++ b/dist/amd/compile-spy.js @@ -0,0 +1,31 @@ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +define(["require", "exports", "aurelia-templating", "aurelia-dependency-injection", "aurelia-logging", "aurelia-pal"], function (require, exports, aurelia_templating_1, aurelia_dependency_injection_1, aurelia_logging_1, aurelia_pal_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /** + * Attribute to be placed on any element to have it emit the View Compiler's + * TargetInstruction into the debug console, giving you insight into all the + * parsed bindings, behaviors and event handers for the targeted element. + */ + var CompileSpy = /** @class */ (function () { + /** + * Creates and instanse of CompileSpy. + * @param element target element on where attribute is placed on. + * @param instruction instructions for how the target element should be enhanced. + */ + function CompileSpy(element, instruction) { + aurelia_logging_1.getLogger('compile-spy').info(element.toString(), instruction); + } + CompileSpy = __decorate([ + aurelia_templating_1.customAttribute('compile-spy'), + aurelia_dependency_injection_1.inject(aurelia_pal_1.DOM.Element, aurelia_templating_1.TargetInstruction) + ], CompileSpy); + return CompileSpy; + }()); + exports.CompileSpy = CompileSpy; +}); diff --git a/dist/amd/component-tester.d.ts b/dist/amd/component-tester.d.ts new file mode 100644 index 0000000..77bda85 --- /dev/null +++ b/dist/amd/component-tester.d.ts @@ -0,0 +1,36 @@ +import { Aurelia, FrameworkConfiguration } from 'aurelia-framework'; +export declare class StageComponent { + static withResources(resources?: string | string[]): ComponentTester; +} +export declare class ComponentTester { + bind: (bindingContext: {}) => Promise; + attached: () => Promise; + detached: () => Promise; + unbind: () => Promise; + element: Element; + viewModel: T; + private html; + private resources; + private bindingContext; + private rootView; + private host; + configure(aurelia: Aurelia): FrameworkConfiguration; + bootstrap(configure: (aurelia: Aurelia) => FrameworkConfiguration): void; + withResources(resources: string | string[]): ComponentTester; + inView(html: string): ComponentTester; + boundTo(bindingContext: {}): ComponentTester; + manuallyHandleLifecycle(): ComponentTester; + create(bootstrap: (configure: (aurelia: Aurelia) => Promise) => Promise): Promise; + dispose(): Element; + private _prepareLifecycle(); + waitForElement(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; + }): Promise; + waitForElements(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; + }): Promise>; +} diff --git a/dist/amd/component-tester.js b/dist/amd/component-tester.js new file mode 100644 index 0000000..7388897 --- /dev/null +++ b/dist/amd/component-tester.js @@ -0,0 +1,116 @@ +define(["require", "exports", "aurelia-templating", "./wait"], function (require, exports, aurelia_templating_1, wait_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var StageComponent = /** @class */ (function () { + function StageComponent() { + } + StageComponent.withResources = function (resources) { + if (resources === void 0) { resources = []; } + return new ComponentTester().withResources(resources); + }; + return StageComponent; + }()); + exports.StageComponent = StageComponent; + var ComponentTester = /** @class */ (function () { + function ComponentTester() { + this.resources = []; + } + ComponentTester.prototype.configure = function (aurelia) { + return aurelia.use.standardConfiguration(); + }; + ComponentTester.prototype.bootstrap = function (configure) { + this.configure = configure; + }; + ComponentTester.prototype.withResources = function (resources) { + this.resources = resources; + return this; + }; + ComponentTester.prototype.inView = function (html) { + this.html = html; + return this; + }; + ComponentTester.prototype.boundTo = function (bindingContext) { + this.bindingContext = bindingContext; + return this; + }; + ComponentTester.prototype.manuallyHandleLifecycle = function () { + this._prepareLifecycle(); + return this; + }; + ComponentTester.prototype.create = function (bootstrap) { + var _this = this; + return bootstrap(function (aurelia) { + return Promise.resolve(_this.configure(aurelia)).then(function () { + if (_this.resources) { + aurelia.use.globalResources(_this.resources); + } + return aurelia.start().then(function () { + _this.host = document.createElement('div'); + _this.host.innerHTML = _this.html; + document.body.appendChild(_this.host); + return aurelia.enhance(_this.bindingContext, _this.host).then(function () { + _this.rootView = aurelia.root; + _this.element = _this.host.firstElementChild; + if (aurelia.root.controllers.length) { + _this.viewModel = aurelia.root.controllers[0].viewModel; + } + return new Promise(function (resolve) { return setTimeout(function () { return resolve(); }, 0); }); + }); + }); + }); + }); + }; + ComponentTester.prototype.dispose = function () { + if (this.host === undefined || this.rootView === undefined) { + throw new Error('Cannot call ComponentTester.dispose() before ComponentTester.create()'); + } + this.rootView.detached(); + this.rootView.unbind(); + return this.host.parentNode.removeChild(this.host); + }; + ComponentTester.prototype._prepareLifecycle = function () { + var _this = this; + // bind + var bindPrototype = aurelia_templating_1.View.prototype.bind; + // tslint:disable-next-line:no-empty + aurelia_templating_1.View.prototype.bind = function () { }; + this.bind = function (bindingContext) { return new Promise(function (resolve) { + aurelia_templating_1.View.prototype.bind = bindPrototype; + if (bindingContext !== undefined) { + _this.bindingContext = bindingContext; + } + _this.rootView.bind(_this.bindingContext); + setTimeout(function () { return resolve(); }, 0); + }); }; + // attached + var attachedPrototype = aurelia_templating_1.View.prototype.attached; + // tslint:disable-next-line:no-empty + aurelia_templating_1.View.prototype.attached = function () { }; + this.attached = function () { return new Promise(function (resolve) { + aurelia_templating_1.View.prototype.attached = attachedPrototype; + _this.rootView.attached(); + setTimeout(function () { return resolve(); }, 0); + }); }; + // detached + this.detached = function () { return new Promise(function (resolve) { + _this.rootView.detached(); + setTimeout(function () { return resolve(); }, 0); + }); }; + // unbind + this.unbind = function () { return new Promise(function (resolve) { + _this.rootView.unbind(); + setTimeout(function () { return resolve(); }, 0); + }); }; + }; + ComponentTester.prototype.waitForElement = function (selector, options) { + var _this = this; + return wait_1.waitFor(function () { return _this.element.querySelector(selector); }, options); + }; + ComponentTester.prototype.waitForElements = function (selector, options) { + var _this = this; + return wait_1.waitFor(function () { return _this.element.querySelectorAll(selector); }, options); + }; + return ComponentTester; + }()); + exports.ComponentTester = ComponentTester; +}); diff --git a/dist/amd/view-spy.d.ts b/dist/amd/view-spy.d.ts new file mode 100644 index 0000000..7c2f341 --- /dev/null +++ b/dist/amd/view-spy.d.ts @@ -0,0 +1,37 @@ +/** + * Attribute to be placed on any HTML element in a view to emit the View instance + * to the debug console, giving you insight into the live View instance, including + * all child views, live bindings, behaviors and more. + */ +export declare class ViewSpy { + private logger; + private value; + private view; + /** + * Creates a new instance of ViewSpy. + */ + constructor(); + private _log(lifecycleName, context?); + /** + * Invoked when the target view is created. + * @param view The target view. + */ + created(view: any): void; + /** + * Invoked when the target view is bound. + * @param bindingContext The target view's binding context. + */ + bind(bindingContext: {}): void; + /** + * Invoked when the target element is attached to the DOM. + */ + attached(): void; + /** + * Invoked when the target element is detached from the DOM. + */ + detached(): void; + /** + * Invoked when the target element is unbound. + */ + unbind(): void; +} diff --git a/dist/amd/view-spy.js b/dist/amd/view-spy.js new file mode 100644 index 0000000..5351166 --- /dev/null +++ b/dist/amd/view-spy.js @@ -0,0 +1,69 @@ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +define(["require", "exports", "aurelia-templating", "aurelia-logging"], function (require, exports, aurelia_templating_1, aurelia_logging_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /** + * Attribute to be placed on any HTML element in a view to emit the View instance + * to the debug console, giving you insight into the live View instance, including + * all child views, live bindings, behaviors and more. + */ + var ViewSpy = /** @class */ (function () { + /** + * Creates a new instance of ViewSpy. + */ + function ViewSpy() { + this.logger = aurelia_logging_1.getLogger('view-spy'); + } + ViewSpy.prototype._log = function (lifecycleName, context) { + if (!this.value && lifecycleName === 'created') { + this.logger.info(lifecycleName, this.view); + } + else if (this.value && this.value.indexOf(lifecycleName) !== -1) { + this.logger.info(lifecycleName, this.view, context); + } + }; + /** + * Invoked when the target view is created. + * @param view The target view. + */ + ViewSpy.prototype.created = function (view) { + this.view = view; + this._log('created'); + }; + /** + * Invoked when the target view is bound. + * @param bindingContext The target view's binding context. + */ + ViewSpy.prototype.bind = function (bindingContext) { + this._log('bind', bindingContext); + }; + /** + * Invoked when the target element is attached to the DOM. + */ + ViewSpy.prototype.attached = function () { + this._log('attached'); + }; + /** + * Invoked when the target element is detached from the DOM. + */ + ViewSpy.prototype.detached = function () { + this._log('detached'); + }; + /** + * Invoked when the target element is unbound. + */ + ViewSpy.prototype.unbind = function () { + this._log('unbind'); + }; + ViewSpy = __decorate([ + aurelia_templating_1.customAttribute('view-spy') + ], ViewSpy); + return ViewSpy; + }()); + exports.ViewSpy = ViewSpy; +}); diff --git a/dist/amd/wait.d.ts b/dist/amd/wait.d.ts new file mode 100644 index 0000000..c58665a --- /dev/null +++ b/dist/amd/wait.d.ts @@ -0,0 +1,23 @@ +/** + * Generic function to wait for something to happen. Uses polling + * @param getter: a getter function that returns anything else than `null` or an + * empty array or an empty jQuery object when the + * condition is met + * @param options: lookup options, defaults to + * `{present: true, interval: 50, timeout: 5000}` + */ +export declare function waitFor(getter: () => T, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise; +export declare function waitForDocumentElement(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise; +export declare function waitForDocumentElements(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise>; diff --git a/dist/amd/wait.js b/dist/amd/wait.js new file mode 100644 index 0000000..0e101a1 --- /dev/null +++ b/dist/amd/wait.js @@ -0,0 +1,52 @@ +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /** + * Generic function to wait for something to happen. Uses polling + * @param getter: a getter function that returns anything else than `null` or an + * empty array or an empty jQuery object when the + * condition is met + * @param options: lookup options, defaults to + * `{present: true, interval: 50, timeout: 5000}` + */ + function waitFor(getter, options) { + if (options === void 0) { options = { present: true, interval: 50, timeout: 5000 }; } + // prevents infinite recursion if the request times out + var timedOut = false; + options = __assign({ present: true, interval: 50, timeout: 5000 }, options); + function wait() { + var element = getter(); + // boolean is needed here, hence the length > 0 + var found = element !== null && (!(element instanceof NodeList) && + !element.jquery || element.length > 0); + if (!options.present === !found || timedOut) { + return Promise.resolve(element); + } + return new Promise(function (rs) { return setTimeout(rs, options.interval); }).then(wait); + } + return Promise.race([ + new Promise(function (_, rj) { return setTimeout(function () { + timedOut = true; + rj(options.present ? 'Element not found' : 'Element not removed'); + }, options.timeout); }), + wait() + ]); + } + exports.waitFor = waitFor; + function waitForDocumentElement(selector, options) { + return waitFor(function () { return document.querySelector(selector); }, options); + } + exports.waitForDocumentElement = waitForDocumentElement; + function waitForDocumentElements(selector, options) { + return waitFor(function () { return document.querySelectorAll(selector); }, options); + } + exports.waitForDocumentElements = waitForDocumentElements; +}); diff --git a/dist/commonjs/aurelia-testing.d.ts b/dist/commonjs/aurelia-testing.d.ts new file mode 100644 index 0000000..e83a784 --- /dev/null +++ b/dist/commonjs/aurelia-testing.d.ts @@ -0,0 +1,6 @@ +import { FrameworkConfiguration } from 'aurelia-framework'; +export * from './compile-spy'; +export * from './view-spy'; +export * from './component-tester'; +export * from './wait'; +export declare function configure(config: FrameworkConfiguration): void; diff --git a/dist/commonjs/aurelia-testing.js b/dist/commonjs/aurelia-testing.js new file mode 100644 index 0000000..294ee35 --- /dev/null +++ b/dist/commonjs/aurelia-testing.js @@ -0,0 +1,16 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./compile-spy")); +__export(require("./view-spy")); +__export(require("./component-tester")); +__export(require("./wait")); +function configure(config) { + config.globalResources([ + './compile-spy', + './view-spy' + ]); +} +exports.configure = configure; diff --git a/dist/commonjs/compile-spy.d.ts b/dist/commonjs/compile-spy.d.ts new file mode 100644 index 0000000..48ff7e9 --- /dev/null +++ b/dist/commonjs/compile-spy.d.ts @@ -0,0 +1,14 @@ +import { TargetInstruction } from 'aurelia-templating'; +/** + * Attribute to be placed on any element to have it emit the View Compiler's + * TargetInstruction into the debug console, giving you insight into all the + * parsed bindings, behaviors and event handers for the targeted element. + */ +export declare class CompileSpy { + /** + * Creates and instanse of CompileSpy. + * @param element target element on where attribute is placed on. + * @param instruction instructions for how the target element should be enhanced. + */ + constructor(element: Element, instruction: TargetInstruction); +} diff --git a/dist/commonjs/compile-spy.js b/dist/commonjs/compile-spy.js new file mode 100644 index 0000000..d6d67bd --- /dev/null +++ b/dist/commonjs/compile-spy.js @@ -0,0 +1,33 @@ +"use strict"; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var aurelia_templating_1 = require("aurelia-templating"); +var aurelia_dependency_injection_1 = require("aurelia-dependency-injection"); +var aurelia_logging_1 = require("aurelia-logging"); +var aurelia_pal_1 = require("aurelia-pal"); +/** + * Attribute to be placed on any element to have it emit the View Compiler's + * TargetInstruction into the debug console, giving you insight into all the + * parsed bindings, behaviors and event handers for the targeted element. + */ +var CompileSpy = /** @class */ (function () { + /** + * Creates and instanse of CompileSpy. + * @param element target element on where attribute is placed on. + * @param instruction instructions for how the target element should be enhanced. + */ + function CompileSpy(element, instruction) { + aurelia_logging_1.getLogger('compile-spy').info(element.toString(), instruction); + } + CompileSpy = __decorate([ + aurelia_templating_1.customAttribute('compile-spy'), + aurelia_dependency_injection_1.inject(aurelia_pal_1.DOM.Element, aurelia_templating_1.TargetInstruction) + ], CompileSpy); + return CompileSpy; +}()); +exports.CompileSpy = CompileSpy; diff --git a/dist/commonjs/component-tester.d.ts b/dist/commonjs/component-tester.d.ts new file mode 100644 index 0000000..77bda85 --- /dev/null +++ b/dist/commonjs/component-tester.d.ts @@ -0,0 +1,36 @@ +import { Aurelia, FrameworkConfiguration } from 'aurelia-framework'; +export declare class StageComponent { + static withResources(resources?: string | string[]): ComponentTester; +} +export declare class ComponentTester { + bind: (bindingContext: {}) => Promise; + attached: () => Promise; + detached: () => Promise; + unbind: () => Promise; + element: Element; + viewModel: T; + private html; + private resources; + private bindingContext; + private rootView; + private host; + configure(aurelia: Aurelia): FrameworkConfiguration; + bootstrap(configure: (aurelia: Aurelia) => FrameworkConfiguration): void; + withResources(resources: string | string[]): ComponentTester; + inView(html: string): ComponentTester; + boundTo(bindingContext: {}): ComponentTester; + manuallyHandleLifecycle(): ComponentTester; + create(bootstrap: (configure: (aurelia: Aurelia) => Promise) => Promise): Promise; + dispose(): Element; + private _prepareLifecycle(); + waitForElement(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; + }): Promise; + waitForElements(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; + }): Promise>; +} diff --git a/dist/commonjs/component-tester.js b/dist/commonjs/component-tester.js new file mode 100644 index 0000000..1de60c9 --- /dev/null +++ b/dist/commonjs/component-tester.js @@ -0,0 +1,116 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var aurelia_templating_1 = require("aurelia-templating"); +var wait_1 = require("./wait"); +var StageComponent = /** @class */ (function () { + function StageComponent() { + } + StageComponent.withResources = function (resources) { + if (resources === void 0) { resources = []; } + return new ComponentTester().withResources(resources); + }; + return StageComponent; +}()); +exports.StageComponent = StageComponent; +var ComponentTester = /** @class */ (function () { + function ComponentTester() { + this.resources = []; + } + ComponentTester.prototype.configure = function (aurelia) { + return aurelia.use.standardConfiguration(); + }; + ComponentTester.prototype.bootstrap = function (configure) { + this.configure = configure; + }; + ComponentTester.prototype.withResources = function (resources) { + this.resources = resources; + return this; + }; + ComponentTester.prototype.inView = function (html) { + this.html = html; + return this; + }; + ComponentTester.prototype.boundTo = function (bindingContext) { + this.bindingContext = bindingContext; + return this; + }; + ComponentTester.prototype.manuallyHandleLifecycle = function () { + this._prepareLifecycle(); + return this; + }; + ComponentTester.prototype.create = function (bootstrap) { + var _this = this; + return bootstrap(function (aurelia) { + return Promise.resolve(_this.configure(aurelia)).then(function () { + if (_this.resources) { + aurelia.use.globalResources(_this.resources); + } + return aurelia.start().then(function () { + _this.host = document.createElement('div'); + _this.host.innerHTML = _this.html; + document.body.appendChild(_this.host); + return aurelia.enhance(_this.bindingContext, _this.host).then(function () { + _this.rootView = aurelia.root; + _this.element = _this.host.firstElementChild; + if (aurelia.root.controllers.length) { + _this.viewModel = aurelia.root.controllers[0].viewModel; + } + return new Promise(function (resolve) { return setTimeout(function () { return resolve(); }, 0); }); + }); + }); + }); + }); + }; + ComponentTester.prototype.dispose = function () { + if (this.host === undefined || this.rootView === undefined) { + throw new Error('Cannot call ComponentTester.dispose() before ComponentTester.create()'); + } + this.rootView.detached(); + this.rootView.unbind(); + return this.host.parentNode.removeChild(this.host); + }; + ComponentTester.prototype._prepareLifecycle = function () { + var _this = this; + // bind + var bindPrototype = aurelia_templating_1.View.prototype.bind; + // tslint:disable-next-line:no-empty + aurelia_templating_1.View.prototype.bind = function () { }; + this.bind = function (bindingContext) { return new Promise(function (resolve) { + aurelia_templating_1.View.prototype.bind = bindPrototype; + if (bindingContext !== undefined) { + _this.bindingContext = bindingContext; + } + _this.rootView.bind(_this.bindingContext); + setTimeout(function () { return resolve(); }, 0); + }); }; + // attached + var attachedPrototype = aurelia_templating_1.View.prototype.attached; + // tslint:disable-next-line:no-empty + aurelia_templating_1.View.prototype.attached = function () { }; + this.attached = function () { return new Promise(function (resolve) { + aurelia_templating_1.View.prototype.attached = attachedPrototype; + _this.rootView.attached(); + setTimeout(function () { return resolve(); }, 0); + }); }; + // detached + this.detached = function () { return new Promise(function (resolve) { + _this.rootView.detached(); + setTimeout(function () { return resolve(); }, 0); + }); }; + // unbind + this.unbind = function () { return new Promise(function (resolve) { + _this.rootView.unbind(); + setTimeout(function () { return resolve(); }, 0); + }); }; + }; + ComponentTester.prototype.waitForElement = function (selector, options) { + var _this = this; + return wait_1.waitFor(function () { return _this.element.querySelector(selector); }, options); + }; + ComponentTester.prototype.waitForElements = function (selector, options) { + var _this = this; + return wait_1.waitFor(function () { return _this.element.querySelectorAll(selector); }, options); + }; + return ComponentTester; +}()); +exports.ComponentTester = ComponentTester; diff --git a/dist/commonjs/view-spy.d.ts b/dist/commonjs/view-spy.d.ts new file mode 100644 index 0000000..7c2f341 --- /dev/null +++ b/dist/commonjs/view-spy.d.ts @@ -0,0 +1,37 @@ +/** + * Attribute to be placed on any HTML element in a view to emit the View instance + * to the debug console, giving you insight into the live View instance, including + * all child views, live bindings, behaviors and more. + */ +export declare class ViewSpy { + private logger; + private value; + private view; + /** + * Creates a new instance of ViewSpy. + */ + constructor(); + private _log(lifecycleName, context?); + /** + * Invoked when the target view is created. + * @param view The target view. + */ + created(view: any): void; + /** + * Invoked when the target view is bound. + * @param bindingContext The target view's binding context. + */ + bind(bindingContext: {}): void; + /** + * Invoked when the target element is attached to the DOM. + */ + attached(): void; + /** + * Invoked when the target element is detached from the DOM. + */ + detached(): void; + /** + * Invoked when the target element is unbound. + */ + unbind(): void; +} diff --git a/dist/commonjs/view-spy.js b/dist/commonjs/view-spy.js new file mode 100644 index 0000000..278c1ea --- /dev/null +++ b/dist/commonjs/view-spy.js @@ -0,0 +1,69 @@ +"use strict"; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var aurelia_templating_1 = require("aurelia-templating"); +var aurelia_logging_1 = require("aurelia-logging"); +/** + * Attribute to be placed on any HTML element in a view to emit the View instance + * to the debug console, giving you insight into the live View instance, including + * all child views, live bindings, behaviors and more. + */ +var ViewSpy = /** @class */ (function () { + /** + * Creates a new instance of ViewSpy. + */ + function ViewSpy() { + this.logger = aurelia_logging_1.getLogger('view-spy'); + } + ViewSpy.prototype._log = function (lifecycleName, context) { + if (!this.value && lifecycleName === 'created') { + this.logger.info(lifecycleName, this.view); + } + else if (this.value && this.value.indexOf(lifecycleName) !== -1) { + this.logger.info(lifecycleName, this.view, context); + } + }; + /** + * Invoked when the target view is created. + * @param view The target view. + */ + ViewSpy.prototype.created = function (view) { + this.view = view; + this._log('created'); + }; + /** + * Invoked when the target view is bound. + * @param bindingContext The target view's binding context. + */ + ViewSpy.prototype.bind = function (bindingContext) { + this._log('bind', bindingContext); + }; + /** + * Invoked when the target element is attached to the DOM. + */ + ViewSpy.prototype.attached = function () { + this._log('attached'); + }; + /** + * Invoked when the target element is detached from the DOM. + */ + ViewSpy.prototype.detached = function () { + this._log('detached'); + }; + /** + * Invoked when the target element is unbound. + */ + ViewSpy.prototype.unbind = function () { + this._log('unbind'); + }; + ViewSpy = __decorate([ + aurelia_templating_1.customAttribute('view-spy') + ], ViewSpy); + return ViewSpy; +}()); +exports.ViewSpy = ViewSpy; diff --git a/dist/commonjs/wait.d.ts b/dist/commonjs/wait.d.ts new file mode 100644 index 0000000..c58665a --- /dev/null +++ b/dist/commonjs/wait.d.ts @@ -0,0 +1,23 @@ +/** + * Generic function to wait for something to happen. Uses polling + * @param getter: a getter function that returns anything else than `null` or an + * empty array or an empty jQuery object when the + * condition is met + * @param options: lookup options, defaults to + * `{present: true, interval: 50, timeout: 5000}` + */ +export declare function waitFor(getter: () => T, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise; +export declare function waitForDocumentElement(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise; +export declare function waitForDocumentElements(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise>; diff --git a/dist/commonjs/wait.js b/dist/commonjs/wait.js new file mode 100644 index 0000000..a187de5 --- /dev/null +++ b/dist/commonjs/wait.js @@ -0,0 +1,50 @@ +"use strict"; +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Generic function to wait for something to happen. Uses polling + * @param getter: a getter function that returns anything else than `null` or an + * empty array or an empty jQuery object when the + * condition is met + * @param options: lookup options, defaults to + * `{present: true, interval: 50, timeout: 5000}` + */ +function waitFor(getter, options) { + if (options === void 0) { options = { present: true, interval: 50, timeout: 5000 }; } + // prevents infinite recursion if the request times out + var timedOut = false; + options = __assign({ present: true, interval: 50, timeout: 5000 }, options); + function wait() { + var element = getter(); + // boolean is needed here, hence the length > 0 + var found = element !== null && (!(element instanceof NodeList) && + !element.jquery || element.length > 0); + if (!options.present === !found || timedOut) { + return Promise.resolve(element); + } + return new Promise(function (rs) { return setTimeout(rs, options.interval); }).then(wait); + } + return Promise.race([ + new Promise(function (_, rj) { return setTimeout(function () { + timedOut = true; + rj(options.present ? 'Element not found' : 'Element not removed'); + }, options.timeout); }), + wait() + ]); +} +exports.waitFor = waitFor; +function waitForDocumentElement(selector, options) { + return waitFor(function () { return document.querySelector(selector); }, options); +} +exports.waitForDocumentElement = waitForDocumentElement; +function waitForDocumentElements(selector, options) { + return waitFor(function () { return document.querySelectorAll(selector); }, options); +} +exports.waitForDocumentElements = waitForDocumentElements; diff --git a/dist/es2015/aurelia-testing.d.ts b/dist/es2015/aurelia-testing.d.ts new file mode 100644 index 0000000..e83a784 --- /dev/null +++ b/dist/es2015/aurelia-testing.d.ts @@ -0,0 +1,6 @@ +import { FrameworkConfiguration } from 'aurelia-framework'; +export * from './compile-spy'; +export * from './view-spy'; +export * from './component-tester'; +export * from './wait'; +export declare function configure(config: FrameworkConfiguration): void; diff --git a/dist/es2015/aurelia-testing.js b/dist/es2015/aurelia-testing.js new file mode 100644 index 0000000..18b8f94 --- /dev/null +++ b/dist/es2015/aurelia-testing.js @@ -0,0 +1,10 @@ +export * from './compile-spy'; +export * from './view-spy'; +export * from './component-tester'; +export * from './wait'; +export function configure(config) { + config.globalResources([ + './compile-spy', + './view-spy' + ]); +} diff --git a/dist/es2015/compile-spy.d.ts b/dist/es2015/compile-spy.d.ts new file mode 100644 index 0000000..48ff7e9 --- /dev/null +++ b/dist/es2015/compile-spy.d.ts @@ -0,0 +1,14 @@ +import { TargetInstruction } from 'aurelia-templating'; +/** + * Attribute to be placed on any element to have it emit the View Compiler's + * TargetInstruction into the debug console, giving you insight into all the + * parsed bindings, behaviors and event handers for the targeted element. + */ +export declare class CompileSpy { + /** + * Creates and instanse of CompileSpy. + * @param element target element on where attribute is placed on. + * @param instruction instructions for how the target element should be enhanced. + */ + constructor(element: Element, instruction: TargetInstruction); +} diff --git a/dist/es2015/compile-spy.js b/dist/es2015/compile-spy.js new file mode 100644 index 0000000..5174744 --- /dev/null +++ b/dist/es2015/compile-spy.js @@ -0,0 +1,30 @@ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +import { customAttribute, TargetInstruction } from 'aurelia-templating'; +import { inject } from 'aurelia-dependency-injection'; +import { getLogger } from 'aurelia-logging'; +import { DOM } from 'aurelia-pal'; +/** + * Attribute to be placed on any element to have it emit the View Compiler's + * TargetInstruction into the debug console, giving you insight into all the + * parsed bindings, behaviors and event handers for the targeted element. + */ +let CompileSpy = class CompileSpy { + /** + * Creates and instanse of CompileSpy. + * @param element target element on where attribute is placed on. + * @param instruction instructions for how the target element should be enhanced. + */ + constructor(element, instruction) { + getLogger('compile-spy').info(element.toString(), instruction); + } +}; +CompileSpy = __decorate([ + customAttribute('compile-spy'), + inject(DOM.Element, TargetInstruction) +], CompileSpy); +export { CompileSpy }; diff --git a/dist/es2015/component-tester.d.ts b/dist/es2015/component-tester.d.ts new file mode 100644 index 0000000..77bda85 --- /dev/null +++ b/dist/es2015/component-tester.d.ts @@ -0,0 +1,36 @@ +import { Aurelia, FrameworkConfiguration } from 'aurelia-framework'; +export declare class StageComponent { + static withResources(resources?: string | string[]): ComponentTester; +} +export declare class ComponentTester { + bind: (bindingContext: {}) => Promise; + attached: () => Promise; + detached: () => Promise; + unbind: () => Promise; + element: Element; + viewModel: T; + private html; + private resources; + private bindingContext; + private rootView; + private host; + configure(aurelia: Aurelia): FrameworkConfiguration; + bootstrap(configure: (aurelia: Aurelia) => FrameworkConfiguration): void; + withResources(resources: string | string[]): ComponentTester; + inView(html: string): ComponentTester; + boundTo(bindingContext: {}): ComponentTester; + manuallyHandleLifecycle(): ComponentTester; + create(bootstrap: (configure: (aurelia: Aurelia) => Promise) => Promise): Promise; + dispose(): Element; + private _prepareLifecycle(); + waitForElement(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; + }): Promise; + waitForElements(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; + }): Promise>; +} diff --git a/dist/es2015/component-tester.js b/dist/es2015/component-tester.js new file mode 100644 index 0000000..1438717 --- /dev/null +++ b/dist/es2015/component-tester.js @@ -0,0 +1,103 @@ +import { View } from 'aurelia-templating'; +import { waitFor } from './wait'; +export class StageComponent { + static withResources(resources = []) { + return new ComponentTester().withResources(resources); + } +} +export class ComponentTester { + constructor() { + this.resources = []; + } + configure(aurelia) { + return aurelia.use.standardConfiguration(); + } + bootstrap(configure) { + this.configure = configure; + } + withResources(resources) { + this.resources = resources; + return this; + } + inView(html) { + this.html = html; + return this; + } + boundTo(bindingContext) { + this.bindingContext = bindingContext; + return this; + } + manuallyHandleLifecycle() { + this._prepareLifecycle(); + return this; + } + create(bootstrap) { + return bootstrap((aurelia) => { + return Promise.resolve(this.configure(aurelia)).then(() => { + if (this.resources) { + aurelia.use.globalResources(this.resources); + } + return aurelia.start().then(() => { + this.host = document.createElement('div'); + this.host.innerHTML = this.html; + document.body.appendChild(this.host); + return aurelia.enhance(this.bindingContext, this.host).then(() => { + this.rootView = aurelia.root; + this.element = this.host.firstElementChild; + if (aurelia.root.controllers.length) { + this.viewModel = aurelia.root.controllers[0].viewModel; + } + return new Promise(resolve => setTimeout(() => resolve(), 0)); + }); + }); + }); + }); + } + dispose() { + if (this.host === undefined || this.rootView === undefined) { + throw new Error('Cannot call ComponentTester.dispose() before ComponentTester.create()'); + } + this.rootView.detached(); + this.rootView.unbind(); + return this.host.parentNode.removeChild(this.host); + } + _prepareLifecycle() { + // bind + const bindPrototype = View.prototype.bind; + // tslint:disable-next-line:no-empty + View.prototype.bind = () => { }; + this.bind = bindingContext => new Promise(resolve => { + View.prototype.bind = bindPrototype; + if (bindingContext !== undefined) { + this.bindingContext = bindingContext; + } + this.rootView.bind(this.bindingContext); + setTimeout(() => resolve(), 0); + }); + // attached + const attachedPrototype = View.prototype.attached; + // tslint:disable-next-line:no-empty + View.prototype.attached = () => { }; + this.attached = () => new Promise(resolve => { + View.prototype.attached = attachedPrototype; + this.rootView.attached(); + setTimeout(() => resolve(), 0); + }); + // detached + this.detached = () => new Promise(resolve => { + this.rootView.detached(); + setTimeout(() => resolve(), 0); + }); + // unbind + this.unbind = () => new Promise(resolve => { + this.rootView.unbind(); + setTimeout(() => resolve(), 0); + }); + } + waitForElement(selector, options) { + return waitFor(() => this.element.querySelector(selector), options); + } + waitForElements(selector, options) { + return waitFor(() => this.element.querySelectorAll(selector), options); + } +} diff --git a/dist/es2015/view-spy.d.ts b/dist/es2015/view-spy.d.ts new file mode 100644 index 0000000..7c2f341 --- /dev/null +++ b/dist/es2015/view-spy.d.ts @@ -0,0 +1,37 @@ +/** + * Attribute to be placed on any HTML element in a view to emit the View instance + * to the debug console, giving you insight into the live View instance, including + * all child views, live bindings, behaviors and more. + */ +export declare class ViewSpy { + private logger; + private value; + private view; + /** + * Creates a new instance of ViewSpy. + */ + constructor(); + private _log(lifecycleName, context?); + /** + * Invoked when the target view is created. + * @param view The target view. + */ + created(view: any): void; + /** + * Invoked when the target view is bound. + * @param bindingContext The target view's binding context. + */ + bind(bindingContext: {}): void; + /** + * Invoked when the target element is attached to the DOM. + */ + attached(): void; + /** + * Invoked when the target element is detached from the DOM. + */ + detached(): void; + /** + * Invoked when the target element is unbound. + */ + unbind(): void; +} diff --git a/dist/es2015/view-spy.js b/dist/es2015/view-spy.js new file mode 100644 index 0000000..74dab7f --- /dev/null +++ b/dist/es2015/view-spy.js @@ -0,0 +1,66 @@ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +import { customAttribute } from 'aurelia-templating'; +import { getLogger } from 'aurelia-logging'; +/** + * Attribute to be placed on any HTML element in a view to emit the View instance + * to the debug console, giving you insight into the live View instance, including + * all child views, live bindings, behaviors and more. + */ +let ViewSpy = class ViewSpy { + /** + * Creates a new instance of ViewSpy. + */ + constructor() { + this.logger = getLogger('view-spy'); + } + _log(lifecycleName, context) { + if (!this.value && lifecycleName === 'created') { + this.logger.info(lifecycleName, this.view); + } + else if (this.value && this.value.indexOf(lifecycleName) !== -1) { + this.logger.info(lifecycleName, this.view, context); + } + } + /** + * Invoked when the target view is created. + * @param view The target view. + */ + created(view) { + this.view = view; + this._log('created'); + } + /** + * Invoked when the target view is bound. + * @param bindingContext The target view's binding context. + */ + bind(bindingContext) { + this._log('bind', bindingContext); + } + /** + * Invoked when the target element is attached to the DOM. + */ + attached() { + this._log('attached'); + } + /** + * Invoked when the target element is detached from the DOM. + */ + detached() { + this._log('detached'); + } + /** + * Invoked when the target element is unbound. + */ + unbind() { + this._log('unbind'); + } +}; +ViewSpy = __decorate([ + customAttribute('view-spy') +], ViewSpy); +export { ViewSpy }; diff --git a/dist/es2015/wait.d.ts b/dist/es2015/wait.d.ts new file mode 100644 index 0000000..c58665a --- /dev/null +++ b/dist/es2015/wait.d.ts @@ -0,0 +1,23 @@ +/** + * Generic function to wait for something to happen. Uses polling + * @param getter: a getter function that returns anything else than `null` or an + * empty array or an empty jQuery object when the + * condition is met + * @param options: lookup options, defaults to + * `{present: true, interval: 50, timeout: 5000}` + */ +export declare function waitFor(getter: () => T, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise; +export declare function waitForDocumentElement(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise; +export declare function waitForDocumentElements(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise>; diff --git a/dist/es2015/wait.js b/dist/es2015/wait.js new file mode 100644 index 0000000..5835398 --- /dev/null +++ b/dist/es2015/wait.js @@ -0,0 +1,36 @@ +/** + * Generic function to wait for something to happen. Uses polling + * @param getter: a getter function that returns anything else than `null` or an + * empty array or an empty jQuery object when the + * condition is met + * @param options: lookup options, defaults to + * `{present: true, interval: 50, timeout: 5000}` + */ +export function waitFor(getter, options = { present: true, interval: 50, timeout: 5000 }) { + // prevents infinite recursion if the request times out + let timedOut = false; + options = Object.assign({ present: true, interval: 50, timeout: 5000 }, options); + function wait() { + const element = getter(); + // boolean is needed here, hence the length > 0 + const found = element !== null && (!(element instanceof NodeList) && + !element.jquery || element.length > 0); + if (!options.present === !found || timedOut) { + return Promise.resolve(element); + } + return new Promise(rs => setTimeout(rs, options.interval)).then(wait); + } + return Promise.race([ + new Promise((_, rj) => setTimeout(() => { + timedOut = true; + rj(options.present ? 'Element not found' : 'Element not removed'); + }, options.timeout)), + wait() + ]); +} +export function waitForDocumentElement(selector, options) { + return waitFor(() => document.querySelector(selector), options); +} +export function waitForDocumentElements(selector, options) { + return waitFor(() => document.querySelectorAll(selector), options); +} diff --git a/dist/es2017/aurelia-testing.d.ts b/dist/es2017/aurelia-testing.d.ts new file mode 100644 index 0000000..e83a784 --- /dev/null +++ b/dist/es2017/aurelia-testing.d.ts @@ -0,0 +1,6 @@ +import { FrameworkConfiguration } from 'aurelia-framework'; +export * from './compile-spy'; +export * from './view-spy'; +export * from './component-tester'; +export * from './wait'; +export declare function configure(config: FrameworkConfiguration): void; diff --git a/dist/es2017/aurelia-testing.js b/dist/es2017/aurelia-testing.js new file mode 100644 index 0000000..18b8f94 --- /dev/null +++ b/dist/es2017/aurelia-testing.js @@ -0,0 +1,10 @@ +export * from './compile-spy'; +export * from './view-spy'; +export * from './component-tester'; +export * from './wait'; +export function configure(config) { + config.globalResources([ + './compile-spy', + './view-spy' + ]); +} diff --git a/dist/es2017/compile-spy.d.ts b/dist/es2017/compile-spy.d.ts new file mode 100644 index 0000000..48ff7e9 --- /dev/null +++ b/dist/es2017/compile-spy.d.ts @@ -0,0 +1,14 @@ +import { TargetInstruction } from 'aurelia-templating'; +/** + * Attribute to be placed on any element to have it emit the View Compiler's + * TargetInstruction into the debug console, giving you insight into all the + * parsed bindings, behaviors and event handers for the targeted element. + */ +export declare class CompileSpy { + /** + * Creates and instanse of CompileSpy. + * @param element target element on where attribute is placed on. + * @param instruction instructions for how the target element should be enhanced. + */ + constructor(element: Element, instruction: TargetInstruction); +} diff --git a/dist/es2017/compile-spy.js b/dist/es2017/compile-spy.js new file mode 100644 index 0000000..5174744 --- /dev/null +++ b/dist/es2017/compile-spy.js @@ -0,0 +1,30 @@ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +import { customAttribute, TargetInstruction } from 'aurelia-templating'; +import { inject } from 'aurelia-dependency-injection'; +import { getLogger } from 'aurelia-logging'; +import { DOM } from 'aurelia-pal'; +/** + * Attribute to be placed on any element to have it emit the View Compiler's + * TargetInstruction into the debug console, giving you insight into all the + * parsed bindings, behaviors and event handers for the targeted element. + */ +let CompileSpy = class CompileSpy { + /** + * Creates and instanse of CompileSpy. + * @param element target element on where attribute is placed on. + * @param instruction instructions for how the target element should be enhanced. + */ + constructor(element, instruction) { + getLogger('compile-spy').info(element.toString(), instruction); + } +}; +CompileSpy = __decorate([ + customAttribute('compile-spy'), + inject(DOM.Element, TargetInstruction) +], CompileSpy); +export { CompileSpy }; diff --git a/dist/es2017/component-tester.d.ts b/dist/es2017/component-tester.d.ts new file mode 100644 index 0000000..77bda85 --- /dev/null +++ b/dist/es2017/component-tester.d.ts @@ -0,0 +1,36 @@ +import { Aurelia, FrameworkConfiguration } from 'aurelia-framework'; +export declare class StageComponent { + static withResources(resources?: string | string[]): ComponentTester; +} +export declare class ComponentTester { + bind: (bindingContext: {}) => Promise; + attached: () => Promise; + detached: () => Promise; + unbind: () => Promise; + element: Element; + viewModel: T; + private html; + private resources; + private bindingContext; + private rootView; + private host; + configure(aurelia: Aurelia): FrameworkConfiguration; + bootstrap(configure: (aurelia: Aurelia) => FrameworkConfiguration): void; + withResources(resources: string | string[]): ComponentTester; + inView(html: string): ComponentTester; + boundTo(bindingContext: {}): ComponentTester; + manuallyHandleLifecycle(): ComponentTester; + create(bootstrap: (configure: (aurelia: Aurelia) => Promise) => Promise): Promise; + dispose(): Element; + private _prepareLifecycle(); + waitForElement(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; + }): Promise; + waitForElements(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; + }): Promise>; +} diff --git a/dist/es2017/component-tester.js b/dist/es2017/component-tester.js new file mode 100644 index 0000000..1438717 --- /dev/null +++ b/dist/es2017/component-tester.js @@ -0,0 +1,103 @@ +import { View } from 'aurelia-templating'; +import { waitFor } from './wait'; +export class StageComponent { + static withResources(resources = []) { + return new ComponentTester().withResources(resources); + } +} +export class ComponentTester { + constructor() { + this.resources = []; + } + configure(aurelia) { + return aurelia.use.standardConfiguration(); + } + bootstrap(configure) { + this.configure = configure; + } + withResources(resources) { + this.resources = resources; + return this; + } + inView(html) { + this.html = html; + return this; + } + boundTo(bindingContext) { + this.bindingContext = bindingContext; + return this; + } + manuallyHandleLifecycle() { + this._prepareLifecycle(); + return this; + } + create(bootstrap) { + return bootstrap((aurelia) => { + return Promise.resolve(this.configure(aurelia)).then(() => { + if (this.resources) { + aurelia.use.globalResources(this.resources); + } + return aurelia.start().then(() => { + this.host = document.createElement('div'); + this.host.innerHTML = this.html; + document.body.appendChild(this.host); + return aurelia.enhance(this.bindingContext, this.host).then(() => { + this.rootView = aurelia.root; + this.element = this.host.firstElementChild; + if (aurelia.root.controllers.length) { + this.viewModel = aurelia.root.controllers[0].viewModel; + } + return new Promise(resolve => setTimeout(() => resolve(), 0)); + }); + }); + }); + }); + } + dispose() { + if (this.host === undefined || this.rootView === undefined) { + throw new Error('Cannot call ComponentTester.dispose() before ComponentTester.create()'); + } + this.rootView.detached(); + this.rootView.unbind(); + return this.host.parentNode.removeChild(this.host); + } + _prepareLifecycle() { + // bind + const bindPrototype = View.prototype.bind; + // tslint:disable-next-line:no-empty + View.prototype.bind = () => { }; + this.bind = bindingContext => new Promise(resolve => { + View.prototype.bind = bindPrototype; + if (bindingContext !== undefined) { + this.bindingContext = bindingContext; + } + this.rootView.bind(this.bindingContext); + setTimeout(() => resolve(), 0); + }); + // attached + const attachedPrototype = View.prototype.attached; + // tslint:disable-next-line:no-empty + View.prototype.attached = () => { }; + this.attached = () => new Promise(resolve => { + View.prototype.attached = attachedPrototype; + this.rootView.attached(); + setTimeout(() => resolve(), 0); + }); + // detached + this.detached = () => new Promise(resolve => { + this.rootView.detached(); + setTimeout(() => resolve(), 0); + }); + // unbind + this.unbind = () => new Promise(resolve => { + this.rootView.unbind(); + setTimeout(() => resolve(), 0); + }); + } + waitForElement(selector, options) { + return waitFor(() => this.element.querySelector(selector), options); + } + waitForElements(selector, options) { + return waitFor(() => this.element.querySelectorAll(selector), options); + } +} diff --git a/dist/es2017/view-spy.d.ts b/dist/es2017/view-spy.d.ts new file mode 100644 index 0000000..7c2f341 --- /dev/null +++ b/dist/es2017/view-spy.d.ts @@ -0,0 +1,37 @@ +/** + * Attribute to be placed on any HTML element in a view to emit the View instance + * to the debug console, giving you insight into the live View instance, including + * all child views, live bindings, behaviors and more. + */ +export declare class ViewSpy { + private logger; + private value; + private view; + /** + * Creates a new instance of ViewSpy. + */ + constructor(); + private _log(lifecycleName, context?); + /** + * Invoked when the target view is created. + * @param view The target view. + */ + created(view: any): void; + /** + * Invoked when the target view is bound. + * @param bindingContext The target view's binding context. + */ + bind(bindingContext: {}): void; + /** + * Invoked when the target element is attached to the DOM. + */ + attached(): void; + /** + * Invoked when the target element is detached from the DOM. + */ + detached(): void; + /** + * Invoked when the target element is unbound. + */ + unbind(): void; +} diff --git a/dist/es2017/view-spy.js b/dist/es2017/view-spy.js new file mode 100644 index 0000000..74dab7f --- /dev/null +++ b/dist/es2017/view-spy.js @@ -0,0 +1,66 @@ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +import { customAttribute } from 'aurelia-templating'; +import { getLogger } from 'aurelia-logging'; +/** + * Attribute to be placed on any HTML element in a view to emit the View instance + * to the debug console, giving you insight into the live View instance, including + * all child views, live bindings, behaviors and more. + */ +let ViewSpy = class ViewSpy { + /** + * Creates a new instance of ViewSpy. + */ + constructor() { + this.logger = getLogger('view-spy'); + } + _log(lifecycleName, context) { + if (!this.value && lifecycleName === 'created') { + this.logger.info(lifecycleName, this.view); + } + else if (this.value && this.value.indexOf(lifecycleName) !== -1) { + this.logger.info(lifecycleName, this.view, context); + } + } + /** + * Invoked when the target view is created. + * @param view The target view. + */ + created(view) { + this.view = view; + this._log('created'); + } + /** + * Invoked when the target view is bound. + * @param bindingContext The target view's binding context. + */ + bind(bindingContext) { + this._log('bind', bindingContext); + } + /** + * Invoked when the target element is attached to the DOM. + */ + attached() { + this._log('attached'); + } + /** + * Invoked when the target element is detached from the DOM. + */ + detached() { + this._log('detached'); + } + /** + * Invoked when the target element is unbound. + */ + unbind() { + this._log('unbind'); + } +}; +ViewSpy = __decorate([ + customAttribute('view-spy') +], ViewSpy); +export { ViewSpy }; diff --git a/dist/es2017/wait.d.ts b/dist/es2017/wait.d.ts new file mode 100644 index 0000000..c58665a --- /dev/null +++ b/dist/es2017/wait.d.ts @@ -0,0 +1,23 @@ +/** + * Generic function to wait for something to happen. Uses polling + * @param getter: a getter function that returns anything else than `null` or an + * empty array or an empty jQuery object when the + * condition is met + * @param options: lookup options, defaults to + * `{present: true, interval: 50, timeout: 5000}` + */ +export declare function waitFor(getter: () => T, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise; +export declare function waitForDocumentElement(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise; +export declare function waitForDocumentElements(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise>; diff --git a/dist/es2017/wait.js b/dist/es2017/wait.js new file mode 100644 index 0000000..5835398 --- /dev/null +++ b/dist/es2017/wait.js @@ -0,0 +1,36 @@ +/** + * Generic function to wait for something to happen. Uses polling + * @param getter: a getter function that returns anything else than `null` or an + * empty array or an empty jQuery object when the + * condition is met + * @param options: lookup options, defaults to + * `{present: true, interval: 50, timeout: 5000}` + */ +export function waitFor(getter, options = { present: true, interval: 50, timeout: 5000 }) { + // prevents infinite recursion if the request times out + let timedOut = false; + options = Object.assign({ present: true, interval: 50, timeout: 5000 }, options); + function wait() { + const element = getter(); + // boolean is needed here, hence the length > 0 + const found = element !== null && (!(element instanceof NodeList) && + !element.jquery || element.length > 0); + if (!options.present === !found || timedOut) { + return Promise.resolve(element); + } + return new Promise(rs => setTimeout(rs, options.interval)).then(wait); + } + return Promise.race([ + new Promise((_, rj) => setTimeout(() => { + timedOut = true; + rj(options.present ? 'Element not found' : 'Element not removed'); + }, options.timeout)), + wait() + ]); +} +export function waitForDocumentElement(selector, options) { + return waitFor(() => document.querySelector(selector), options); +} +export function waitForDocumentElements(selector, options) { + return waitFor(() => document.querySelectorAll(selector), options); +} diff --git a/dist/native-modules/aurelia-testing.d.ts b/dist/native-modules/aurelia-testing.d.ts new file mode 100644 index 0000000..e83a784 --- /dev/null +++ b/dist/native-modules/aurelia-testing.d.ts @@ -0,0 +1,6 @@ +import { FrameworkConfiguration } from 'aurelia-framework'; +export * from './compile-spy'; +export * from './view-spy'; +export * from './component-tester'; +export * from './wait'; +export declare function configure(config: FrameworkConfiguration): void; diff --git a/dist/native-modules/aurelia-testing.js b/dist/native-modules/aurelia-testing.js new file mode 100644 index 0000000..18b8f94 --- /dev/null +++ b/dist/native-modules/aurelia-testing.js @@ -0,0 +1,10 @@ +export * from './compile-spy'; +export * from './view-spy'; +export * from './component-tester'; +export * from './wait'; +export function configure(config) { + config.globalResources([ + './compile-spy', + './view-spy' + ]); +} diff --git a/dist/native-modules/compile-spy.d.ts b/dist/native-modules/compile-spy.d.ts new file mode 100644 index 0000000..48ff7e9 --- /dev/null +++ b/dist/native-modules/compile-spy.d.ts @@ -0,0 +1,14 @@ +import { TargetInstruction } from 'aurelia-templating'; +/** + * Attribute to be placed on any element to have it emit the View Compiler's + * TargetInstruction into the debug console, giving you insight into all the + * parsed bindings, behaviors and event handers for the targeted element. + */ +export declare class CompileSpy { + /** + * Creates and instanse of CompileSpy. + * @param element target element on where attribute is placed on. + * @param instruction instructions for how the target element should be enhanced. + */ + constructor(element: Element, instruction: TargetInstruction); +} diff --git a/dist/native-modules/compile-spy.js b/dist/native-modules/compile-spy.js new file mode 100644 index 0000000..f46e11e --- /dev/null +++ b/dist/native-modules/compile-spy.js @@ -0,0 +1,31 @@ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +import { customAttribute, TargetInstruction } from 'aurelia-templating'; +import { inject } from 'aurelia-dependency-injection'; +import { getLogger } from 'aurelia-logging'; +import { DOM } from 'aurelia-pal'; +/** + * Attribute to be placed on any element to have it emit the View Compiler's + * TargetInstruction into the debug console, giving you insight into all the + * parsed bindings, behaviors and event handers for the targeted element. + */ +var CompileSpy = /** @class */ (function () { + /** + * Creates and instanse of CompileSpy. + * @param element target element on where attribute is placed on. + * @param instruction instructions for how the target element should be enhanced. + */ + function CompileSpy(element, instruction) { + getLogger('compile-spy').info(element.toString(), instruction); + } + CompileSpy = __decorate([ + customAttribute('compile-spy'), + inject(DOM.Element, TargetInstruction) + ], CompileSpy); + return CompileSpy; +}()); +export { CompileSpy }; diff --git a/dist/native-modules/component-tester.d.ts b/dist/native-modules/component-tester.d.ts new file mode 100644 index 0000000..77bda85 --- /dev/null +++ b/dist/native-modules/component-tester.d.ts @@ -0,0 +1,36 @@ +import { Aurelia, FrameworkConfiguration } from 'aurelia-framework'; +export declare class StageComponent { + static withResources(resources?: string | string[]): ComponentTester; +} +export declare class ComponentTester { + bind: (bindingContext: {}) => Promise; + attached: () => Promise; + detached: () => Promise; + unbind: () => Promise; + element: Element; + viewModel: T; + private html; + private resources; + private bindingContext; + private rootView; + private host; + configure(aurelia: Aurelia): FrameworkConfiguration; + bootstrap(configure: (aurelia: Aurelia) => FrameworkConfiguration): void; + withResources(resources: string | string[]): ComponentTester; + inView(html: string): ComponentTester; + boundTo(bindingContext: {}): ComponentTester; + manuallyHandleLifecycle(): ComponentTester; + create(bootstrap: (configure: (aurelia: Aurelia) => Promise) => Promise): Promise; + dispose(): Element; + private _prepareLifecycle(); + waitForElement(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; + }): Promise; + waitForElements(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; + }): Promise>; +} diff --git a/dist/native-modules/component-tester.js b/dist/native-modules/component-tester.js new file mode 100644 index 0000000..842ebdb --- /dev/null +++ b/dist/native-modules/component-tester.js @@ -0,0 +1,114 @@ +import { View } from 'aurelia-templating'; +import { waitFor } from './wait'; +var StageComponent = /** @class */ (function () { + function StageComponent() { + } + StageComponent.withResources = function (resources) { + if (resources === void 0) { resources = []; } + return new ComponentTester().withResources(resources); + }; + return StageComponent; +}()); +export { StageComponent }; +var ComponentTester = /** @class */ (function () { + function ComponentTester() { + this.resources = []; + } + ComponentTester.prototype.configure = function (aurelia) { + return aurelia.use.standardConfiguration(); + }; + ComponentTester.prototype.bootstrap = function (configure) { + this.configure = configure; + }; + ComponentTester.prototype.withResources = function (resources) { + this.resources = resources; + return this; + }; + ComponentTester.prototype.inView = function (html) { + this.html = html; + return this; + }; + ComponentTester.prototype.boundTo = function (bindingContext) { + this.bindingContext = bindingContext; + return this; + }; + ComponentTester.prototype.manuallyHandleLifecycle = function () { + this._prepareLifecycle(); + return this; + }; + ComponentTester.prototype.create = function (bootstrap) { + var _this = this; + return bootstrap(function (aurelia) { + return Promise.resolve(_this.configure(aurelia)).then(function () { + if (_this.resources) { + aurelia.use.globalResources(_this.resources); + } + return aurelia.start().then(function () { + _this.host = document.createElement('div'); + _this.host.innerHTML = _this.html; + document.body.appendChild(_this.host); + return aurelia.enhance(_this.bindingContext, _this.host).then(function () { + _this.rootView = aurelia.root; + _this.element = _this.host.firstElementChild; + if (aurelia.root.controllers.length) { + _this.viewModel = aurelia.root.controllers[0].viewModel; + } + return new Promise(function (resolve) { return setTimeout(function () { return resolve(); }, 0); }); + }); + }); + }); + }); + }; + ComponentTester.prototype.dispose = function () { + if (this.host === undefined || this.rootView === undefined) { + throw new Error('Cannot call ComponentTester.dispose() before ComponentTester.create()'); + } + this.rootView.detached(); + this.rootView.unbind(); + return this.host.parentNode.removeChild(this.host); + }; + ComponentTester.prototype._prepareLifecycle = function () { + var _this = this; + // bind + var bindPrototype = View.prototype.bind; + // tslint:disable-next-line:no-empty + View.prototype.bind = function () { }; + this.bind = function (bindingContext) { return new Promise(function (resolve) { + View.prototype.bind = bindPrototype; + if (bindingContext !== undefined) { + _this.bindingContext = bindingContext; + } + _this.rootView.bind(_this.bindingContext); + setTimeout(function () { return resolve(); }, 0); + }); }; + // attached + var attachedPrototype = View.prototype.attached; + // tslint:disable-next-line:no-empty + View.prototype.attached = function () { }; + this.attached = function () { return new Promise(function (resolve) { + View.prototype.attached = attachedPrototype; + _this.rootView.attached(); + setTimeout(function () { return resolve(); }, 0); + }); }; + // detached + this.detached = function () { return new Promise(function (resolve) { + _this.rootView.detached(); + setTimeout(function () { return resolve(); }, 0); + }); }; + // unbind + this.unbind = function () { return new Promise(function (resolve) { + _this.rootView.unbind(); + setTimeout(function () { return resolve(); }, 0); + }); }; + }; + ComponentTester.prototype.waitForElement = function (selector, options) { + var _this = this; + return waitFor(function () { return _this.element.querySelector(selector); }, options); + }; + ComponentTester.prototype.waitForElements = function (selector, options) { + var _this = this; + return waitFor(function () { return _this.element.querySelectorAll(selector); }, options); + }; + return ComponentTester; +}()); +export { ComponentTester }; diff --git a/dist/native-modules/view-spy.d.ts b/dist/native-modules/view-spy.d.ts new file mode 100644 index 0000000..7c2f341 --- /dev/null +++ b/dist/native-modules/view-spy.d.ts @@ -0,0 +1,37 @@ +/** + * Attribute to be placed on any HTML element in a view to emit the View instance + * to the debug console, giving you insight into the live View instance, including + * all child views, live bindings, behaviors and more. + */ +export declare class ViewSpy { + private logger; + private value; + private view; + /** + * Creates a new instance of ViewSpy. + */ + constructor(); + private _log(lifecycleName, context?); + /** + * Invoked when the target view is created. + * @param view The target view. + */ + created(view: any): void; + /** + * Invoked when the target view is bound. + * @param bindingContext The target view's binding context. + */ + bind(bindingContext: {}): void; + /** + * Invoked when the target element is attached to the DOM. + */ + attached(): void; + /** + * Invoked when the target element is detached from the DOM. + */ + detached(): void; + /** + * Invoked when the target element is unbound. + */ + unbind(): void; +} diff --git a/dist/native-modules/view-spy.js b/dist/native-modules/view-spy.js new file mode 100644 index 0000000..49c0d78 --- /dev/null +++ b/dist/native-modules/view-spy.js @@ -0,0 +1,67 @@ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +import { customAttribute } from 'aurelia-templating'; +import { getLogger } from 'aurelia-logging'; +/** + * Attribute to be placed on any HTML element in a view to emit the View instance + * to the debug console, giving you insight into the live View instance, including + * all child views, live bindings, behaviors and more. + */ +var ViewSpy = /** @class */ (function () { + /** + * Creates a new instance of ViewSpy. + */ + function ViewSpy() { + this.logger = getLogger('view-spy'); + } + ViewSpy.prototype._log = function (lifecycleName, context) { + if (!this.value && lifecycleName === 'created') { + this.logger.info(lifecycleName, this.view); + } + else if (this.value && this.value.indexOf(lifecycleName) !== -1) { + this.logger.info(lifecycleName, this.view, context); + } + }; + /** + * Invoked when the target view is created. + * @param view The target view. + */ + ViewSpy.prototype.created = function (view) { + this.view = view; + this._log('created'); + }; + /** + * Invoked when the target view is bound. + * @param bindingContext The target view's binding context. + */ + ViewSpy.prototype.bind = function (bindingContext) { + this._log('bind', bindingContext); + }; + /** + * Invoked when the target element is attached to the DOM. + */ + ViewSpy.prototype.attached = function () { + this._log('attached'); + }; + /** + * Invoked when the target element is detached from the DOM. + */ + ViewSpy.prototype.detached = function () { + this._log('detached'); + }; + /** + * Invoked when the target element is unbound. + */ + ViewSpy.prototype.unbind = function () { + this._log('unbind'); + }; + ViewSpy = __decorate([ + customAttribute('view-spy') + ], ViewSpy); + return ViewSpy; +}()); +export { ViewSpy }; diff --git a/dist/native-modules/wait.d.ts b/dist/native-modules/wait.d.ts new file mode 100644 index 0000000..c58665a --- /dev/null +++ b/dist/native-modules/wait.d.ts @@ -0,0 +1,23 @@ +/** + * Generic function to wait for something to happen. Uses polling + * @param getter: a getter function that returns anything else than `null` or an + * empty array or an empty jQuery object when the + * condition is met + * @param options: lookup options, defaults to + * `{present: true, interval: 50, timeout: 5000}` + */ +export declare function waitFor(getter: () => T, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise; +export declare function waitForDocumentElement(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise; +export declare function waitForDocumentElements(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise>; diff --git a/dist/native-modules/wait.js b/dist/native-modules/wait.js new file mode 100644 index 0000000..c5d2b03 --- /dev/null +++ b/dist/native-modules/wait.js @@ -0,0 +1,45 @@ +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +/** + * Generic function to wait for something to happen. Uses polling + * @param getter: a getter function that returns anything else than `null` or an + * empty array or an empty jQuery object when the + * condition is met + * @param options: lookup options, defaults to + * `{present: true, interval: 50, timeout: 5000}` + */ +export function waitFor(getter, options) { + if (options === void 0) { options = { present: true, interval: 50, timeout: 5000 }; } + // prevents infinite recursion if the request times out + var timedOut = false; + options = __assign({ present: true, interval: 50, timeout: 5000 }, options); + function wait() { + var element = getter(); + // boolean is needed here, hence the length > 0 + var found = element !== null && (!(element instanceof NodeList) && + !element.jquery || element.length > 0); + if (!options.present === !found || timedOut) { + return Promise.resolve(element); + } + return new Promise(function (rs) { return setTimeout(rs, options.interval); }).then(wait); + } + return Promise.race([ + new Promise(function (_, rj) { return setTimeout(function () { + timedOut = true; + rj(options.present ? 'Element not found' : 'Element not removed'); + }, options.timeout); }), + wait() + ]); +} +export function waitForDocumentElement(selector, options) { + return waitFor(function () { return document.querySelector(selector); }, options); +} +export function waitForDocumentElements(selector, options) { + return waitFor(function () { return document.querySelectorAll(selector); }, options); +} diff --git a/dist/system/aurelia-testing.d.ts b/dist/system/aurelia-testing.d.ts new file mode 100644 index 0000000..e83a784 --- /dev/null +++ b/dist/system/aurelia-testing.d.ts @@ -0,0 +1,6 @@ +import { FrameworkConfiguration } from 'aurelia-framework'; +export * from './compile-spy'; +export * from './view-spy'; +export * from './component-tester'; +export * from './wait'; +export declare function configure(config: FrameworkConfiguration): void; diff --git a/dist/system/aurelia-testing.js b/dist/system/aurelia-testing.js new file mode 100644 index 0000000..03eb560 --- /dev/null +++ b/dist/system/aurelia-testing.js @@ -0,0 +1,39 @@ +System.register(["./compile-spy", "./view-spy", "./component-tester", "./wait"], function (exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + function configure(config) { + config.globalResources([ + './compile-spy', + './view-spy' + ]); + } + exports_1("configure", configure); + var exportedNames_1 = { + "configure": true + }; + function exportStar_1(m) { + var exports = {}; + for (var n in m) { + if (n !== "default" && !exportedNames_1.hasOwnProperty(n)) exports[n] = m[n]; + } + exports_1(exports); + } + return { + setters: [ + function (compile_spy_1_1) { + exportStar_1(compile_spy_1_1); + }, + function (view_spy_1_1) { + exportStar_1(view_spy_1_1); + }, + function (component_tester_1_1) { + exportStar_1(component_tester_1_1); + }, + function (wait_1_1) { + exportStar_1(wait_1_1); + } + ], + execute: function () { + } + }; +}); diff --git a/dist/system/compile-spy.d.ts b/dist/system/compile-spy.d.ts new file mode 100644 index 0000000..48ff7e9 --- /dev/null +++ b/dist/system/compile-spy.d.ts @@ -0,0 +1,14 @@ +import { TargetInstruction } from 'aurelia-templating'; +/** + * Attribute to be placed on any element to have it emit the View Compiler's + * TargetInstruction into the debug console, giving you insight into all the + * parsed bindings, behaviors and event handers for the targeted element. + */ +export declare class CompileSpy { + /** + * Creates and instanse of CompileSpy. + * @param element target element on where attribute is placed on. + * @param instruction instructions for how the target element should be enhanced. + */ + constructor(element: Element, instruction: TargetInstruction); +} diff --git a/dist/system/compile-spy.js b/dist/system/compile-spy.js new file mode 100644 index 0000000..bed093c --- /dev/null +++ b/dist/system/compile-spy.js @@ -0,0 +1,45 @@ +System.register(["aurelia-templating", "aurelia-dependency-injection", "aurelia-logging", "aurelia-pal"], function (exports_1, context_1) { + "use strict"; + var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __moduleName = context_1 && context_1.id; + var aurelia_templating_1, aurelia_dependency_injection_1, aurelia_logging_1, aurelia_pal_1, CompileSpy; + return { + setters: [ + function (aurelia_templating_1_1) { + aurelia_templating_1 = aurelia_templating_1_1; + }, + function (aurelia_dependency_injection_1_1) { + aurelia_dependency_injection_1 = aurelia_dependency_injection_1_1; + }, + function (aurelia_logging_1_1) { + aurelia_logging_1 = aurelia_logging_1_1; + }, + function (aurelia_pal_1_1) { + aurelia_pal_1 = aurelia_pal_1_1; + } + ], + execute: function () { + CompileSpy = /** @class */ (function () { + /** + * Creates and instanse of CompileSpy. + * @param element target element on where attribute is placed on. + * @param instruction instructions for how the target element should be enhanced. + */ + function CompileSpy(element, instruction) { + aurelia_logging_1.getLogger('compile-spy').info(element.toString(), instruction); + } + CompileSpy = __decorate([ + aurelia_templating_1.customAttribute('compile-spy'), + aurelia_dependency_injection_1.inject(aurelia_pal_1.DOM.Element, aurelia_templating_1.TargetInstruction) + ], CompileSpy); + return CompileSpy; + }()); + exports_1("CompileSpy", CompileSpy); + } + }; +}); diff --git a/dist/system/component-tester.d.ts b/dist/system/component-tester.d.ts new file mode 100644 index 0000000..77bda85 --- /dev/null +++ b/dist/system/component-tester.d.ts @@ -0,0 +1,36 @@ +import { Aurelia, FrameworkConfiguration } from 'aurelia-framework'; +export declare class StageComponent { + static withResources(resources?: string | string[]): ComponentTester; +} +export declare class ComponentTester { + bind: (bindingContext: {}) => Promise; + attached: () => Promise; + detached: () => Promise; + unbind: () => Promise; + element: Element; + viewModel: T; + private html; + private resources; + private bindingContext; + private rootView; + private host; + configure(aurelia: Aurelia): FrameworkConfiguration; + bootstrap(configure: (aurelia: Aurelia) => FrameworkConfiguration): void; + withResources(resources: string | string[]): ComponentTester; + inView(html: string): ComponentTester; + boundTo(bindingContext: {}): ComponentTester; + manuallyHandleLifecycle(): ComponentTester; + create(bootstrap: (configure: (aurelia: Aurelia) => Promise) => Promise): Promise; + dispose(): Element; + private _prepareLifecycle(); + waitForElement(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; + }): Promise; + waitForElements(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; + }): Promise>; +} diff --git a/dist/system/component-tester.js b/dist/system/component-tester.js new file mode 100644 index 0000000..6907195 --- /dev/null +++ b/dist/system/component-tester.js @@ -0,0 +1,129 @@ +System.register(["aurelia-templating", "./wait"], function (exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + var aurelia_templating_1, wait_1, StageComponent, ComponentTester; + return { + setters: [ + function (aurelia_templating_1_1) { + aurelia_templating_1 = aurelia_templating_1_1; + }, + function (wait_1_1) { + wait_1 = wait_1_1; + } + ], + execute: function () { + StageComponent = /** @class */ (function () { + function StageComponent() { + } + StageComponent.withResources = function (resources) { + if (resources === void 0) { resources = []; } + return new ComponentTester().withResources(resources); + }; + return StageComponent; + }()); + exports_1("StageComponent", StageComponent); + ComponentTester = /** @class */ (function () { + function ComponentTester() { + this.resources = []; + } + ComponentTester.prototype.configure = function (aurelia) { + return aurelia.use.standardConfiguration(); + }; + ComponentTester.prototype.bootstrap = function (configure) { + this.configure = configure; + }; + ComponentTester.prototype.withResources = function (resources) { + this.resources = resources; + return this; + }; + ComponentTester.prototype.inView = function (html) { + this.html = html; + return this; + }; + ComponentTester.prototype.boundTo = function (bindingContext) { + this.bindingContext = bindingContext; + return this; + }; + ComponentTester.prototype.manuallyHandleLifecycle = function () { + this._prepareLifecycle(); + return this; + }; + ComponentTester.prototype.create = function (bootstrap) { + var _this = this; + return bootstrap(function (aurelia) { + return Promise.resolve(_this.configure(aurelia)).then(function () { + if (_this.resources) { + aurelia.use.globalResources(_this.resources); + } + return aurelia.start().then(function () { + _this.host = document.createElement('div'); + _this.host.innerHTML = _this.html; + document.body.appendChild(_this.host); + return aurelia.enhance(_this.bindingContext, _this.host).then(function () { + _this.rootView = aurelia.root; + _this.element = _this.host.firstElementChild; + if (aurelia.root.controllers.length) { + _this.viewModel = aurelia.root.controllers[0].viewModel; + } + return new Promise(function (resolve) { return setTimeout(function () { return resolve(); }, 0); }); + }); + }); + }); + }); + }; + ComponentTester.prototype.dispose = function () { + if (this.host === undefined || this.rootView === undefined) { + throw new Error('Cannot call ComponentTester.dispose() before ComponentTester.create()'); + } + this.rootView.detached(); + this.rootView.unbind(); + return this.host.parentNode.removeChild(this.host); + }; + ComponentTester.prototype._prepareLifecycle = function () { + var _this = this; + // bind + var bindPrototype = aurelia_templating_1.View.prototype.bind; + // tslint:disable-next-line:no-empty + aurelia_templating_1.View.prototype.bind = function () { }; + this.bind = function (bindingContext) { return new Promise(function (resolve) { + aurelia_templating_1.View.prototype.bind = bindPrototype; + if (bindingContext !== undefined) { + _this.bindingContext = bindingContext; + } + _this.rootView.bind(_this.bindingContext); + setTimeout(function () { return resolve(); }, 0); + }); }; + // attached + var attachedPrototype = aurelia_templating_1.View.prototype.attached; + // tslint:disable-next-line:no-empty + aurelia_templating_1.View.prototype.attached = function () { }; + this.attached = function () { return new Promise(function (resolve) { + aurelia_templating_1.View.prototype.attached = attachedPrototype; + _this.rootView.attached(); + setTimeout(function () { return resolve(); }, 0); + }); }; + // detached + this.detached = function () { return new Promise(function (resolve) { + _this.rootView.detached(); + setTimeout(function () { return resolve(); }, 0); + }); }; + // unbind + this.unbind = function () { return new Promise(function (resolve) { + _this.rootView.unbind(); + setTimeout(function () { return resolve(); }, 0); + }); }; + }; + ComponentTester.prototype.waitForElement = function (selector, options) { + var _this = this; + return wait_1.waitFor(function () { return _this.element.querySelector(selector); }, options); + }; + ComponentTester.prototype.waitForElements = function (selector, options) { + var _this = this; + return wait_1.waitFor(function () { return _this.element.querySelectorAll(selector); }, options); + }; + return ComponentTester; + }()); + exports_1("ComponentTester", ComponentTester); + } + }; +}); diff --git a/dist/system/view-spy.d.ts b/dist/system/view-spy.d.ts new file mode 100644 index 0000000..7c2f341 --- /dev/null +++ b/dist/system/view-spy.d.ts @@ -0,0 +1,37 @@ +/** + * Attribute to be placed on any HTML element in a view to emit the View instance + * to the debug console, giving you insight into the live View instance, including + * all child views, live bindings, behaviors and more. + */ +export declare class ViewSpy { + private logger; + private value; + private view; + /** + * Creates a new instance of ViewSpy. + */ + constructor(); + private _log(lifecycleName, context?); + /** + * Invoked when the target view is created. + * @param view The target view. + */ + created(view: any): void; + /** + * Invoked when the target view is bound. + * @param bindingContext The target view's binding context. + */ + bind(bindingContext: {}): void; + /** + * Invoked when the target element is attached to the DOM. + */ + attached(): void; + /** + * Invoked when the target element is detached from the DOM. + */ + detached(): void; + /** + * Invoked when the target element is unbound. + */ + unbind(): void; +} diff --git a/dist/system/view-spy.js b/dist/system/view-spy.js new file mode 100644 index 0000000..72e690f --- /dev/null +++ b/dist/system/view-spy.js @@ -0,0 +1,77 @@ +System.register(["aurelia-templating", "aurelia-logging"], function (exports_1, context_1) { + "use strict"; + var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __moduleName = context_1 && context_1.id; + var aurelia_templating_1, aurelia_logging_1, ViewSpy; + return { + setters: [ + function (aurelia_templating_1_1) { + aurelia_templating_1 = aurelia_templating_1_1; + }, + function (aurelia_logging_1_1) { + aurelia_logging_1 = aurelia_logging_1_1; + } + ], + execute: function () { + ViewSpy = /** @class */ (function () { + /** + * Creates a new instance of ViewSpy. + */ + function ViewSpy() { + this.logger = aurelia_logging_1.getLogger('view-spy'); + } + ViewSpy.prototype._log = function (lifecycleName, context) { + if (!this.value && lifecycleName === 'created') { + this.logger.info(lifecycleName, this.view); + } + else if (this.value && this.value.indexOf(lifecycleName) !== -1) { + this.logger.info(lifecycleName, this.view, context); + } + }; + /** + * Invoked when the target view is created. + * @param view The target view. + */ + ViewSpy.prototype.created = function (view) { + this.view = view; + this._log('created'); + }; + /** + * Invoked when the target view is bound. + * @param bindingContext The target view's binding context. + */ + ViewSpy.prototype.bind = function (bindingContext) { + this._log('bind', bindingContext); + }; + /** + * Invoked when the target element is attached to the DOM. + */ + ViewSpy.prototype.attached = function () { + this._log('attached'); + }; + /** + * Invoked when the target element is detached from the DOM. + */ + ViewSpy.prototype.detached = function () { + this._log('detached'); + }; + /** + * Invoked when the target element is unbound. + */ + ViewSpy.prototype.unbind = function () { + this._log('unbind'); + }; + ViewSpy = __decorate([ + aurelia_templating_1.customAttribute('view-spy') + ], ViewSpy); + return ViewSpy; + }()); + exports_1("ViewSpy", ViewSpy); + } + }; +}); diff --git a/dist/system/wait.d.ts b/dist/system/wait.d.ts new file mode 100644 index 0000000..c58665a --- /dev/null +++ b/dist/system/wait.d.ts @@ -0,0 +1,23 @@ +/** + * Generic function to wait for something to happen. Uses polling + * @param getter: a getter function that returns anything else than `null` or an + * empty array or an empty jQuery object when the + * condition is met + * @param options: lookup options, defaults to + * `{present: true, interval: 50, timeout: 5000}` + */ +export declare function waitFor(getter: () => T, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise; +export declare function waitForDocumentElement(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise; +export declare function waitForDocumentElements(selector: string, options?: { + present?: boolean; + interval?: number; + timeout?: number; +}): Promise>; diff --git a/dist/system/wait.js b/dist/system/wait.js new file mode 100644 index 0000000..5ecd0b5 --- /dev/null +++ b/dist/system/wait.js @@ -0,0 +1,57 @@ +System.register([], function (exports_1, context_1) { + "use strict"; + var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + var __moduleName = context_1 && context_1.id; + /** + * Generic function to wait for something to happen. Uses polling + * @param getter: a getter function that returns anything else than `null` or an + * empty array or an empty jQuery object when the + * condition is met + * @param options: lookup options, defaults to + * `{present: true, interval: 50, timeout: 5000}` + */ + function waitFor(getter, options) { + if (options === void 0) { options = { present: true, interval: 50, timeout: 5000 }; } + // prevents infinite recursion if the request times out + var timedOut = false; + options = __assign({ present: true, interval: 50, timeout: 5000 }, options); + function wait() { + var element = getter(); + // boolean is needed here, hence the length > 0 + var found = element !== null && (!(element instanceof NodeList) && + !element.jquery || element.length > 0); + if (!options.present === !found || timedOut) { + return Promise.resolve(element); + } + return new Promise(function (rs) { return setTimeout(rs, options.interval); }).then(wait); + } + return Promise.race([ + new Promise(function (_, rj) { return setTimeout(function () { + timedOut = true; + rj(options.present ? 'Element not found' : 'Element not removed'); + }, options.timeout); }), + wait() + ]); + } + exports_1("waitFor", waitFor); + function waitForDocumentElement(selector, options) { + return waitFor(function () { return document.querySelector(selector); }, options); + } + exports_1("waitForDocumentElement", waitForDocumentElement); + function waitForDocumentElements(selector, options) { + return waitFor(function () { return document.querySelectorAll(selector); }, options); + } + exports_1("waitForDocumentElements", waitForDocumentElements); + return { + setters: [], + execute: function () { + } + }; +}); diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index ed2bb1d..18365fa 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,8 @@ + +# [1.0.0-beta.4.0.0](https://github.com/aurelia/testing/compare/1.0.0-beta.3.0.1...1.0.0-beta.4.0.0) (2017-11-06) + +This entire library was converted to TypeScript. This doesn't involve any breaking changes to the functionality, but the TypeScript definitions are now more accurate and could result in some requried code fixups for TS consumers. + # [1.0.0-beta.3.0.1](https://github.com/aurelia/testing/compare/1.0.0-beta.3.0.0...v1.0.0-beta.3.0.1) (2017-03-25) @@ -97,4 +102,3 @@ * support lifecycle testing ([cd9bd78a](http://github.com/aurelia/testing/commit/cd9bd78a0905c0e4900a6f4fbc67ef1e30990075)) * enable custom bootstrap ([50d1d72a](http://github.com/aurelia/testing/commit/50d1d72aa5af9ed5e8fd20efdf7fade027baccb2)) * initial poc ([1db19514](http://github.com/aurelia/testing/commit/1db195142715503746e49e179c044c0ad39a4763)) - diff --git a/doc/api.json b/doc/api.json index 2d4bf19..e44e82a 100644 --- a/doc/api.json +++ b/doc/api.json @@ -1 +1 @@ -{"name":"aurelia-testing","children":[{"name":"\"src/aurelia-testing\"","children":[{"id":202,"name":"configure","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":203,"name":"configure","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":204,"name":"config","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FrameworkConfiguration"}}],"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/aurelia-testing.ts","line":7,"character":25}]}],"groups":[{"title":"Functions","kind":64,"children":[202]}]},{"name":"\"src/compile-spy\"","children":[{"id":2,"name":"CompileSpy","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Attribute to be placed on any element to have it emit the View Compiler's\nTargetInstruction into the debug console, giving you insight into all the\nparsed bindings, behaviors and event handers for the targeted element."},"decorators":[{"name":"customAttribute","type":{"type":"reference","name":"customAttribute"},"arguments":{"name":"'compile-spy'"}},{"name":"inject","type":{"type":"reference","name":"inject"},"arguments":{"rest":"DOM.Element","...":["TargetInstruction"]}}],"children":[{"id":3,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates and instanse of CompileSpy."},"signatures":[{"id":4,"name":"new CompileSpy","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates and instanse of CompileSpy."},"parameters":[{"id":5,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"target element on where attribute is placed on."},"type":{"type":"reference","name":"Element"}},{"id":6,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"instructions for how the target element should be enhanced.\n"},"type":{"type":"reference","name":"TargetInstruction"}}],"type":{"type":"reference","name":"CompileSpy","id":2}}],"sources":[{"fileName":"src/compile-spy.ts","line":13,"character":25}]}],"groups":[{"title":"Constructors","kind":512,"children":[3]}],"sources":[{"fileName":"src/compile-spy.ts","line":13,"character":23}]}],"groups":[{"title":"Classes","kind":128,"children":[2]}]},{"name":"\"src/component-tester\"","children":[{"id":130,"name":"ComponentTester","kind":128,"kindString":"Class","flags":{"isExported":true},"typeParameter":[{"id":131,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":136,"name":"attached","kind":1024,"kindString":"Property","flags":{"isExported":true,"isPublic":true},"sources":[{"fileName":"src/component-tester.ts","line":21,"character":17}],"type":{"type":"reflection","declaration":{"id":137,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":138,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":21,"character":18}]}}},{"id":132,"name":"bind","kind":1024,"kindString":"Property","flags":{"isExported":true,"isPublic":true},"sources":[{"fileName":"src/component-tester.ts","line":20,"character":13}],"type":{"type":"reflection","declaration":{"id":133,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":134,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":135,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"__type"}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":20,"character":14}]}}},{"id":149,"name":"bindingContext","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/component-tester.ts","line":29,"character":24}],"type":{"type":"reference","name":"__type"}},{"id":139,"name":"detached","kind":1024,"kindString":"Property","flags":{"isExported":true,"isPublic":true},"sources":[{"fileName":"src/component-tester.ts","line":22,"character":17}],"type":{"type":"reflection","declaration":{"id":140,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":141,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":22,"character":18}]}}},{"id":145,"name":"element","kind":1024,"kindString":"Property","flags":{"isExported":true,"isPublic":true},"sources":[{"fileName":"src/component-tester.ts","line":24,"character":16}],"type":{"type":"reference","name":"Element"}},{"id":151,"name":"host","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/component-tester.ts","line":31,"character":14}],"type":{"type":"reference","name":"HTMLDivElement"}},{"id":147,"name":"html","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/component-tester.ts","line":27,"character":14}],"type":{"type":"intrinsic","name":"string"}},{"id":148,"name":"resources","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/component-tester.ts","line":28,"character":19}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]},"defaultValue":" []"},{"id":150,"name":"rootView","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/component-tester.ts","line":30,"character":18}],"type":{"type":"reference","name":"View"}},{"id":142,"name":"unbind","kind":1024,"kindString":"Property","flags":{"isExported":true,"isPublic":true},"sources":[{"fileName":"src/component-tester.ts","line":23,"character":15}],"type":{"type":"reflection","declaration":{"id":143,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":144,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":23,"character":16}]}}},{"id":146,"name":"viewModel","kind":1024,"kindString":"Property","flags":{"isExported":true,"isPublic":true},"sources":[{"fileName":"src/component-tester.ts","line":25,"character":18}],"type":{"type":"typeParameter","name":"T"}},{"id":183,"name":"_prepareLifecycle","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":184,"name":"_prepareLifecycle","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/component-tester.ts","line":102,"character":27}]},{"id":155,"name":"bootstrap","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":156,"name":"bootstrap","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":157,"name":"configure","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":158,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":159,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":160,"name":"aurelia","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Aurelia"}}],"type":{"type":"reference","name":"FrameworkConfiguration"}}],"sources":[{"fileName":"src/component-tester.ts","line":37,"character":29}]}}}],"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/component-tester.ts","line":37,"character":18}]},{"id":167,"name":"boundTo","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":168,"name":"boundTo","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":169,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"__type"}}],"type":{"type":"reference","name":"ComponentTester","id":130,"typeArguments":[{"type":"typeParameter","name":"T"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":51,"character":16}]},{"id":152,"name":"configure","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":153,"name":"configure","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":154,"name":"aurelia","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Aurelia"}}],"type":{"type":"reference","name":"FrameworkConfiguration"}}],"sources":[{"fileName":"src/component-tester.ts","line":33,"character":18}]},{"id":172,"name":"create","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":173,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":174,"name":"bootstrap","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":175,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":176,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":177,"name":"configure","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":178,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":179,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":180,"name":"aurelia","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Aurelia"}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":61,"character":38}]}}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":61,"character":26}]}}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":61,"character":15}]},{"id":181,"name":"dispose","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":182,"name":"dispose","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"src/component-tester.ts","line":89,"character":16}]},{"id":164,"name":"inView","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":165,"name":"inView","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":166,"name":"html","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","name":"ComponentTester","id":130,"typeArguments":[{"type":"typeParameter","name":"T"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":46,"character":15}]},{"id":170,"name":"manuallyHandleLifecycle","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":171,"name":"manuallyHandleLifecycle","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"ComponentTester","id":130,"typeArguments":[{"type":"typeParameter","name":"T"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":56,"character":32}]},{"id":185,"name":"waitForElement","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":186,"name":"waitForElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":187,"name":"selector","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":188,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"reflection","declaration":{"id":189,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":191,"name":"interval","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/component-tester.ts","line":141,"character":12}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}},{"id":190,"name":"present","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/component-tester.ts","line":140,"character":11}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"true"},{"type":"intrinsic","name":"false"}]}},{"id":192,"name":"timeout","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/component-tester.ts","line":142,"character":11}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Variables","kind":32,"children":[191,190,192]}]}}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Element"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":139,"character":23}]},{"id":193,"name":"waitForElements","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":194,"name":"waitForElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":195,"name":"selector","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":196,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"reflection","declaration":{"id":197,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":199,"name":"interval","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/component-tester.ts","line":149,"character":12}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}},{"id":198,"name":"present","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/component-tester.ts","line":148,"character":11}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"true"},{"type":"intrinsic","name":"false"}]}},{"id":200,"name":"timeout","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/component-tester.ts","line":150,"character":11}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Variables","kind":32,"children":[199,198,200]}]}}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"NodeListOf","typeArguments":[{"type":"reference","name":"Element"}]}]}}],"sources":[{"fileName":"src/component-tester.ts","line":147,"character":24}]},{"id":161,"name":"withResources","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":162,"name":"withResources","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":163,"name":"resources","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}}],"type":{"type":"reference","name":"ComponentTester","id":130,"typeArguments":[{"type":"typeParameter","name":"T"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":41,"character":22}]}],"groups":[{"title":"Properties","kind":1024,"children":[136,132,149,139,145,151,147,148,150,142,146]},{"title":"Methods","kind":2048,"children":[183,155,167,152,172,181,164,170,185,193,161]}],"sources":[{"fileName":"src/component-tester.ts","line":19,"character":28}]},{"id":125,"name":"StageComponent","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":126,"name":"withResources","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true,"isPublic":true},"signatures":[{"id":127,"name":"withResources","kind":4096,"kindString":"Call signature","flags":{},"typeParameter":[{"id":128,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":129,"name":"resources","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]},"defaultValue":" []"}],"type":{"type":"reference","name":"ComponentTester","id":130,"typeArguments":[{"type":"typeParameter","name":"T"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":14,"character":29}]}],"groups":[{"title":"Methods","kind":2048,"children":[126]}],"sources":[{"fileName":"src/component-tester.ts","line":13,"character":27}]},{"id":59,"name":"AureliaWithRoot","kind":256,"kindString":"Interface","flags":{},"children":[{"id":66,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"comment":{"shortText":"Creates an instance of Aurelia."},"signatures":[{"id":67,"name":"new AureliaWithRoot","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates an instance of Aurelia."},"parameters":[{"id":68,"name":"loader","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The loader for this Aurelia instance to use. If a loader is not specified, Aurelia will use the loader type specified by PLATFORM.Loader."},"type":{"type":"reference","name":"Loader"}},{"id":69,"name":"container","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The dependency injection container for this Aurelia instance to use. If a container is not specified, Aurelia will create an empty, global container."},"type":{"type":"reference","name":"Container"}},{"id":70,"name":"resources","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The resource registry for this Aurelia instance to use. If a resource registry is not specified, Aurelia will create an empty registry.\n"},"type":{"type":"reference","name":"ViewResources"}}],"type":{"type":"reference","name":"AureliaWithRoot","id":59},"inheritedFrom":{"type":"reference","name":"Aurelia.__constructor"}}],"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":54,"character":30}],"inheritedFrom":{"type":"reference","name":"Aurelia.__constructor"}},{"id":63,"name":"container","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The root DI container used by the application."},"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":44,"character":11}],"type":{"type":"reference","name":"Container"},"inheritedFrom":{"type":"reference","name":"Aurelia.container"}},{"id":61,"name":"host","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The DOM Element that Aurelia will attach to."},"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":33,"character":6}],"type":{"type":"reference","name":"Element"},"inheritedFrom":{"type":"reference","name":"Aurelia.host"}},{"id":62,"name":"loader","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"/**\nThe loader used by the application."},"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":39,"character":8}],"type":{"type":"reference","name":"Loader"},"inheritedFrom":{"type":"reference","name":"Aurelia.loader"}},{"id":64,"name":"resources","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The global view resources used by the application."},"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":49,"character":11}],"type":{"type":"reference","name":"ViewResources"},"inheritedFrom":{"type":"reference","name":"Aurelia.resources"}},{"id":60,"name":"root","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"src/component-tester.ts","line":6,"character":6}],"type":{"type":"reference","name":"ViewWithControllers","id":81}},{"id":65,"name":"use","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The configuration used during application startup."},"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":54,"character":5}],"type":{"type":"reference","name":"FrameworkConfiguration"},"inheritedFrom":{"type":"reference","name":"Aurelia.use"}},{"id":73,"name":"enhance","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":74,"name":"enhance","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Enhances the host's existing elements with behaviors and bindings.","returns":"Returns a Promise for the current Aurelia instance.\n"},"parameters":[{"id":75,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"A binding context for the enhanced elements."},"type":{"type":"reference","name":"Object"}},{"id":76,"name":"applicationHost","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The DOM object that Aurelia will enhance."},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","name":"Element"}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Aurelia"}]},"inheritedFrom":{"type":"reference","name":"Aurelia.enhance"}}],"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":76,"character":9}],"inheritedFrom":{"type":"reference","name":"Aurelia.enhance"}},{"id":77,"name":"setRoot","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":78,"name":"setRoot","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Instantiates the root component and adds it to the DOM.","returns":"Returns a Promise of the current Aurelia instance.\n"},"parameters":[{"id":79,"name":"root","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The root component to load upon bootstrap."},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"string"}]}},{"id":80,"name":"applicationHost","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The DOM object that Aurelia will attach to."},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","name":"Element"}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Aurelia"}]},"inheritedFrom":{"type":"reference","name":"Aurelia.setRoot"}}],"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":84,"character":9}],"inheritedFrom":{"type":"reference","name":"Aurelia.setRoot"}},{"id":71,"name":"start","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":72,"name":"start","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Loads plugins, then resources, and then starts the Aurelia instance.","returns":"Returns a Promise with the started Aurelia instance.\n"},"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Aurelia"}]},"inheritedFrom":{"type":"reference","name":"Aurelia.start"}}],"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":68,"character":7}],"inheritedFrom":{"type":"reference","name":"Aurelia.start"}}],"groups":[{"title":"Constructors","kind":512,"children":[66]},{"title":"Properties","kind":1024,"children":[63,61,62,64,60,65]},{"title":"Methods","kind":2048,"children":[73,77,71]}],"sources":[{"fileName":"src/component-tester.ts","line":5,"character":25}],"extendedTypes":[{"type":"reference","name":"Aurelia"}]},{"id":81,"name":"ViewWithControllers","kind":256,"kindString":"Interface","flags":{},"children":[{"id":90,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"comment":{"shortText":"Creates a View instance."},"signatures":[{"id":91,"name":"new ViewWithControllers","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates a View instance."},"parameters":[{"id":92,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The container from which the view was created."},"type":{"type":"reference","name":"Container"}},{"id":93,"name":"viewFactory","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The factory that created this view."},"type":{"type":"reference","name":"ViewFactory"}},{"id":94,"name":"fragment","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The DOM fragement representing the view."},"type":{"type":"reference","name":"DocumentFragment"}},{"id":95,"name":"controllers","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The controllers inside this view."},"type":{"type":"array","elementType":{"type":"reference","name":"Controller"}}},{"id":96,"name":"bindings","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The bindings inside this view."},"type":{"type":"array","elementType":{"type":"reference","name":"Binding"}}},{"id":97,"name":"children","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The children of this view.\n"},"type":{"type":"array","elementType":{"type":"reference","name":"ViewNode"}}},{"id":98,"name":"slots","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Object"}}],"type":{"type":"reference","name":"ViewWithControllers","id":81},"inheritedFrom":{"type":"reference","name":"View.__constructor"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1105,"character":26}],"inheritedFrom":{"type":"reference","name":"View.__constructor"}},{"id":88,"name":"bindingContext","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The primary binding context that this view is data-bound to."},"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1100,"character":16}],"type":{"type":"reference","name":"Object"},"inheritedFrom":{"type":"reference","name":"View.bindingContext"}},{"id":85,"name":"container","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The Dependency Injection Container that was used to create this View instance."},"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1085,"character":11}],"type":{"type":"reference","name":"Container"},"inheritedFrom":{"type":"reference","name":"View.container"}},{"id":82,"name":"controllers","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"src/component-tester.ts","line":10,"character":13}],"type":{"type":"array","elementType":{"type":"reflection","declaration":{"id":83,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":84,"name":"viewModel","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"src/component-tester.ts","line":10,"character":25}],"type":{"type":"intrinsic","name":"any"}}],"groups":[{"title":"Variables","kind":32,"children":[84]}],"sources":[{"fileName":"src/component-tester.ts","line":10,"character":14}]}}}},{"id":87,"name":"fragment","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"Contains the DOM Nodes which represent this View. If the view was created via the \"enhance\" API, this will be an Element, otherwise it will be a DocumentFragment. If not created via \"enhance\" then the fragment will only contain nodes when the View is detached from the DOM."},"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1095,"character":10}],"type":{"type":"union","types":[{"type":"reference","name":"DocumentFragment"},{"type":"reference","name":"Element"}]},"inheritedFrom":{"type":"reference","name":"View.fragment"}},{"id":89,"name":"overrideContext","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The override context which contains properties capable of overriding those found on the binding context."},"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1105,"character":17}],"type":{"type":"reference","name":"Object"},"inheritedFrom":{"type":"reference","name":"View.overrideContext"}},{"id":86,"name":"viewFactory","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The ViewFactory that built this View instance."},"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1090,"character":13}],"type":{"type":"reference","name":"ViewFactory"},"inheritedFrom":{"type":"reference","name":"View.viewFactory"}},{"id":108,"name":"addBinding","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":109,"name":"addBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a binding instance to this view."},"parameters":[{"id":110,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The binding instance.\n"},"type":{"type":"reference","name":"Object"}}],"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.addBinding"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1139,"character":12}],"inheritedFrom":{"type":"reference","name":"View.addBinding"}},{"id":116,"name":"appendNodesTo","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":117,"name":"appendNodesTo","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Appends this view's to the specified DOM node."},"parameters":[{"id":118,"name":"parent","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The parent element to append this view's nodes to.\n"},"type":{"type":"reference","name":"Element"}}],"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.appendNodesTo"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1156,"character":15}],"inheritedFrom":{"type":"reference","name":"View.appendNodesTo"}},{"id":121,"name":"attached","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":122,"name":"attached","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Triggers the attach for the view and its children."},"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.attached"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1166,"character":10}],"inheritedFrom":{"type":"reference","name":"View.attached"}},{"id":103,"name":"bind","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":104,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Binds the view and it's children."},"parameters":[{"id":105,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The binding context to bind to."},"type":{"type":"reference","name":"Object"}},{"id":106,"name":"overrideContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"A secondary binding context that can override the standard context.\n"},"type":{"type":"reference","name":"Object"}},{"id":107,"name":"_systemUpdate","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"true"},{"type":"intrinsic","name":"false"}]}}],"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.bind"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1133,"character":6}],"inheritedFrom":{"type":"reference","name":"View.bind"}},{"id":101,"name":"created","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":102,"name":"created","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Triggers the created callback for this view and its children."},"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.created"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1126,"character":9}],"inheritedFrom":{"type":"reference","name":"View.created"}},{"id":123,"name":"detached","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":124,"name":"detached","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Triggers the detach for the view and its children."},"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.detached"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1171,"character":10}],"inheritedFrom":{"type":"reference","name":"View.detached"}},{"id":113,"name":"insertNodesBefore","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":114,"name":"insertNodesBefore","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Inserts this view's nodes before the specified DOM node."},"parameters":[{"id":115,"name":"refNode","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The node to insert this view's nodes before.\n"},"type":{"type":"reference","name":"Node"}}],"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.insertNodesBefore"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1150,"character":19}],"inheritedFrom":{"type":"reference","name":"View.insertNodesBefore"}},{"id":119,"name":"removeNodes","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":120,"name":"removeNodes","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes this view's nodes from the DOM."},"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.removeNodes"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1161,"character":13}],"inheritedFrom":{"type":"reference","name":"View.removeNodes"}},{"id":99,"name":"returnToCache","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":100,"name":"returnToCache","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Returns this view to the appropriate view cache."},"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.returnToCache"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1121,"character":15}],"inheritedFrom":{"type":"reference","name":"View.returnToCache"}},{"id":111,"name":"unbind","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":112,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Unbinds the view and its children."},"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.unbind"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1144,"character":8}],"inheritedFrom":{"type":"reference","name":"View.unbind"}}],"groups":[{"title":"Constructors","kind":512,"children":[90]},{"title":"Properties","kind":1024,"children":[88,85,82,87,89,86]},{"title":"Methods","kind":2048,"children":[108,116,121,103,101,123,113,119,99,111]}],"sources":[{"fileName":"src/component-tester.ts","line":9,"character":29}],"extendedTypes":[{"type":"reference","name":"View"}]}],"groups":[{"title":"Classes","kind":128,"children":[130,125]},{"title":"Interfaces","kind":256,"children":[59,81]}]},{"name":"\"src/view-spy\"","children":[{"id":8,"name":"ViewSpy","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Attribute to be placed on any HTML element in a view to emit the View instance\nto the debug console, giving you insight into the live View instance, including\nall child views, live bindings, behaviors and more."},"decorators":[{"name":"customAttribute","type":{"type":"reference","name":"customAttribute"},"arguments":{"name":"'view-spy'"}}],"children":[{"id":12,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates a new instance of ViewSpy."},"signatures":[{"id":13,"name":"new ViewSpy","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates a new instance of ViewSpy."},"type":{"type":"reference","name":"ViewSpy","id":8}}],"sources":[{"fileName":"src/view-spy.ts","line":13,"character":20}]},{"id":9,"name":"logger","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/view-spy.ts","line":11,"character":16}],"type":{"type":"reference","name":"Logger"}},{"id":10,"name":"value","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/view-spy.ts","line":12,"character":15}],"type":{"type":"intrinsic","name":"any"}},{"id":11,"name":"view","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/view-spy.ts","line":13,"character":14}],"type":{"type":"intrinsic","name":"any"}},{"id":14,"name":"_log","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":15,"name":"_log","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":16,"name":"lifecycleName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":17,"name":"context","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"reference","name":"__type"}]}}],"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/view-spy.ts","line":22,"character":14}]},{"id":24,"name":"attached","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":25,"name":"attached","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Invoked when the target element is attached to the DOM."},"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/view-spy.ts","line":50,"character":17}]},{"id":21,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":22,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Invoked when the target view is bound."},"parameters":[{"id":23,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target view's binding context.\n"},"type":{"type":"reference","name":"__type"}}],"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/view-spy.ts","line":43,"character":13}]},{"id":18,"name":"created","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":19,"name":"created","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Invoked when the target view is created."},"parameters":[{"id":20,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target view.\n"},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/view-spy.ts","line":34,"character":16}]},{"id":26,"name":"detached","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":27,"name":"detached","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Invoked when the target element is detached from the DOM."},"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/view-spy.ts","line":57,"character":17}]},{"id":28,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":29,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Invoked when the target element is unbound."},"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/view-spy.ts","line":64,"character":15}]}],"groups":[{"title":"Constructors","kind":512,"children":[12]},{"title":"Properties","kind":1024,"children":[9,10,11]},{"title":"Methods","kind":2048,"children":[14,24,21,18,26,28]}],"sources":[{"fileName":"src/view-spy.ts","line":10,"character":20}]}],"groups":[{"title":"Classes","kind":128,"children":[8]}]},{"name":"\"src/wait\"","children":[{"id":31,"name":"waitFor","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":32,"name":"waitFor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Generic function to wait for something to happen. Uses polling"},"typeParameter":[{"id":33,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":34,"name":"getter","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":35,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":36,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"typeParameter","name":"T"}}],"sources":[{"fileName":"src/wait.ts","line":9,"character":34}]}}},{"id":37,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":38,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":40,"name":"interval","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":11,"character":10}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}},{"id":39,"name":"present","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":10,"character":9}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"true"},{"type":"intrinsic","name":"false"}]}},{"id":41,"name":"timeout","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":12,"character":9}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Variables","kind":32,"children":[40,39,41]}],"sources":[{"fileName":"src/wait.ts","line":9,"character":52}]}},"defaultValue":" {present: true, interval: 50, timeout: 5000}"}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"typeParameter","name":"T"}]}}],"sources":[{"fileName":"src/wait.ts","line":9,"character":23}]},{"id":42,"name":"waitForDocumentElement","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":43,"name":"waitForDocumentElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":44,"name":"selector","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":45,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"reflection","declaration":{"id":46,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":48,"name":"interval","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":50,"character":10}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}},{"id":47,"name":"present","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":49,"character":9}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"true"},{"type":"intrinsic","name":"false"}]}},{"id":49,"name":"timeout","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":51,"character":9}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Variables","kind":32,"children":[48,47,49]}]}}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Element"}]}}],"sources":[{"fileName":"src/wait.ts","line":48,"character":38}]},{"id":50,"name":"waitForDocumentElements","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":51,"name":"waitForDocumentElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":52,"name":"selector","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":53,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"reflection","declaration":{"id":54,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":56,"name":"interval","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":58,"character":10}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}},{"id":55,"name":"present","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":57,"character":9}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"true"},{"type":"intrinsic","name":"false"}]}},{"id":57,"name":"timeout","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":59,"character":9}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Variables","kind":32,"children":[56,55,57]}]}}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"NodeListOf","typeArguments":[{"type":"reference","name":"Element"}]}]}}],"sources":[{"fileName":"src/wait.ts","line":56,"character":39}]}],"groups":[{"title":"Functions","kind":64,"children":[31,42,50]}]}],"groups":[{"title":"External modules","kind":1,"children":[201,1,58,7,30,205,206,207,269,283,257]}]} +{"name":"aurelia-testing","children":[{"name":"\"src/aurelia-testing\"","children":[{"id":203,"name":"configure","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":204,"name":"configure","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":205,"name":"config","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FrameworkConfiguration"}}],"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/aurelia-testing.ts","line":7,"character":25}]}],"groups":[{"title":"Functions","kind":64,"children":[203]}]},{"name":"\"src/compile-spy\"","children":[{"id":2,"name":"CompileSpy","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Attribute to be placed on any element to have it emit the View Compiler's\nTargetInstruction into the debug console, giving you insight into all the\nparsed bindings, behaviors and event handers for the targeted element."},"decorators":[{"name":"customAttribute","type":{"type":"reference","name":"customAttribute"},"arguments":{"name":"'compile-spy'"}},{"name":"inject","type":{"type":"reference","name":"inject"},"arguments":{"rest":"DOM.Element","...":["TargetInstruction"]}}],"children":[{"id":3,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates and instanse of CompileSpy."},"signatures":[{"id":4,"name":"new CompileSpy","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates and instanse of CompileSpy."},"parameters":[{"id":5,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"target element on where attribute is placed on."},"type":{"type":"reference","name":"Element"}},{"id":6,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"instructions for how the target element should be enhanced.\n"},"type":{"type":"reference","name":"TargetInstruction"}}],"type":{"type":"reference","name":"CompileSpy","id":2}}],"sources":[{"fileName":"src/compile-spy.ts","line":13,"character":25}]}],"groups":[{"title":"Constructors","kind":512,"children":[3]}],"sources":[{"fileName":"src/compile-spy.ts","line":13,"character":23}]}],"groups":[{"title":"Classes","kind":128,"children":[2]}]},{"name":"\"src/component-tester\"","children":[{"id":131,"name":"ComponentTester","kind":128,"kindString":"Class","flags":{"isExported":true},"typeParameter":[{"id":132,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":137,"name":"attached","kind":1024,"kindString":"Property","flags":{"isExported":true,"isPublic":true},"sources":[{"fileName":"src/component-tester.ts","line":21,"character":17}],"type":{"type":"reflection","declaration":{"id":138,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":139,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":21,"character":18}]}}},{"id":133,"name":"bind","kind":1024,"kindString":"Property","flags":{"isExported":true,"isPublic":true},"sources":[{"fileName":"src/component-tester.ts","line":20,"character":13}],"type":{"type":"reflection","declaration":{"id":134,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":135,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":136,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"__type"}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":20,"character":14}]}}},{"id":150,"name":"bindingContext","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/component-tester.ts","line":29,"character":24}],"type":{"type":"reference","name":"__type"}},{"id":140,"name":"detached","kind":1024,"kindString":"Property","flags":{"isExported":true,"isPublic":true},"sources":[{"fileName":"src/component-tester.ts","line":22,"character":17}],"type":{"type":"reflection","declaration":{"id":141,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":142,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":22,"character":18}]}}},{"id":146,"name":"element","kind":1024,"kindString":"Property","flags":{"isExported":true,"isPublic":true},"sources":[{"fileName":"src/component-tester.ts","line":24,"character":16}],"type":{"type":"reference","name":"Element"}},{"id":152,"name":"host","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/component-tester.ts","line":31,"character":14}],"type":{"type":"reference","name":"HTMLDivElement"}},{"id":148,"name":"html","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/component-tester.ts","line":27,"character":14}],"type":{"type":"intrinsic","name":"string"}},{"id":149,"name":"resources","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/component-tester.ts","line":28,"character":19}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]},"defaultValue":" []"},{"id":151,"name":"rootView","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/component-tester.ts","line":30,"character":18}],"type":{"type":"reference","name":"View"}},{"id":143,"name":"unbind","kind":1024,"kindString":"Property","flags":{"isExported":true,"isPublic":true},"sources":[{"fileName":"src/component-tester.ts","line":23,"character":15}],"type":{"type":"reflection","declaration":{"id":144,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":145,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":23,"character":16}]}}},{"id":147,"name":"viewModel","kind":1024,"kindString":"Property","flags":{"isExported":true,"isPublic":true},"sources":[{"fileName":"src/component-tester.ts","line":25,"character":18}],"type":{"type":"typeParameter","name":"T"}},{"id":184,"name":"_prepareLifecycle","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":185,"name":"_prepareLifecycle","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/component-tester.ts","line":102,"character":27}]},{"id":156,"name":"bootstrap","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":157,"name":"bootstrap","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":158,"name":"configure","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":159,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":160,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":161,"name":"aurelia","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Aurelia"}}],"type":{"type":"reference","name":"FrameworkConfiguration"}}],"sources":[{"fileName":"src/component-tester.ts","line":37,"character":29}]}}}],"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/component-tester.ts","line":37,"character":18}]},{"id":168,"name":"boundTo","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":169,"name":"boundTo","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":170,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"__type"}}],"type":{"type":"reference","name":"ComponentTester","id":131,"typeArguments":[{"type":"typeParameter","name":"T"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":51,"character":16}]},{"id":153,"name":"configure","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":154,"name":"configure","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":155,"name":"aurelia","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Aurelia"}}],"type":{"type":"reference","name":"FrameworkConfiguration"}}],"sources":[{"fileName":"src/component-tester.ts","line":33,"character":18}]},{"id":173,"name":"create","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":174,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":175,"name":"bootstrap","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":176,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":177,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":178,"name":"configure","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":179,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":180,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":181,"name":"aurelia","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Aurelia"}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":61,"character":38}]}}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":61,"character":26}]}}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"intrinsic","name":"void"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":61,"character":15}]},{"id":182,"name":"dispose","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":183,"name":"dispose","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"src/component-tester.ts","line":89,"character":16}]},{"id":165,"name":"inView","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":166,"name":"inView","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":167,"name":"html","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","name":"ComponentTester","id":131,"typeArguments":[{"type":"typeParameter","name":"T"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":46,"character":15}]},{"id":171,"name":"manuallyHandleLifecycle","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":172,"name":"manuallyHandleLifecycle","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"ComponentTester","id":131,"typeArguments":[{"type":"typeParameter","name":"T"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":56,"character":32}]},{"id":186,"name":"waitForElement","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":187,"name":"waitForElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":188,"name":"selector","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":189,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"reflection","declaration":{"id":190,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":192,"name":"interval","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/component-tester.ts","line":141,"character":12}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}},{"id":191,"name":"present","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/component-tester.ts","line":140,"character":11}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"true"},{"type":"intrinsic","name":"false"}]}},{"id":193,"name":"timeout","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/component-tester.ts","line":142,"character":11}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Variables","kind":32,"children":[192,191,193]}]}}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Element"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":139,"character":23}]},{"id":194,"name":"waitForElements","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":195,"name":"waitForElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":196,"name":"selector","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":197,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"reflection","declaration":{"id":198,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":200,"name":"interval","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/component-tester.ts","line":149,"character":12}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}},{"id":199,"name":"present","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/component-tester.ts","line":148,"character":11}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"true"},{"type":"intrinsic","name":"false"}]}},{"id":201,"name":"timeout","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/component-tester.ts","line":150,"character":11}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Variables","kind":32,"children":[200,199,201]}]}}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"NodeListOf","typeArguments":[{"type":"reference","name":"Element"}]}]}}],"sources":[{"fileName":"src/component-tester.ts","line":147,"character":24}]},{"id":162,"name":"withResources","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":163,"name":"withResources","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":164,"name":"resources","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}}],"type":{"type":"reference","name":"ComponentTester","id":131,"typeArguments":[{"type":"typeParameter","name":"T"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":41,"character":22}]}],"groups":[{"title":"Properties","kind":1024,"children":[137,133,150,140,146,152,148,149,151,143,147]},{"title":"Methods","kind":2048,"children":[184,156,168,153,173,182,165,171,186,194,162]}],"sources":[{"fileName":"src/component-tester.ts","line":19,"character":28}]},{"id":126,"name":"StageComponent","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":127,"name":"withResources","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true,"isPublic":true},"signatures":[{"id":128,"name":"withResources","kind":4096,"kindString":"Call signature","flags":{},"typeParameter":[{"id":129,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":130,"name":"resources","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]},"defaultValue":" []"}],"type":{"type":"reference","name":"ComponentTester","id":131,"typeArguments":[{"type":"typeParameter","name":"T"}]}}],"sources":[{"fileName":"src/component-tester.ts","line":14,"character":29}]}],"groups":[{"title":"Methods","kind":2048,"children":[127]}],"sources":[{"fileName":"src/component-tester.ts","line":13,"character":27}]},{"id":59,"name":"AureliaWithRoot","kind":256,"kindString":"Interface","flags":{},"children":[{"id":66,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"comment":{"shortText":"Creates an instance of Aurelia."},"signatures":[{"id":67,"name":"new AureliaWithRoot","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates an instance of Aurelia."},"parameters":[{"id":68,"name":"loader","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The loader for this Aurelia instance to use. If a loader is not specified, Aurelia will use the loader type specified by PLATFORM.Loader."},"type":{"type":"reference","name":"Loader"}},{"id":69,"name":"container","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The dependency injection container for this Aurelia instance to use. If a container is not specified, Aurelia will create an empty, global container."},"type":{"type":"reference","name":"Container"}},{"id":70,"name":"resources","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The resource registry for this Aurelia instance to use. If a resource registry is not specified, Aurelia will create an empty registry.\n"},"type":{"type":"reference","name":"ViewResources"}}],"type":{"type":"reference","name":"AureliaWithRoot","id":59},"inheritedFrom":{"type":"reference","name":"Aurelia.__constructor"}}],"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":54,"character":30}],"inheritedFrom":{"type":"reference","name":"Aurelia.__constructor"}},{"id":63,"name":"container","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The root DI container used by the application."},"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":44,"character":11}],"type":{"type":"reference","name":"Container"},"inheritedFrom":{"type":"reference","name":"Aurelia.container"}},{"id":61,"name":"host","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The DOM Element that Aurelia will attach to."},"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":33,"character":6}],"type":{"type":"reference","name":"Element"},"inheritedFrom":{"type":"reference","name":"Aurelia.host"}},{"id":62,"name":"loader","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"/**\nThe loader used by the application."},"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":39,"character":8}],"type":{"type":"reference","name":"Loader"},"inheritedFrom":{"type":"reference","name":"Aurelia.loader"}},{"id":64,"name":"resources","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The global view resources used by the application."},"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":49,"character":11}],"type":{"type":"reference","name":"ViewResources"},"inheritedFrom":{"type":"reference","name":"Aurelia.resources"}},{"id":60,"name":"root","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"src/component-tester.ts","line":6,"character":6}],"type":{"type":"reference","name":"ViewWithControllers","id":81}},{"id":65,"name":"use","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The configuration used during application startup."},"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":54,"character":5}],"type":{"type":"reference","name":"FrameworkConfiguration"},"inheritedFrom":{"type":"reference","name":"Aurelia.use"}},{"id":73,"name":"enhance","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":74,"name":"enhance","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Enhances the host's existing elements with behaviors and bindings.","returns":"Returns a Promise for the current Aurelia instance.\n"},"parameters":[{"id":75,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"A binding context for the enhanced elements."},"type":{"type":"reference","name":"Object"}},{"id":76,"name":"applicationHost","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The DOM object that Aurelia will enhance."},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","name":"Element"}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Aurelia"}]},"inheritedFrom":{"type":"reference","name":"Aurelia.enhance"}}],"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":76,"character":9}],"inheritedFrom":{"type":"reference","name":"Aurelia.enhance"}},{"id":77,"name":"setRoot","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":78,"name":"setRoot","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Instantiates the root component and adds it to the DOM.","returns":"Returns a Promise of the current Aurelia instance.\n"},"parameters":[{"id":79,"name":"root","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The root component to load upon bootstrap."},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"string"}]}},{"id":80,"name":"applicationHost","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The DOM object that Aurelia will attach to."},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","name":"Element"}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Aurelia"}]},"inheritedFrom":{"type":"reference","name":"Aurelia.setRoot"}}],"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":84,"character":9}],"inheritedFrom":{"type":"reference","name":"Aurelia.setRoot"}},{"id":71,"name":"start","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":72,"name":"start","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Loads plugins, then resources, and then starts the Aurelia instance.","returns":"Returns a Promise with the started Aurelia instance.\n"},"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Aurelia"}]},"inheritedFrom":{"type":"reference","name":"Aurelia.start"}}],"sources":[{"fileName":"node_modules/aurelia-framework/dist/aurelia-framework.d.ts","line":68,"character":7}],"inheritedFrom":{"type":"reference","name":"Aurelia.start"}}],"groups":[{"title":"Constructors","kind":512,"children":[66]},{"title":"Properties","kind":1024,"children":[63,61,62,64,60,65]},{"title":"Methods","kind":2048,"children":[73,77,71]}],"sources":[{"fileName":"src/component-tester.ts","line":5,"character":25}],"extendedTypes":[{"type":"reference","name":"Aurelia"}]},{"id":81,"name":"ViewWithControllers","kind":256,"kindString":"Interface","flags":{},"children":[{"id":91,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"comment":{"shortText":"Creates a View instance."},"signatures":[{"id":92,"name":"new ViewWithControllers","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates a View instance."},"parameters":[{"id":93,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The container from which the view was created."},"type":{"type":"reference","name":"Container"}},{"id":94,"name":"viewFactory","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The factory that created this view."},"type":{"type":"reference","name":"ViewFactory"}},{"id":95,"name":"fragment","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The DOM fragement representing the view."},"type":{"type":"reference","name":"DocumentFragment"}},{"id":96,"name":"controllers","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The controllers inside this view."},"type":{"type":"array","elementType":{"type":"reference","name":"Controller"}}},{"id":97,"name":"bindings","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The bindings inside this view."},"type":{"type":"array","elementType":{"type":"reference","name":"Binding"}}},{"id":98,"name":"children","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The children of this view.\n"},"type":{"type":"array","elementType":{"type":"reference","name":"ViewNode"}}},{"id":99,"name":"slots","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Object"}}],"type":{"type":"reference","name":"ViewWithControllers","id":81},"inheritedFrom":{"type":"reference","name":"View.__constructor"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1110,"character":25}],"inheritedFrom":{"type":"reference","name":"View.__constructor"}},{"id":88,"name":"bindingContext","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The primary binding context that this view is data-bound to."},"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1100,"character":16}],"type":{"type":"reference","name":"Object"},"inheritedFrom":{"type":"reference","name":"View.bindingContext"}},{"id":85,"name":"container","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The Dependency Injection Container that was used to create this View instance."},"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1085,"character":11}],"type":{"type":"reference","name":"Container"},"inheritedFrom":{"type":"reference","name":"View.container"}},{"id":90,"name":"controller","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The Controller instance that owns this View."},"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1110,"character":12}],"type":{"type":"reference","name":"Controller"},"inheritedFrom":{"type":"reference","name":"View.controller"}},{"id":82,"name":"controllers","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"src/component-tester.ts","line":10,"character":13}],"type":{"type":"array","elementType":{"type":"reflection","declaration":{"id":83,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":84,"name":"viewModel","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"src/component-tester.ts","line":10,"character":25}],"type":{"type":"intrinsic","name":"any"}}],"groups":[{"title":"Variables","kind":32,"children":[84]}],"sources":[{"fileName":"src/component-tester.ts","line":10,"character":14}]}}}},{"id":87,"name":"fragment","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"Contains the DOM Nodes which represent this View. If the view was created via the \"enhance\" API, this will be an Element, otherwise it will be a DocumentFragment. If not created via \"enhance\" then the fragment will only contain nodes when the View is detached from the DOM."},"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1095,"character":10}],"type":{"type":"union","types":[{"type":"reference","name":"DocumentFragment"},{"type":"reference","name":"Element"}]},"inheritedFrom":{"type":"reference","name":"View.fragment"}},{"id":89,"name":"overrideContext","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The override context which contains properties capable of overriding those found on the binding context."},"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1105,"character":17}],"type":{"type":"reference","name":"Object"},"inheritedFrom":{"type":"reference","name":"View.overrideContext"}},{"id":86,"name":"viewFactory","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"The ViewFactory that built this View instance."},"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1090,"character":13}],"type":{"type":"reference","name":"ViewFactory"},"inheritedFrom":{"type":"reference","name":"View.viewFactory"}},{"id":109,"name":"addBinding","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":110,"name":"addBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a binding instance to this view."},"parameters":[{"id":111,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The binding instance.\n"},"type":{"type":"reference","name":"Object"}}],"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.addBinding"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1144,"character":12}],"inheritedFrom":{"type":"reference","name":"View.addBinding"}},{"id":117,"name":"appendNodesTo","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":118,"name":"appendNodesTo","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Appends this view's to the specified DOM node."},"parameters":[{"id":119,"name":"parent","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The parent element to append this view's nodes to.\n"},"type":{"type":"reference","name":"Element"}}],"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.appendNodesTo"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1161,"character":15}],"inheritedFrom":{"type":"reference","name":"View.appendNodesTo"}},{"id":122,"name":"attached","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":123,"name":"attached","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Triggers the attach for the view and its children."},"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.attached"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1171,"character":10}],"inheritedFrom":{"type":"reference","name":"View.attached"}},{"id":104,"name":"bind","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":105,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Binds the view and it's children."},"parameters":[{"id":106,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The binding context to bind to."},"type":{"type":"reference","name":"Object"}},{"id":107,"name":"overrideContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"A secondary binding context that can override the standard context.\n"},"type":{"type":"reference","name":"Object"}},{"id":108,"name":"_systemUpdate","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"true"},{"type":"intrinsic","name":"false"}]}}],"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.bind"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1138,"character":6}],"inheritedFrom":{"type":"reference","name":"View.bind"}},{"id":102,"name":"created","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":103,"name":"created","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Triggers the created callback for this view and its children."},"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.created"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1131,"character":9}],"inheritedFrom":{"type":"reference","name":"View.created"}},{"id":124,"name":"detached","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":125,"name":"detached","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Triggers the detach for the view and its children."},"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.detached"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1176,"character":10}],"inheritedFrom":{"type":"reference","name":"View.detached"}},{"id":114,"name":"insertNodesBefore","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":115,"name":"insertNodesBefore","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Inserts this view's nodes before the specified DOM node."},"parameters":[{"id":116,"name":"refNode","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The node to insert this view's nodes before.\n"},"type":{"type":"reference","name":"Node"}}],"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.insertNodesBefore"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1155,"character":19}],"inheritedFrom":{"type":"reference","name":"View.insertNodesBefore"}},{"id":120,"name":"removeNodes","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":121,"name":"removeNodes","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes this view's nodes from the DOM."},"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.removeNodes"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1166,"character":13}],"inheritedFrom":{"type":"reference","name":"View.removeNodes"}},{"id":100,"name":"returnToCache","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":101,"name":"returnToCache","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Returns this view to the appropriate view cache."},"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.returnToCache"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1126,"character":15}],"inheritedFrom":{"type":"reference","name":"View.returnToCache"}},{"id":112,"name":"unbind","kind":2048,"kindString":"Method","flags":{},"signatures":[{"id":113,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Unbinds the view and its children."},"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"View.unbind"}}],"sources":[{"fileName":"node_modules/aurelia-templating/dist/aurelia-templating.d.ts","line":1149,"character":8}],"inheritedFrom":{"type":"reference","name":"View.unbind"}}],"groups":[{"title":"Constructors","kind":512,"children":[91]},{"title":"Properties","kind":1024,"children":[88,85,90,82,87,89,86]},{"title":"Methods","kind":2048,"children":[109,117,122,104,102,124,114,120,100,112]}],"sources":[{"fileName":"src/component-tester.ts","line":9,"character":29}],"extendedTypes":[{"type":"reference","name":"View"}]}],"groups":[{"title":"Classes","kind":128,"children":[131,126]},{"title":"Interfaces","kind":256,"children":[59,81]}]},{"name":"\"src/view-spy\"","children":[{"id":8,"name":"ViewSpy","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Attribute to be placed on any HTML element in a view to emit the View instance\nto the debug console, giving you insight into the live View instance, including\nall child views, live bindings, behaviors and more."},"decorators":[{"name":"customAttribute","type":{"type":"reference","name":"customAttribute"},"arguments":{"name":"'view-spy'"}}],"children":[{"id":12,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates a new instance of ViewSpy."},"signatures":[{"id":13,"name":"new ViewSpy","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates a new instance of ViewSpy."},"type":{"type":"reference","name":"ViewSpy","id":8}}],"sources":[{"fileName":"src/view-spy.ts","line":13,"character":20}]},{"id":9,"name":"logger","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/view-spy.ts","line":11,"character":16}],"type":{"type":"reference","name":"Logger"}},{"id":10,"name":"value","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/view-spy.ts","line":12,"character":15}],"type":{"type":"intrinsic","name":"any"}},{"id":11,"name":"view","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"src/view-spy.ts","line":13,"character":14}],"type":{"type":"intrinsic","name":"any"}},{"id":14,"name":"_log","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":15,"name":"_log","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":16,"name":"lifecycleName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":17,"name":"context","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"reference","name":"__type"}]}}],"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/view-spy.ts","line":22,"character":14}]},{"id":24,"name":"attached","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":25,"name":"attached","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Invoked when the target element is attached to the DOM."},"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/view-spy.ts","line":50,"character":17}]},{"id":21,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":22,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Invoked when the target view is bound."},"parameters":[{"id":23,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target view's binding context.\n"},"type":{"type":"reference","name":"__type"}}],"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/view-spy.ts","line":43,"character":13}]},{"id":18,"name":"created","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":19,"name":"created","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Invoked when the target view is created."},"parameters":[{"id":20,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target view.\n"},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/view-spy.ts","line":34,"character":16}]},{"id":26,"name":"detached","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":27,"name":"detached","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Invoked when the target element is detached from the DOM."},"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/view-spy.ts","line":57,"character":17}]},{"id":28,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true,"isPublic":true},"signatures":[{"id":29,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Invoked when the target element is unbound."},"type":{"type":"intrinsic","name":"void"}}],"sources":[{"fileName":"src/view-spy.ts","line":64,"character":15}]}],"groups":[{"title":"Constructors","kind":512,"children":[12]},{"title":"Properties","kind":1024,"children":[9,10,11]},{"title":"Methods","kind":2048,"children":[14,24,21,18,26,28]}],"sources":[{"fileName":"src/view-spy.ts","line":10,"character":20}]}],"groups":[{"title":"Classes","kind":128,"children":[8]}]},{"name":"\"src/wait\"","children":[{"id":31,"name":"waitFor","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":32,"name":"waitFor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Generic function to wait for something to happen. Uses polling"},"typeParameter":[{"id":33,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":34,"name":"getter","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":35,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":36,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"typeParameter","name":"T"}}],"sources":[{"fileName":"src/wait.ts","line":9,"character":34}]}}},{"id":37,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":38,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":40,"name":"interval","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":11,"character":10}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}},{"id":39,"name":"present","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":10,"character":9}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"true"},{"type":"intrinsic","name":"false"}]}},{"id":41,"name":"timeout","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":12,"character":9}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Variables","kind":32,"children":[40,39,41]}],"sources":[{"fileName":"src/wait.ts","line":9,"character":52}]}},"defaultValue":" {present: true, interval: 50, timeout: 5000}"}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"typeParameter","name":"T"}]}}],"sources":[{"fileName":"src/wait.ts","line":9,"character":23}]},{"id":42,"name":"waitForDocumentElement","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":43,"name":"waitForDocumentElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":44,"name":"selector","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":45,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"reflection","declaration":{"id":46,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":48,"name":"interval","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":50,"character":10}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}},{"id":47,"name":"present","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":49,"character":9}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"true"},{"type":"intrinsic","name":"false"}]}},{"id":49,"name":"timeout","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":51,"character":9}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Variables","kind":32,"children":[48,47,49]}]}}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Element"}]}}],"sources":[{"fileName":"src/wait.ts","line":48,"character":38}]},{"id":50,"name":"waitForDocumentElements","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":51,"name":"waitForDocumentElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":52,"name":"selector","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":53,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"reflection","declaration":{"id":54,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":56,"name":"interval","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":58,"character":10}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}},{"id":55,"name":"present","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":57,"character":9}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"true"},{"type":"intrinsic","name":"false"}]}},{"id":57,"name":"timeout","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"src/wait.ts","line":59,"character":9}],"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Variables","kind":32,"children":[56,55,57]}]}}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"NodeListOf","typeArguments":[{"type":"reference","name":"Element"}]}]}}],"sources":[{"fileName":"src/wait.ts","line":56,"character":39}]}],"groups":[{"title":"Functions","kind":64,"children":[31,42,50]}]}],"groups":[{"title":"External modules","kind":1,"children":[202,1,58,7,30,206,207,208,270,284,258]}]} diff --git a/package.json b/package.json index 9b0a591..696631c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-testing", - "version": "1.0.0-beta.3.0.1", + "version": "1.0.0-beta.4.0.0", "description": "A collection of helpers for testing Aurelia apps and components.", "keywords": [ "aurelia", @@ -107,19 +107,5 @@ "tslint": "^5.6.0", "typedoc": "^0.8.0", "typescript": "^2.4.2" - }, - "aurelia": { - "documentation": { - "articles": [ - { - "title": "Testing Components", - "href": "doc/article/en-US/testing-components.md" - }, - { - "title": "End-to-End Testing", - "href": "doc/article/en-US/end-to-end-testing.md" - } - ] - } } }