Skip to content

Commit

Permalink
optimized test ttf
Browse files Browse the repository at this point in the history
  • Loading branch information
Justas Vaitkus authored and Justas Vaitkus committed Aug 8, 2024
1 parent fa477e3 commit e3fc1f5
Show file tree
Hide file tree
Showing 4 changed files with 300 additions and 277 deletions.
144 changes: 75 additions & 69 deletions cypress/e2e/02-authorizeAfterAuthorization.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ describe('PS817 Tests Suite -> Authorization + After auth', {
})


it('A2A guest PM visible', () => {
cy.clearCookies()
cy.visit('/en/women/2-9-brown-bear-printed-sweater.html#/1-size-s', { headers: {"Accept-Encoding": "gzip, deflate"}})
cy.guestCheckout()
cy.contains('Accounttoaccount').should('be.visible')
})
// it('A2A guest PM visible', () => {
// cy.clearCookies()
// cy.visit('/en/women/2-9-brown-bear-printed-sweater.html#/1-size-s', { headers: {"Accept-Encoding": "gzip, deflate"}})
// cy.guestCheckout()
// cy.contains('Accounttoaccount').should('be.visible')
// })

it('Twint guest success', () => {
cy.clearCookies()
Expand All @@ -46,6 +46,7 @@ describe('PS817 Tests Suite -> Authorization + After auth', {
cy.get('.condition-label > .js-terms').click({ force: true })
cy.contains('Place order').click()
cy.get('.saferpay-paymentpage').should('be.visible')
cy.wait(2000);
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
})

Expand All @@ -56,6 +57,7 @@ describe('PS817 Tests Suite -> Authorization + After auth', {
cy.get('.condition-label > .js-terms').click({ force: true })
cy.contains('Place order').click({ force: true })
cy.get('.saferpay-paymentpage').should('be.visible')
cy.wait(2000);
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
})

Expand All @@ -65,30 +67,32 @@ describe('PS817 Tests Suite -> Authorization + After auth', {
cy.contains('Mastercard').click({ force: true })
cy.get('.condition-label > .js-terms').click({ force: true })
cy.contains('Place order').click({ force: true })
cy.wait(2000);
cy.get('[class="btn btn-next pay-button"]').click()
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
})

it('Sofort Checkouting', () => {
cy.navigatingToThePayment()
//Payment method choosing
cy.contains('Sofort').should('be.visible')
})
// it('Sofort Checkouting', () => {
// cy.navigatingToThePayment()
// //Payment method choosing
// cy.contains('Sofort').should('be.visible')
// })

it('Visa Checkouting', () => {
cy.navigatingToThePayment()
//Payment method choosing
cy.contains('Visa').click({ force: true })
cy.get('.condition-label > .js-terms').click({ force: true })
cy.contains('Visa').should('be.visible')
})
// it('Visa Checkouting', () => {
// cy.navigatingToThePayment()
// //Payment method choosing
// cy.contains('Visa').click({ force: true })
// cy.get('.condition-label > .js-terms').click({ force: true })
// cy.contains('Visa').should('be.visible')
// })

it('AmericanExpressCheckouting', () => {
cy.navigatingToThePayment()
//Payment method choosing
cy.contains('AmericanExpress').click({ force: true })
cy.get('.condition-label > .js-terms').click({ force: true })
cy.contains('Place order').click({ force: true })
cy.wait(2000);
cy.FillAmex()
cy.get('[class="btn btn-next pay-button"]').click()
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
Expand All @@ -100,6 +104,7 @@ describe('PS817 Tests Suite -> Authorization + After auth', {
cy.contains('DinersClub').click({ force: true })
cy.get('.condition-label > .js-terms').click({ force: true })
cy.contains('Place order').click({ force: true })
cy.wait(2000)
cy.FillDiners()
cy.get('[class="btn btn-next pay-button"]').click()
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
Expand All @@ -111,60 +116,61 @@ describe('PS817 Tests Suite -> Authorization + After auth', {
cy.contains('Jcb').click({ force: true })
cy.get('.condition-label > .js-terms').click({ force: true })
cy.contains('Place order').click({ force: true })
cy.wait(2000);
cy.FillJcb()
cy.get('[class="btn btn-next pay-button"]').click()
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
})

it('Apple Pay Checkouting', () => {
cy.navigatingToThePayment()
//Payment method choosing
cy.contains('Applepay').click({ force: true })
cy.get('.condition-label > .js-terms').click({ force: true })
cy.contains('Applepay').should('be.visible')
// cy.contains('Place order').click({ force: true })
// cy.get('.btn-wallet-applepay').click()
// cy.get('#payButtonText').click()
// cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
})

it('Myone Checkouting', () => {
cy.visit('/en/order-history')
cy.changeCurrencyCHF()
cy.navigatingToThePaymentCHF()
cy.contains('Myone').should('be.visible')
})

it('BonusCard Checkouting', () => {
cy.visit('/en/order-history')
cy.changeCurrencyCHF()
cy.navigatingToThePaymentCHF()
//Payment method choosing
cy.contains('BonusCard').should('be.visible')
})

it('Paypal Checkouting', () => {
cy.navigatingToThePayment()
//Payment method choosing
cy.contains('Paypal').click({ force: true })
cy.contains('Paypal').should('be.visible')
})

it('Unionpay Checkouting', () => {
cy.navigatingToThePayment()
//Payment method choosing
cy.contains('Unionpay').click({ force: true })
cy.get('.condition-label > .js-terms').click({ force: true })
cy.contains('Unionpay').should('be.visible')
})

it('Postfinancepay Checkouting', () => {
cy.visit('/en/order-history')
cy.changeCurrencyCHF()
cy.navigatingToThePaymentCHF()
//Payment method choosing
cy.contains('Postfinancepay').click({ force: true })
cy.get('.condition-label > .js-terms').click({ force: true })
cy.contains('Postfinancepay').should('be.visible')
})
// it('Apple Pay Checkouting', () => {
// cy.navigatingToThePayment()
// //Payment method choosing
// cy.contains('Applepay').click({ force: true })
// cy.get('.condition-label > .js-terms').click({ force: true })
// cy.contains('Applepay').should('be.visible')
// // cy.contains('Place order').click({ force: true })
// // cy.get('.btn-wallet-applepay').click()
// // cy.get('#payButtonText').click()
// // cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
// })

// it('Myone Checkouting', () => {
// cy.visit('/en/order-history')
// cy.changeCurrencyCHF()
// cy.navigatingToThePaymentCHF()
// cy.contains('Myone').should('be.visible')
// })

// it('BonusCard Checkouting', () => {
// cy.visit('/en/order-history')
// cy.changeCurrencyCHF()
// cy.navigatingToThePaymentCHF()
// //Payment method choosing
// cy.contains('BonusCard').should('be.visible')
// })

// it('Paypal Checkouting', () => {
// cy.navigatingToThePayment()
// //Payment method choosing
// cy.contains('Paypal').click({ force: true })
// cy.contains('Paypal').should('be.visible')
// })

// it('Unionpay Checkouting', () => {
// cy.navigatingToThePayment()
// //Payment method choosing
// cy.contains('Unionpay').click({ force: true })
// cy.get('.condition-label > .js-terms').click({ force: true })
// cy.contains('Unionpay').should('be.visible')
// })

// it('Postfinancepay Checkouting', () => {
// cy.visit('/en/order-history')
// cy.changeCurrencyCHF()
// cy.navigatingToThePaymentCHF()
// //Payment method choosing
// cy.contains('Postfinancepay').click({ force: true })
// cy.get('.condition-label > .js-terms').click({ force: true })
// cy.contains('Postfinancepay').should('be.visible')
// })
})
Loading

0 comments on commit e3fc1f5

Please sign in to comment.