Skip to content

Commit 3a3f6ff

Browse files
committed
Add transaction component no 3ds working
1 parent 51330f9 commit 3a3f6ff

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default defineConfig({
2525

2626
projects: [
2727
{
28-
name: 'matrix',
28+
name: 'transaction-tests',
2929
use: { ...devices['Desktop Chrome'] },
3030
testMatch: '**/payment-gateway-matrix.spec.ts',
3131
},

tests/fixtures/test-configurations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function generateTestConfigurations(options: {
6767
*/
6868
export const TEST_CONFIGURATIONS = {
6969
QUICK: generateTestConfigurations({
70-
paymentMethods: [PAYMENT_METHODS.CREDIT_CARD_HOSTED],
70+
paymentMethods: [PAYMENT_METHODS.CREDIT_CARD_SUCCESS],
7171
checkoutTypes: [CHECKOUT_TYPES.CLASSIC],
7272
productTypes: [PRODUCT_TYPES.SIMPLE],
7373
userStates: [USER_STATES.GUEST],

tests/helpers/payment-processors/credit-card-processor.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,16 @@ export class CreditCardProcessor {
5757

5858
await this.page.getByTestId(this.submitButton).click();
5959
} else {
60-
await this.page.getByTestId(this.cardNumberInput).fill(cardDetails.cardNumber);
61-
await this.page.getByTestId(this.cardExpiryInput).fill(cardDetails.expiry);
62-
await this.page.getByTestId(this.cardCvcInput).fill(cardDetails.cvc);
60+
const frameLocator = this.page.frameLocator('iframe[name^="__zoid__monei_card_input__"]');
61+
6362
await this.page.getByTestId(this.cardholderNameInput).fill(cardDetails.cardholderName);
63+
64+
await frameLocator.getByTestId(this.cardNumberInput).fill(cardDetails.cardNumber);
65+
await frameLocator.getByTestId(this.cardExpiryInput).fill(cardDetails.expiry);
66+
await frameLocator.getByTestId(this.cardCvcInput).fill(cardDetails.cvc);
6467
await this.clickWooSubmitButton()
6568
if (preset === 'threeDSecure') {
6669
await this.complete3DSecure();
67-
} else {
68-
await this.page.waitForNavigation({ waitUntil: 'networkidle' });
6970
}
7071
}
7172
}

0 commit comments

Comments
 (0)