Fix receiving quantity testcase

This commit is contained in:
jekkos
2016-05-23 08:18:18 +02:00
parent bd208c6d0d
commit 07fbffab08
2 changed files with 4 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ var assert = require('assert');
var ospos = function() {
var server = "http://localhost";
var server = "http://localhost/pos";
return {

View File

@@ -18,8 +18,9 @@ describe("test receiving quantity", function() {
});
it("should be able to receive quantities with multiplier", function(done) {
this.browser.get(ospos.url('/index.php/receivings')).elementById("item").clear().type(item.name + "\uE007")
.waitForElementByName("quantity", def_timeout)
this.browser.get(ospos.url('/index.php/receivings')).elementById("item").clear().type(item.name)
.waitForElementByCss(".ui-autocomplete .ui-menu-item", def_timeout).click()
.waitForElementByName("quantity")
.elementByCssSelector("#cart_contents tr td:nth-child(5)").text().then(function(value) {
assert(value, "x " + item.receiving_quantity, "receiving quantity " + item.receiving_quantity + " is not displayed correctly in receivings module!");
}).elementById("finish_receiving_button", def_timeout).submit()