Skip to content

Commit

Permalink
document failOnStatusCode for cy.visit
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Dec 4, 2017
1 parent f6e87c9 commit da374e3
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions cli/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,13 @@ declare namespace Cypress {
env?: object;
}

/**
*
*
* @interface RequestOptions
* @extends {Loggable}
* @extends {Timeoutable}
*/
interface RequestOptions extends Loggable, Timeoutable {
auth?: object;
body?: RequestBody;
Expand Down Expand Up @@ -855,6 +862,7 @@ declare namespace Cypress {
* @interface VisitOptions
* @extends {Loggable}
* @extends {Timeoutable}
* @see https://on.cypress.io/visit
*/
interface VisitOptions extends Loggable, Timeoutable {
/**
Expand All @@ -863,14 +871,24 @@ declare namespace Cypress {
* @param {Window} contentWindow the remote page's window object
* @memberof VisitOptions
*/
onBeforeLoad?(window: Window): void;
onBeforeLoad?(win: Window): void;

/**
* Called once your page has fired its load event.
*
* @param {Window} contentWindow the remote page's window object
* @memberof VisitOptions
*/
onLoad?(window: Window): void;
onLoad?(win: Window): void;

/**
* Whether to fail on response codes other than 2xx and 3xx
*
* @type {boolean}
* @default {true}
* @memberof VisitOptions
*/
failOnStatusCode?: boolean;
}

/**
Expand Down

0 comments on commit da374e3

Please sign in to comment.