refactor(ct-angular): fix angular outputs
This commit is contained in:
parent
048cb7dd8a
commit
d50eb338f3
|
|
@ -61,19 +61,15 @@ window.playwrightUnmount = async rootElement => {
|
||||||
};
|
};
|
||||||
|
|
||||||
window.playwrightUpdate = async (rootElement, component) => {
|
window.playwrightUpdate = async (rootElement, component) => {
|
||||||
await resolveComponent(component);
|
if (component.slots)
|
||||||
if (component.kind === 'jsx')
|
|
||||||
throw new Error('JSX mount notation is not supported');
|
|
||||||
|
|
||||||
if (component.options?.slots)
|
|
||||||
throw new Error('Update slots is not supported yet');
|
throw new Error('Update slots is not supported yet');
|
||||||
|
|
||||||
const fixture = __pwFixtureRegistry.get(rootElement.id);
|
const fixture = __pwFixtureRegistry.get(rootElement.id);
|
||||||
if (!fixture)
|
if (!fixture)
|
||||||
throw new Error('Component was not mounted');
|
throw new Error('Component was not mounted');
|
||||||
|
|
||||||
__pwUpdateProps(fixture, component.options?.props);
|
__pwUpdateProps(fixture, component.props);
|
||||||
__pwUpdateEvents(fixture, component.options?.on);
|
__pwUpdateEvents(fixture, component.on);
|
||||||
|
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
};
|
};
|
||||||
|
|
@ -124,11 +120,6 @@ async function __pwRenderComponent(component) {
|
||||||
return fixture;
|
return fixture;
|
||||||
}
|
}
|
||||||
|
|
||||||
// async function __pwResolveComponent(component) {
|
|
||||||
// // const component = await window.__pwRegistry.resolveImportRef(component.type);
|
|
||||||
// return await
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {import('@angular/core/testing').ComponentFixture} fixture
|
* @param {import('@angular/core/testing').ComponentFixture} fixture
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue