Skip to content

Commit

Permalink
fix: trying a new method for submit button
Browse files Browse the repository at this point in the history
  • Loading branch information
zenit2001 committed Oct 3, 2024
1 parent 369ee67 commit 162121b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/playwright/pages/CheckoutPageSFRA6.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ export default class CheckoutPageSFRA {

submitPayment = async () => {
await this.page.waitForLoadState('load', { timeout: 30000 });
await expect(this.submitPaymentButton).toBeVisible({ timeout: 25000 });
const submitButton = this.page.locator('button[value="submit-payment"]');
await submitButton.waitFor({ state: 'visible', timeout: 30000 });
await this.submitPaymentButton.click();
};

Expand Down
1 change: 1 addition & 0 deletions tests/playwright/pages/PaymentMethodsPage.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ export default class PaymentMethodsPage {
const giftCardComponentWrapper = this.page.locator(".gift-card-selection");
await this.page.locator('#giftCardAddButton').click();
const giftCardSelect = this.page.locator("select[id='giftCardSelect']");
await giftCardSelect.waitFor({ state: 'visible', timeout: 30000 });
await giftCardSelect.click();
await giftCardSelect.selectOption({ index: 0 });
const giftCardBrand = this.page.locator(`li[data-brand=${giftCardInput.brand}]`)
Expand Down

0 comments on commit 162121b

Please sign in to comment.