Skip to content

Commit

Permalink
tests: add e2e test to verify payment gateway title
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinderk committed Aug 22, 2023
1 parent 917e1f4 commit a85c7cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/e2e/specs/admin/edit-settings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ test.describe( 'Verify SnapCode setting - @foundational', async () => {
await checkoutBlock.goto('/checkout-block/');

const paymentMethodLocator = await checkoutBlock.locator( 'label[for="radio-control-wc-payment-method-options-payfast"]' );
await expect( await checkoutBlock.locator( 'label[for="radio-control-wc-payment-method-options-payfast"] img' ). getAttribute('alt'))
.toEqual('Payfast');
await paymentMethodLocator.click();
await expect(await checkoutBlock.locator( '.wc-block-components-radio-control-accordion-content' ) )
.toHaveText(/Pay with payfast/);
Expand All @@ -59,6 +61,7 @@ test.describe( 'Verify SnapCode setting - @foundational', async () => {
await checkoutPage.goto('/checkout/');

const paymentMethodLocator = await checkoutPage.locator( '.wc_payment_method.payment_method_payfast' );
await expect( paymentMethodLocator ).toHaveText(/Payfast/);
await paymentMethodLocator.click();
await expect(await checkoutPage.locator( '.payment_box.payment_method_payfast' ) )
.toHaveText(/Pay with payfast/);
Expand Down

0 comments on commit a85c7cf

Please sign in to comment.