Skip to content

Commit

Permalink
failonstatuscode false
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamguys committed Apr 11, 2024
1 parent 30e08cb commit ebf786c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
16 changes: 7 additions & 9 deletions cypress/e2e/irctc.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@ let username = Cypress.env('USERNAME')
let password = Cypress.env('PASSWORD')
import { PASSENGER_DETAILS, SOURCE_STATION, DESTINATION_STATION, TRAIN_NO, TRAIN_COACH, TRAVEL_DATE, TATKAL, BOARDING_STATION, UPI_ID_CONFIG } from '../fixtures/passenger_data.json'




describe('IRCTC TATKAL BOOKING', () => {
it('Tatkal Booking Begins......', () => {
// Catching Load Event Exception..
cy.on('fail', (err, runnable) => {
if (String(err).includes('Your page did not fire its `load` event')) {
return true
}
else {
return false

}
cy.viewport(1478, 1056)
cy.visit('https://www.irctc.co.in/nget/train-search', {
failOnStatusCode: false
})

cy.viewport(1478, 1056)
cy.visit('https://www.irctc.co.in/nget/train-search', { timeout: 48000 })

cy.task("log", `Website Fetching completed.........`)
const UPI_ID = Cypress.env().UPI_ID ? Cypress.env().UPI_ID : UPI_ID_CONFIG;
const upiRegex = /^[a-zA-Z0-9]+@[a-zA-Z0-9.]+$/;
Expand Down
5 changes: 0 additions & 5 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ import { formatDate, hasTatkalAlreadyOpened, tatkalOpenTimeForToday } from "../u
const MANUAL_CAPTCHA = Cypress.env('MANUAL_CAPTCHA')


Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
return false
})

Cypress.Commands.add('submitCaptcha', () => {

Expand Down

0 comments on commit ebf786c

Please sign in to comment.