Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.29 KB

File metadata and controls

26 lines (18 loc) · 1.29 KB

logging-in-xhr-web-form

Log into the server using XHR from end-to-end tests

See the login XHR code in login.hbs

Tests

  • Test an AJAX backed username/password form.
  • Test errors submitting invalid data.
  • Stub JSON based XHR requests.
  • Stub application functions.
  • Create a custom cy.login() test command.
  • Bypass needing to use your actual UI.
  • Increase speed of testing with cy.request().

Test files in cypress/integration folder show:

tip to start the server and run Cypress GUI use script npm run dev

Highly recommended: watch video "Organizing Tests, Logging In, Controlling State"