interface Commands {
    addUser(email, password, projectName, localId?): Chainable<{}, any>;
    clearAuth(projectName): Chainable<void, any>;
    clearEmulatorStorage(projectName, storageBucket, folder): Chainable<any, any>;
    clearFirestore(projectName): Chainable<void, any>;
    deleteCollection(collectionPath, projectName): Chainable<any, any>;
    killEmulator(): Chainable<void, any>;
    setupEmulator(setupFunc, project, storageBucket?): Chainable<void, any>;
    startEmulator(projectName, databaseToImport?, suiteId?, exportDataOnExit?, only?): Chainable<void, any>;
}

Methods

  • Adds a new user to the emulator

    Parameters

    • email: string
    • password: string
    • projectName: string
    • Optional localId: string

      To define a deterministic id for the user

    Returns Chainable<{}, any>

  • Clear the current firestore database

    Parameters

    • projectName: string

    Returns Chainable<void, any>

  • Deletes all files from the storage emulator

    Parameters

    • projectName: string
    • storageBucket: string
    • folder: string

    Returns Chainable<any, any>

  • Clear the current firestore database

    Parameters

    • projectName: string

    Returns Chainable<void, any>

  • Clears a collection so you don't need to manually clean each item

    Parameters

    • collectionPath: string
    • projectName: string

    Returns Chainable<any, any>

  • This function force kills all emulator related ports

    Returns Chainable<void, any>

  • Gives access to the admin interface for managing and setting up the emulator environment

    Parameters

    • setupFunc: ((firestore, storage, admin) => Promise<void>)
        • (firestore, storage, admin): Promise<void>
        • Parameters

          • firestore: Firestore
          • storage: Storage
          • admin: Auth

          Returns Promise<void>

    • project: string
    • Optional storageBucket: string

    Returns Chainable<void, any>

  • This function tries to start an emulator

    It also keeps the emulator running until it changes

    Parameters

    • projectName: string

      A required project name for the emulator to start with

    • Optional databaseToImport: string

      a (preferably absolute) path to the emulator backup

    • Optional suiteId: string

      an identifier for the emulator, so it can detect when to reinstanciate between tests (usefull for describe blocks)

      If you require the emulator to be recreated after the tests use the function cy.killEmulator() on a afterEach block

    • Optional exportDataOnExit: boolean
    • Optional only: string[] | ("functions" | "hosting" | "firestore" | "storage" | "auth")[]

    Returns Chainable<void, any>

Generated using TypeDoc