-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c15ca8
commit f859be3
Showing
24 changed files
with
149 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
Test/End-2-end/cypress/e2e/magento/methods/bancomatpay.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright Magmodules.eu. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
import CheckoutPaymentPage from "Pages/frontend/CheckoutPaymentPage"; | ||
import VisitCheckoutPaymentCompositeAction from "CompositeActions/VisitCheckoutPaymentCompositeAction"; | ||
import MollieHostedPaymentPage from "Pages/mollie/MollieHostedPaymentPage"; | ||
import CheckoutSuccessPage from "Pages/frontend/CheckoutSuccessPage"; | ||
import OrdersPage from "Pages/backend/OrdersPage"; | ||
import CartPage from "Pages/frontend/CartPage"; | ||
|
||
const checkoutPaymentPage = new CheckoutPaymentPage(); | ||
const visitCheckoutPayment = new VisitCheckoutPaymentCompositeAction(); | ||
const mollieHostedPaymentPage = new MollieHostedPaymentPage(); | ||
const checkoutSuccessPage = new CheckoutSuccessPage(); | ||
const ordersPage = new OrdersPage(); | ||
const cartPage = new CartPage(); | ||
|
||
if (Cypress.env('mollie_available_methods').includes('bancomatpay')) { | ||
describe('Check that bancomatpay behaves as expected', () => { | ||
[ | ||
{status: 'paid', orderStatus: 'Processing', title: 'C3190598: Validate the submission of an order with Bancomat Pay as payment method and payment mark as "Paid"'}, | ||
{status: 'failed', orderStatus: 'Canceled', title: 'C3190599: Validate the submission of an order with Bancomat Pay as payment method and payment mark as "Failed" '}, | ||
{status: 'expired', orderStatus: 'Canceled', title: 'C3190600: Validate the submission of an order with Bancomat Pay as payment method and payment mark as "Expired" '}, | ||
{status: 'canceled', orderStatus: 'Canceled', title: 'C3190601: Validate the submission of an order with Bancomat Pay as payment method and payment mark as "Cancelled" '}, | ||
].forEach((testCase) => { | ||
it(testCase.title, () => { | ||
visitCheckoutPayment.visit(); | ||
|
||
cy.intercept('mollie/checkout/redirect/paymentToken/*').as('mollieRedirect'); | ||
|
||
checkoutPaymentPage.selectPaymentMethod('Bancomat Pay'); | ||
checkoutPaymentPage.placeOrder(); | ||
|
||
mollieHostedPaymentPage.selectStatus(testCase.status); | ||
|
||
if (testCase.status === 'paid') { | ||
checkoutSuccessPage.assertThatOrderSuccessPageIsShown(); | ||
} | ||
|
||
if (testCase.status === 'canceled') { | ||
cartPage.assertCartPageIsShown(); | ||
} | ||
|
||
cy.backendLogin(); | ||
|
||
cy.get('@order-id').then((orderId) => { | ||
ordersPage.openOrderById(orderId); | ||
}); | ||
|
||
if (testCase.status === 'expired') { | ||
ordersPage.callFetchStatus(); | ||
} | ||
|
||
ordersPage.assertOrderStatusIs(testCase.orderStatus); | ||
}); | ||
}); | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/* | ||
* Copyright Magmodules.eu. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Mollie\Payment\Test\Integration\Model\Methods; | ||
|
||
use Mollie\Payment\Model\Methods\Bancomatpay; | ||
|
||
class BancomatpayTest extends AbstractMethodTest | ||
{ | ||
protected $instance = Bancomatpay::class; | ||
|
||
protected $code = 'bancomatpay'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.