Skip to content

Commit

Permalink
Merge branch 'hotfix/2.2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennelandais committed May 22, 2018
2 parents 7dfbd4c + bbd380f commit b7b37e3
Show file tree
Hide file tree
Showing 6 changed files with 469 additions and 128 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Version 2.2.3

- Fix : Bug on notification

# Version 2.2.2

- Fix : Credit card form autofill not filling properly
Expand Down
154 changes: 68 additions & 86 deletions bin/tests/013_IDEAL/1_frontend/1301-IDEAL_FRONTEND_API.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,100 +4,82 @@
*
* To launch test, please pass two arguments URL (BASE URL) and TYPE_CC ( CB,VI,MC )
*
/**********************************************************************************************/
/**********************************************************************************************/

var paymentType = "HiPay Enterprise iDeal";

casper.test.begin('Test Checkout ' + paymentType + ' with ' + typeCC, function(test) {
casper.test.begin('Test Checkout ' + paymentType + ' with ' + typeCC, function (test) {
phantom.clearCookies();

casper.start(baseURL)
.then(function() {
this.logToBackend();
this.gotToHiPayConfiguration();
this.activateMethod("ideal");
this.configureSettingsMode("api");
this.waitForSelector('input[name="ideal_displayName[fr]"]', function success() {
label = this.getElementAttribute('input[name="ideal_displayName[fr]"]', 'value');
test.info("Display name in checkout should be :" + label);
}, function fail() {
test.assertExists('input[name="ideal_displayName[fr]"]', "Input name exist");
});
})
.then(function() {
this.activateLocalization('NL');
})
.thenOpen(baseURL, function() {
this.selectItemAndOptions();
})
.then(function() {
this.personalInformation();
})
.then(function() {
this.billingInformation('NL');
})
.then(function() {
this.shippingMethod();
})
.then(function() {
this.selectMethodInCheckout("Payer par " + label,false);
})
.then(function() {
this.echo("Filling Business Identifier BIC with wrong value...", "INFO");

this.waitForSelector('input#ideal-issuer_bank_id', function success() {
this.fillSelectors('form#ideal-hipay', {
'input[name="issuer_bank_id"]': 'BNPAFRPPXXX WRONG',
}, false);

this.click('form#conditions-to-approve input');
this.click("div#payment-confirmation button");
test.assertTextExists('BIC incorrect', 'Validation error done');
}, function fail() {
test.assertExists('input#ideal-issuer_bank_id', "Field Business Identifier exists");
});
})
/* Fill IDeal formular */
.then(function() {
this.echo("Filling CBusiness Identifier BIC...", "INFO");

this.waitForSelector('input#ideal-issuer_bank_id', function success() {
this.fillSelectors('form#ideal-hipay', {
'input[name="issuer_bank_id"]': 'BNPAFRPPXXX',
}, false);

this.click("div#payment-confirmation button");
}, function fail() {
test.assertExists('input#ideal-issuer_bank_id', "Field Business Identifier exists");
});
})
/* Fill IDeal formular */
.then(function() {
this.echo("Filling payment formular...", "INFO");
this.waitForUrl(/paymentscreen\/issuer/, function success() {
.then(function () {
this.logToBackend();
this.gotToHiPayConfiguration();
this.activateMethod("ideal");
this.configureSettingsMode("api");
this.waitForSelector('input[name="ideal_displayName[fr]"]', function success() {
label = this.getElementAttribute('input[name="ideal_displayName[fr]"]', 'value');
test.info("Display name in checkout should be :" + label);
}, function fail() {
test.assertExists('input[name="ideal_displayName[fr]"]', "Input name exist");
});
})
.then(function () {
this.activateLocalization('NL');
})
.thenOpen(baseURL, function () {
this.selectItemAndOptions();
})
.then(function () {
this.personalInformation();
})
.then(function () {
this.billingInformation('NL');
})
.then(function () {
this.shippingMethod();
})
.then(function () {
this.selectMethodInCheckout("Payer par " + label, false);
})
.then(function () {
this.echo("Filling Business Identifier BIC with wrong value...", "INFO");

/* this.fillSelectors("form#form-payment", {
'select[name="issuer_bank_id"]': "TESTNL99"
}, true);*/
this.waitForSelector('input#ideal-issuer_bank_id', function success() {
this.fillSelectors('form#ideal-hipay', {
'input[name="issuer_bank_id"]': 'INGBNL2A WRONG',
}, false);

this.click('button[value="ideal_TESTNL99"]');
this.click('form#conditions-to-approve input');
this.click("div#payment-confirmation button");
test.assertTextExists('BIC incorrect', 'Validation error done');
}, function fail() {
test.assertExists('input#ideal-issuer_bank_id', "Field Business Identifier exists");
});
})
/* Fill IDeal formular */
.then(function () {
this.echo("Filling Business Identifier BIC...", "INFO");

this.waitForUrl(/paymentscreen\/testmode/, function success() {
this.click('input[name="final_state"][value="paid"]');
this.click('#footer button.button');
test.info("Done");
this.waitForSelector('input#ideal-issuer_bank_id', function success() {
this.fillSelectors('form#ideal-hipay', {
'input[name="issuer_bank_id"]': 'INGBNL2A',
}, false);

this.click("div#payment-confirmation button");
}, function fail() {
test.assertUrlMatch(/paymentscreen\/ideal\/testmode/, "Payment IDeal page exists");
}, 15000);
}, function fail() {
test.assertUrlMatch(/payment\/web\/pay/, "Payment page exists");
}, 20000);
})
.then(function() {
this.orderResultSuccess(paymentType);
})
.run(function() {
test.done();
});
});
test.assertExists('input#ideal-issuer_bank_id', "Field Business Identifier exists");
});
})
/* Fill IDeal formular */
.then(function () {
this.echo("Filling payment formular...", "INFO");
this.payIDeal();
})
.then(function () {
this.orderResultSuccess(paymentType);
})
.run(function () {
test.done();
});
});
Loading

0 comments on commit b7b37e3

Please sign in to comment.