payment.ts 460 B

123456789101112
  1. export function fillForm() {
  2. cy.findByTestId('test-card-element').within(() => {
  3. cy.get('input').each(el => {
  4. cy.wrap(el).type('1', { delay: 0 })
  5. })
  6. })
  7. cy.findByLabelText(/first name/i).type('1', { delay: 0 })
  8. cy.findByLabelText(/last name/i).type('1', { delay: 0 })
  9. cy.findByLabelText('Address').type('1', { delay: 0 })
  10. cy.findByLabelText(/postal code/i).type('1', { delay: 0 })
  11. cy.findByLabelText(/country/i).select('Bulgaria')
  12. }