Skip to content

Commit

Permalink
fix: ensuring visibility and adding a slight delay to paypal
Browse files Browse the repository at this point in the history
  • Loading branch information
zenit2001 committed Oct 7, 2024
1 parent 56b9bf6 commit a443eb4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/playwright/pages/PaymentMethodsPage.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export default class PaymentMethodsPage {
// Click PayPal radio button
if (!expressFlow) {
await this.page.click('#rb_paypal');
await this.page.waitForTimeout(5000);
}
await expect(this.page.locator('.adyen-checkout__paypal__button--paypal iframe.visible'),).toBeVisible({ timeout: 30000 });

// Capture popup for interaction
const [popup] = await Promise.all([
Expand Down Expand Up @@ -626,10 +626,11 @@ export default class PaymentMethodsPage {
};

initiateSEPAPayment = async () => {
const nameInput = this.page.locator('//input[contains(@name,"ownerName")]');
const ibanInput = this.page.locator('//input[contains(@name,"ibanNumber")]');
const nameInput = this.page.locator('input[name="ownerName"]');
const ibanInput = this.page.locator('input[name="ibanNumber"]');

await this.page.click('#rb_sepadirectdebit');
await expect(ibanInput).toBeVisible({timeout : 30000});
await nameInput.fill(paymentData.SepaDirectDebit.accountName);
await ibanInput.fill(paymentData.SepaDirectDebit.iban);
};
Expand Down

0 comments on commit a443eb4

Please sign in to comment.