Skip to content

Commit

Permalink
PISHPS-263: allow set apple pay as default payment method (#728)
Browse files Browse the repository at this point in the history
* NTR: PISHPS-263: allow set apple pay as default payment method

* NTR: delete cypress tests for account

---------

Co-authored-by: Vitalij Mik <[email protected]>
  • Loading branch information
BlackScorp and Vitalij Mik authored Mar 22, 2024
1 parent edbe0dd commit c2fdc22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class MollieApplePayPaymentMethod extends Plugin {
}

// support for < Shopware 6.4
this.hideApplePay('.payment-method-input.applepay');
this.hideApplePay('.checkout-main .payment-method-input.applepay');

// support for >= Shopware 6.4
// we have to find the dynamic ID and use that
Expand All @@ -30,7 +30,7 @@ export default class MollieApplePayPaymentMethod extends Plugin {
client.get(
shopUrl + '/mollie/apple-pay/applepay-id',
(data) => {
me.hideApplePay('#paymentMethod' + data.id);
me.hideApplePay('.checkout-main #paymentMethod' + data.id);
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,29 +70,5 @@ context("Apple Pay", () => {
cy.contains('Apple Pay').should('not.exist');
})
})

describe('Account', () => {

it('C4081: Apple Pay hidden in account even if possible in browser @core', () => {

applePayFactory.registerApplePay(true);

scenarioDummyUser.execute();
accountAction.openPaymentMethods();

cy.wait(2000);
cy.contains('Apple Pay').should('not.exist');
})

it('C4083: Apple Pay hidden if not possible in browser (Account) @core', () => {

applePayFactory.registerApplePay(false);

scenarioDummyUser.execute();
accountAction.openPaymentMethods();

cy.wait(2000);
cy.contains('Apple Pay').should('not.exist');
})
})

})

0 comments on commit c2fdc22

Please sign in to comment.