cypress-network-idle
Advanced tools
Comparing version 1.14.0 to 1.14.1
{ | ||
"name": "cypress-network-idle", | ||
"version": "1.14.0", | ||
"version": "1.14.1", | ||
"description": "A little Cypress.io plugin for waiting for network to be idle before continuing with the test", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
// load type definitions that come with Cypress module | ||
/// <reference types="cypress" /> | ||
// Ughh, cannot import network types from cypress | ||
// since it seems to break the global interface merging | ||
// so let's just type the basics of request and response | ||
interface BaseMessage { | ||
/** | ||
* The body of the HTTP message. | ||
* If a JSON Content-Type was used and the body was valid JSON, this will be an object. | ||
* If the body was binary content, this will be a buffer. | ||
*/ | ||
body: any | ||
/** | ||
* The headers of the HTTP message. | ||
*/ | ||
headers: { [key: string]: string | string[] } | ||
} | ||
type IncomingRequest = BaseMessage & { | ||
/** | ||
* Request HTTP method (GET, POST, ...). | ||
*/ | ||
method: string | ||
/** | ||
* Request URL. | ||
*/ | ||
url: string | ||
/** | ||
* URL query string as object. | ||
*/ | ||
query: Record<string, string | number> | ||
/** | ||
* The HTTP version used in the request. Read only. | ||
*/ | ||
httpVersion: string | ||
/** | ||
* The resource type that is being requested, according to the browser. | ||
*/ | ||
resourceType: ResourceType | ||
/** | ||
* If provided, the number of milliseconds before an upstream response to this request | ||
* will time out and cause an error. By default, `responseTimeout` from config is used. | ||
*/ | ||
responseTimeout?: number | ||
/** | ||
* Set if redirects should be followed when this request is made. By default, requests will | ||
* not follow redirects before yielding the response (the 3xx redirect is yielded) | ||
*/ | ||
followRedirect?: boolean | ||
/** | ||
* If set, `cy.wait` can be used to await the request/response cycle to complete for this | ||
* request via `cy.wait('@alias')`. | ||
*/ | ||
alias?: string | ||
} | ||
type IncomingResponse = BaseMessage & { | ||
/** | ||
* The HTTP status code of the response. | ||
*/ | ||
statusCode: number | ||
/** | ||
* The HTTP status message. | ||
*/ | ||
statusMessage: string | ||
/** | ||
* Kilobytes per second to send 'body'. | ||
*/ | ||
throttleKbps?: number | ||
/** | ||
* Milliseconds to delay before the response is sent. | ||
*/ | ||
delay?: number | ||
} | ||
declare namespace Cypress { | ||
@@ -82,7 +156,4 @@ interface Chainable<Subject> { | ||
*/ | ||
failOn?: ( | ||
req: CyHttpMessages.IncomingHttpRequest, | ||
res: CyHttpMessages.IncomingHttpResponse, | ||
) => string | undefined | ||
failOn?: (req: IncomingRequest, res: IncomingResponse) => string | undefined | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22188
412