-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.d.ts
22 lines (20 loc) · 788 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/// <reference types="cypress" />
// All Stripe Elements fields have a `data-elements-stable-field-name`
// attribute that can be used to target it.
//
// This type is meant to hint you about the basic card input fields you can fill.
//
// In case we haven't added a stable field name to this list, you can always
// fallback to passing a `string`.
declare module "cypress-plugin-stripe-elements" {
export type CypressStripeElementsFieldName = 'cardCvc' | 'cardNumber' | 'cardExpiry' | 'postalCode' | string;
}
declare namespace Cypress {
interface Chainable {
/**
* Custom command to select DOM element by data-cy attribute.
* @example cy.dataCy('greeting')
*/
fillElementsInput(field: CypressStripeElementsFieldName, value: string): Chainable<Element>
}
}