From 07fbffab08f85fcae7241ac9937d8d1147df8120 Mon Sep 17 00:00:00 2001 From: jekkos Date: Mon, 23 May 2016 08:18:18 +0200 Subject: [PATCH] Fix receiving quantity testcase --- test/ospos.js | 2 +- test/receiving_quantity.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/ospos.js b/test/ospos.js index 8394ebc68..aafc15264 100644 --- a/test/ospos.js +++ b/test/ospos.js @@ -2,7 +2,7 @@ var assert = require('assert'); var ospos = function() { - var server = "http://localhost"; + var server = "http://localhost/pos"; return { diff --git a/test/receiving_quantity.js b/test/receiving_quantity.js index 76355e5fc..9e9a0f588 100644 --- a/test/receiving_quantity.js +++ b/test/receiving_quantity.js @@ -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()