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>;
|
||||
|
||||
export interface MountOptions<HooksConfig extends JsonObject, Component> {
|
||||
props?: Partial<Component> | Record<string, unknown>, // TODO: filter props and handle signals
|
||||
providers?: Provider[],
|
||||
slots?: ComponentSlots;
|
||||
on?: ComponentEvents;
|
||||
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
|
||||
*/
|
||||
window.playwrightUpdate = async (rootElement, component) => {
|
||||
if (component.slots)
|
||||
throw new Error('Update slots is not supported yet');
|
||||
|
||||
const fixture = __pwFixtureRegistry.get(rootElement.id);
|
||||
if (!fixture)
|
||||
throw new Error('Component was not mounted');
|
||||
|
|
|
|||
Loading…
Reference in a new issue