cumulocity-cypress
Version:
Cypress commands for Cumulocity IoT
20 lines (19 loc) • 1.13 kB
TypeScript
import { C8yPactInfo, C8yPactRecord } from "../../shared/c8ypact";
import { C8yClientOptions } from "../../shared/c8yclient";
declare global {
namespace Cypress {
interface Chainable {
/**
* Compares a given Cypress.Response object with a C8yPactRecord contract or a json schema.
* match ing fails, an C8yPactError is thrown.
*
* @param response - A Cypress.Response object representing the HTTP response.
* @param record - A C8yPactRecord object representing the contract.
* @param info - An optional C8yPactInfo object that may contain additional information for processing the contract.
* @param options - An optional C8yClientOptions object that may contain various options for the behavior of the c8ymatch function.
*/
c8ymatch(response: Cypress.Response<any>, record: Partial<C8yPactRecord>, info?: Partial<C8yPactInfo>, options?: C8yClientOptions): Cypress.Chainable<void>;
c8ymatch(response: Cypress.Response<any>, schema: any): Cypress.Chainable<void>;
}
}
}