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
b163ba9
commit 2e1886b
Showing
80 changed files
with
2,201 additions
and
853 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"lastOrderId": "213", | ||
"lastCapturedOrderId": "" | ||
"lastOrderId": "117", | ||
"lastCapturedOrderId": "145" | ||
} |
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
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
104 changes: 104 additions & 0 deletions
104
bin/tests/cypress/integration/007_ONE_CLICK/001-one-click.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,104 @@ | ||
describe('Pay by credit card One click', function () { | ||
|
||
it('Pay by : visa_ok', function () { | ||
|
||
cy.logToAdmin(); | ||
cy.goToPaymentsTab(); | ||
cy.activatePaymentMethods("credit_card"); | ||
cy.goToAdminHipayConfig(); | ||
|
||
cy.get('#methods-tab').click(); | ||
cy.get('#operating_mode').select("hosted_fields"); | ||
cy.get('#card_token').check(); | ||
|
||
cy.resetCCConfigForm(); | ||
|
||
cy.get('.submit > .button-primary').click(); | ||
|
||
cy.adminLogOut(); | ||
|
||
cy.customerLogIn(); | ||
cy.goToFront(); | ||
cy.selectItemAndGoToCart(); | ||
cy.addProductQuantity(15); | ||
cy.goToCheckout(); | ||
cy.fillBillingForm(); | ||
|
||
cy.get('[for="payment_method_hipayenterprise_credit_card"]').click({force: true}); | ||
cy.get('#hipay-field-cardHolder > iframe'); | ||
cy.wait(3000); | ||
|
||
cy.fill_hostedfield_card('visa_ok'); | ||
cy.get("#wc-hipayenterprise_credit_card-new-payment-method").check(); | ||
cy.get('#place_order').click({force: true}); | ||
cy.checkOrderSuccess(); | ||
cy.saveLastOrderId(); | ||
}); | ||
|
||
|
||
it('Send authorization notification', function () { | ||
cy.fixture('notification').as("notification"); | ||
cy.connectAndSelectAccountOnHipayBO(); | ||
cy.fixture('order').then((order) => { | ||
cy.openTransactionOnHipayBO(order.lastOrderId + "-"); | ||
cy.openNotificationOnHipayBO(116).then(() => { | ||
cy.sendNotification(this.notification.url, {data: this.data, hash: this.hash}); | ||
}); | ||
}); | ||
}); | ||
|
||
it('Check card in My account', function () { | ||
cy.customerLogIn(); | ||
cy.get('.woocommerce-MyAccount-navigation-link--payment-methods').click(); | ||
cy.get(".woocommerce-MyAccount-paymentMethods > tbody > tr:last-child > td:nth-child(1)") | ||
.contains("Visa ending in 411111******1111"); | ||
|
||
}); | ||
|
||
it('Pay by : one click', function () { | ||
|
||
cy.logToAdmin(); | ||
cy.goToPaymentsTab(); | ||
cy.activatePaymentMethods("credit_card"); | ||
cy.goToAdminHipayConfig(); | ||
|
||
cy.get('#methods-tab').click(); | ||
cy.get('#operating_mode').select("hosted_fields"); | ||
cy.get('#card_token').check(); | ||
|
||
cy.resetCCConfigForm(); | ||
|
||
cy.get('.submit > .button-primary').click(); | ||
|
||
cy.adminLogOut(); | ||
|
||
cy.customerLogIn(); | ||
cy.goToFront(); | ||
cy.selectItemAndGoToCart(); | ||
cy.addProductQuantity(15); | ||
cy.goToCheckout(); | ||
cy.fillBillingForm(); | ||
|
||
cy.get('[for="payment_method_hipayenterprise_credit_card"]').click({force: true}); | ||
cy.get('#hipay-field-cardHolder > iframe'); | ||
cy.wait(3000); | ||
|
||
cy.get('#place_order').click({force: true}); | ||
cy.checkOrderSuccess(); | ||
cy.saveLastOrderId(); | ||
}); | ||
|
||
// it('Add card in My account', function () { | ||
// cy.customerLogIn(); | ||
// cy.get('.woocommerce-MyAccount-navigation-link--payment-methods').click(); | ||
// cy.get('.woocommerce-MyAccount-content > a').click(); | ||
// | ||
// cy.get('[for="payment_method_hipayenterprise_credit_card"]').click({force: true}); | ||
// cy.get('#hipay-field-cardHolder > iframe'); | ||
// cy.wait(3000); | ||
// cy.fill_hostedfield_card('mastercard_ok'); | ||
// cy.get('#place_order').click(); | ||
// cy.get(".woocommerce-MyAccount-paymentMethods > tbody > tr:last-child > td:nth-child(1)") | ||
// .contains("MasterCard ending in 539999******9999"); | ||
// }); | ||
}); |
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.
Oops, something went wrong.