Skip to content

Commit

Permalink
cypress.env.json removed from .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamguys committed Apr 10, 2024
1 parent c05f8ab commit 86a7a1a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules/
cypress.env.json
.idea
cypress/videos/
cypress/screenshots/
Expand Down
5 changes: 5 additions & 0 deletions cypress.env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"username": "yourusername",
"password": "yourpassword",
"MANUAL_CAPTCHA": false
}
16 changes: 2 additions & 14 deletions cypress/e2e/irctc.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,6 @@ describe('IRCTC TATKAL BOOKING', () => {

}

/*
OLD FILLING NAME CODE, CHECKING IF BELOW NEW ONE IS STABLE OR NOT............WOULD BE REMOVED LATER IF BELOW ONE WORKS
cy.get('.ui-autocomplete >').each((inputDiv, index) => {
cy.wrap(inputDiv).click()
cy.wrap(inputDiv).focused().clear()
let PASSENGER = PASSENGER_DETAILS[index]
cy.wrap(inputDiv).invoke('val', PASSENGER['NAME']).trigger('input')
})
*/


// FOR NAME
cy.get('.ui-autocomplete input').each((inputField, index) => {
Expand All @@ -124,6 +110,7 @@ describe('IRCTC TATKAL BOOKING', () => {

// Check if the passenger object contains 'NAME' property
if (PASSENGER && PASSENGER['NAME']) {
cy.task("log", 'Passenger Filing STARTED......')
// Clear the input field and set its value to the passenger's name
cy.wrap(inputField).clear().type(PASSENGER['NAME']);
} else {
Expand All @@ -144,6 +131,7 @@ describe('IRCTC TATKAL BOOKING', () => {
let PASSENGER = PASSENGER_DETAILS[index]

cy.wrap(inputDiv).invoke('val', PASSENGER['AGE']).trigger('input')
cy.task("log", 'Age Filing STARTED......')

})

Expand Down
10 changes: 5 additions & 5 deletions cypress/fixtures/passenger_data.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"TRAIN_NO": "12310",
"TRAIN_COACH": "3A",
"TRAVEL_DATE": "16/06/2024",
"SOURCE_STATION": "NDLS",
"TRAIN_NO": "11072",
"TRAIN_COACH": "2A",
"TRAVEL_DATE": "11/04/2024",
"SOURCE_STATION": "BSB",
"BOARDING_STATION": null,
"DESTINATION_STATION": "PNBE",
"DESTINATION_STATION": "LTT",
"TATKAL": false,
"UPI_ID": "",
"PASSENGER_DETAILS": [
Expand Down

0 comments on commit 86a7a1a

Please sign in to comment.