Type alias WithCy<T>

WithCy<T>: {
    cy?: CyTest | CyObj;
    cyOnly?: boolean;
    cySkip?: boolean;
    cyTest?: CyTestProp<T> | string | boolean;
    cyUnitTest?: boolean;
}

Additional properties which can be added to stories to control cypress

Type Parameters

  • T

Type declaration

  • Optional cy?: CyTest | CyObj

    Either a function directly, or an object of test description keys to test function values. A major advantage here is there is no need to mount or pass mocked actions to the component just write some assertions

  • Optional cyOnly?: boolean

    use it.only for the test(s) for this component

  • Optional cySkip?: boolean

    use it.skip for the test(s) for this component

  • Optional cyTest?: CyTestProp<T> | string | boolean

    Write a function that will execute within cypress and so can contain it, beforeEach, it.skip etc. Can also be a string representation of the same which will be eval evaluated. A boolean, when combined with cyCodeBlock means it should execute outside of a cypress it

  • Optional cyUnitTest?: boolean

    use the UnitTest component