Class CypressAngularComponentHelper<T>

Classdes

CypressAngularComponentHelper exposes the following public properties:

Type Parameters

  • T

    component type

Hierarchy

  • CypressAngularComponentHelper

Constructors

Properties

Constructors

Properties

fixture: any
get: {
    component: (() => T);
} = ...

enables getting the mounted component

Type declaration

  • component: (() => T)
      • (): T
      • Get mounted component

        Returns T

when: {
    mount: ((componentType, config, componentProperties?) => PromiseLike<ComponentFixture<T>>);
} = ...

enables mounting of an Angular component

Type declaration

  • mount: ((componentType, config, componentProperties?) => PromiseLike<ComponentFixture<T>>)
      • (componentType, config, componentProperties?): PromiseLike<ComponentFixture<T>>
      • mount an angular component, with autoSpyOutputs set to true, meaning all event emitters are automatically spied on and be accessed during a test using

        helper.get.spy("<EventEmitterName>")
        

        Parameters

        • componentType: string | Type<T>
        • config: MountConfig<T>
        • Optional componentProperties: Partial<{
              [P in string | number | symbol]: T[P]
          }>

        Returns PromiseLike<ComponentFixture<T>>

        Example

        helper.when.mount(
        Type<AvatarComponent>,
        {
        declarations: [AvatarComponent],
        },
        {
        initials: 'JD',
        picture: 'assets/avatar/def-user-male.png',
        }
        )

Generated using TypeDoc