refactor(ct-angular): clean up slots remains
This commit is contained in:
parent
e22b5cf85c
commit
fb3dd0cf8f
4
packages/playwright-ct-angular/index.d.ts
vendored
4
packages/playwright-ct-angular/index.d.ts
vendored
|
|
@ -36,15 +36,11 @@ export type PlaywrightTestConfig<T = {}, W = {}> = Omit<BasePlaywrightTestConfig
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
type ComponentSlot = string | string[];
|
|
||||||
type ComponentSlots = Record<string, ComponentSlot> & { default?: ComponentSlot };
|
|
||||||
|
|
||||||
type ComponentEvents = Record<string, Function>;
|
type ComponentEvents = Record<string, Function>;
|
||||||
|
|
||||||
export interface MountOptions<HooksConfig extends JsonObject, Component> {
|
export interface MountOptions<HooksConfig extends JsonObject, Component> {
|
||||||
props?: Partial<Component> | Record<string, unknown>, // TODO: filter props and handle signals
|
props?: Partial<Component> | Record<string, unknown>, // TODO: filter props and handle signals
|
||||||
providers?: Provider[],
|
providers?: Provider[],
|
||||||
slots?: ComponentSlots;
|
|
||||||
on?: ComponentEvents;
|
on?: ComponentEvents;
|
||||||
hooksConfig?: HooksConfig;
|
hooksConfig?: HooksConfig;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,9 +68,6 @@ window.playwrightUnmount = async rootElement => {
|
||||||
* @param {{type: import('@angular/core').Type<unknown>} & import('./index').MountOptions | {type: string} & import('./index').MountTemplateOptions} component
|
* @param {{type: import('@angular/core').Type<unknown>} & import('./index').MountOptions | {type: string} & import('./index').MountTemplateOptions} component
|
||||||
*/
|
*/
|
||||||
window.playwrightUpdate = async (rootElement, component) => {
|
window.playwrightUpdate = async (rootElement, component) => {
|
||||||
if (component.slots)
|
|
||||||
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');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue