feat(test): add element probe
Usage: bootstrap the app with the special binding `ELEMENT_PROBE_CONFIG` from `angular2/debug`. This will provide a global method `ngProbe(element)` that will expose a `DebugElement` with directive instances, ... on it. During tests that use Angular's test injector, the probe is enabled by default. The `DebugElement ` can be retrieved via the function `inspectDomElement` of `angular2/debug`. Note that the `TestComponentBuilder` already returns `DebugElement `s. Closes #1992
This commit is contained in:
@ -725,9 +725,7 @@ export function main() {
|
||||
var updateHost = injector.get(DirectiveUpdatingHostActions);
|
||||
|
||||
ObservableWrapper.subscribe(updateHost.setAttr, (_) => {
|
||||
expect(stringifyElement(domElement))
|
||||
.toEqual(
|
||||
'<div class="ng-binding" key="value" update-host-actions=""></div>');
|
||||
expect(DOM.hasAttribute(domElement, 'update-host-actions')).toBe(true);
|
||||
async.done();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user