From d1a873be30ae8ecb211cb7de2def9809975ca9d6 Mon Sep 17 00:00:00 2001 From: Shivam Pandey Date: Wed, 10 Apr 2024 14:01:05 +0530 Subject: [PATCH] using wait on UPI Tested... --- .github/workflows/irctc.yml | 4 ++-- cypress/e2e/irctc.cy.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/irctc.yml b/.github/workflows/irctc.yml index 6b61544..1ba64c8 100644 --- a/.github/workflows/irctc.yml +++ b/.github/workflows/irctc.yml @@ -1,3 +1,4 @@ +name: IRCTC Automation Booking on: push: branches: @@ -17,7 +18,6 @@ on: required: true type: string description: "Your IRCTC Password" -name: "IRCTC Automation Booking ${{ inputs.BOOKING_DESC }}" jobs: IRCTC-Booking: runs-on: ubuntu-latest @@ -49,4 +49,4 @@ jobs: uses: cypress-io/github-action@v6 with: browser: chrome - command: npx cypress run --record --key a15b31a6-b9ee-4678-b9ac-f45a190851fe --browser chrome --env USERNAME=${{ inputs.USERNAME || secrets.USERNAME }},PASSWORD=${{ inputs.PASSWORD || secrets.PASSWORD }} + command: npx cypress run --record --key a15b31a6-b9ee-4678-b9ac-f45a190851fe --env USERNAME=${{ inputs.USERNAME || secrets.USERNAME }},PASSWORD=${{ inputs.PASSWORD || secrets.PASSWORD }} diff --git a/cypress/e2e/irctc.cy.js b/cypress/e2e/irctc.cy.js index 32ebe8b..f49ba6b 100644 --- a/cypress/e2e/irctc.cy.js +++ b/cypress/e2e/irctc.cy.js @@ -231,7 +231,7 @@ describe('IRCTC TATKAL BOOKING', () => { if (UPI_ID) { cy.get('#ptm-upi').click() cy.get('.brdr-box > :nth-child(2) > ._1WLd > :nth-child(1) > .xs-hover-box > ._Mzth > .form-ctrl').type(UPI_ID) - cy.get('.btn').click() + cy.get(':nth-child(5) > section > .btn').click() // Waiting For 2 Mins for the user to pay In Case --no-exit option is emitted cy.wait(120000)