Fixed multiple ui test cases

This commit is contained in:
Nabin Hait
2017-09-07 19:16:38 +05:30
parent 07b713121b
commit d4e57a38a4
6 changed files with 38 additions and 67 deletions

View File

@@ -1,16 +1,15 @@
QUnit.test("test:POS Profile", function(assert) {
assert.expect(1);
QUnit.test("test:Sales Invoice", function(assert) {
assert.expect(3);
let done = assert.async();
frappe.run_serially([
() => {
return frappe.tests.make("POS Profile", [
{naming_series: "SINV"},
{company: "Test Company"},
{country: "India"},
{currency: "INR"},
{write_off_account: "Write Off - TC"},
{write_off_cost_center: "Main - TC"},
{write_off_account: "Write Off - FT"},
{write_off_cost_center: "Main - FT"},
{payments: [
[
{"default": 1},
@@ -24,19 +23,10 @@ QUnit.test("test:POS Profile", function(assert) {
() => {
assert.equal(cur_frm.doc.payments[0].default, 1, "Default mode of payment tested");
},
() => done()
]);
});
QUnit.test("test:Sales Invoice", function(assert) {
assert.expect(2);
let done = assert.async();
frappe.run_serially([
() => frappe.timeout(1),
() => {
return frappe.tests.make("Sales Invoice", [
{customer: "Test Customer 2"},
{company: "Test Company"},
{is_pos: 1},
{posting_date: frappe.datetime.get_today()},
{due_date: frappe.datetime.get_today()},
@@ -44,7 +34,7 @@ QUnit.test("test:Sales Invoice", function(assert) {
[
{"item_code": "Test Product 1"},
{"qty": 5},
{"warehouse":'Stores - TC'}
{"warehouse":'Stores - FT'}
]]
}
]);