-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add getIframeElement for accessing iframe elements
- Loading branch information
1 parent
f53537a
commit 278f1b5
Showing
2 changed files
with
79 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,45 @@ | ||
|
||
export { }; // indicate that file is a module | ||
export {}; // indicate that file is a module | ||
|
||
export type CustomerData = { | ||
cardNo: string | ||
cardExpiry: string | ||
cardCVV: string | ||
cardHolderName: string | ||
email: string | ||
address: string | ||
city: string | ||
country: string | ||
state: string | ||
postalCode: string | ||
threeDSCardNo: string | ||
} | ||
cardNo: string; | ||
cardExpiry: string; | ||
cardCVV: string; | ||
cardHolderName: string; | ||
email: string; | ||
address: string; | ||
city: string; | ||
country: string; | ||
state: string; | ||
postalCode: string; | ||
threeDSCardNo: string; | ||
}; | ||
|
||
declare global { | ||
namespace Cypress { | ||
interface Chainable { | ||
enterValueInIframe(selector: string, value: string): Chainable<JQuery<HTMLElement>> | ||
selectValueInIframe(selector: string, value: string): Chainable<JQuery<HTMLElement>> | ||
hardReload(): Chainable<JQuery<HTMLElement>> | ||
testDynamicFields( | ||
customerData: CustomerData, testIdsToRemoveArr: string[], isThreeDSEnabled: boolean | ||
): Chainable<JQuery<HTMLElement>> | ||
createPaymentIntent(secretKey: string, createPaymentBody: Record<string, any>): Chainable<Response<any>> | ||
getGlobalState(key: string): Chainable<Response<any>> | ||
} | ||
namespace Cypress { | ||
interface Chainable { | ||
enterValueInIframe( | ||
selector: string, | ||
value: string | ||
): Chainable<JQuery<HTMLElement>>; | ||
selectValueInIframe( | ||
selector: string, | ||
value: string | ||
): Chainable<JQuery<HTMLElement>>; | ||
hardReload(): Chainable<JQuery<HTMLElement>>; | ||
testDynamicFields( | ||
customerData: CustomerData, | ||
testIdsToRemoveArr: string[], | ||
isThreeDSEnabled: boolean | ||
): Chainable<JQuery<HTMLElement>>; | ||
createPaymentIntent( | ||
secretKey: string, | ||
createPaymentBody: Record<string, any> | ||
): Chainable<Response<any>>; | ||
getGlobalState(key: string): Chainable<Response<any>>; | ||
getIframeElement( | ||
iframeSelector: string, | ||
elementSelector: string | ||
): Chainable<JQuery<HTMLElement>>; | ||
} | ||
} | ||
} | ||
} |