Timeout increased for setting __newname (#11252)
* Timeout increased for setting __newname * UI test fixes * fixed ui test for PO * ui tests * ui tests * ui tests * ui tests * ui tests
This commit is contained in:
parent
bb60a59b96
commit
b4f5f14438
@ -1,23 +0,0 @@
|
||||
/* eslint-disable */
|
||||
// rename this file from _test_[name] to test_[name] to activate
|
||||
// and remove above this line
|
||||
|
||||
QUnit.test("test: Purchase Order", function (assert) {
|
||||
let done = assert.async();
|
||||
|
||||
// number of asserts
|
||||
assert.expect(1);
|
||||
|
||||
frappe.run_serially('Purchase Order', [
|
||||
// insert a new Purchase Order
|
||||
() => frappe.tests.make([
|
||||
// values to be set
|
||||
{key: 'value'}
|
||||
]),
|
||||
() => {
|
||||
assert.equal(cur_frm.doc.key, 'value');
|
||||
},
|
||||
() => done()
|
||||
]);
|
||||
|
||||
});
|
@ -1,7 +1,7 @@
|
||||
QUnit.module('Buying');
|
||||
|
||||
QUnit.test("test: purchase order", function(assert) {
|
||||
assert.expect(11);
|
||||
assert.expect(17);
|
||||
let done = assert.async();
|
||||
|
||||
frappe.run_serially([
|
||||
@ -53,7 +53,7 @@ QUnit.test("test: purchase order", function(assert) {
|
||||
assert.ok(cur_frm.doc.items[1].qty == 2, "Quantity correct");
|
||||
assert.ok(cur_frm.doc.items[1].schedule_date == cur_frm.doc.schedule_date, "Schedule Date correct");
|
||||
// Calculate total
|
||||
assert.ok(cur_frm.doc.total == 500, "Total correct");
|
||||
assert.ok(cur_frm.doc.total == 700, "Total correct");
|
||||
// Get terms
|
||||
assert.ok(cur_frm.doc.terms == 'This is a term.', "Terms correct");
|
||||
},
|
||||
@ -70,7 +70,7 @@ QUnit.test("test: purchase order", function(assert) {
|
||||
|
||||
() => frappe.tests.click_button('Submit'),
|
||||
() => frappe.tests.click_button('Yes'),
|
||||
() => frappe.timeout(0.3),
|
||||
() => frappe.timeout(1),
|
||||
|
||||
() => {
|
||||
assert.ok(cur_frm.doc.status == 'To Receive and Bill', "Submitted successfully");
|
||||
|
@ -27,6 +27,7 @@ QUnit.test("test: request_for_quotation", function(assert) {
|
||||
{tc_name: 'Test Term 1'}
|
||||
]);
|
||||
},
|
||||
() => frappe.timeout(3),
|
||||
() => {
|
||||
assert.ok(cur_frm.doc.transaction_date == date, "Date correct");
|
||||
assert.ok(cur_frm.doc.company == cur_frm.doc.company, "Company correct");
|
||||
@ -38,7 +39,7 @@ QUnit.test("test: request_for_quotation", function(assert) {
|
||||
assert.ok(cur_frm.doc.message_for_supplier == 'Please supply the specified items at the best possible rates', "Reply correct");
|
||||
assert.ok(cur_frm.doc.tc_name == 'Test Term 1', "Term name correct");
|
||||
},
|
||||
() => frappe.timeout(0.3),
|
||||
() => frappe.timeout(3),
|
||||
() => cur_frm.print_doc(),
|
||||
() => frappe.timeout(1),
|
||||
() => {
|
||||
@ -65,7 +66,7 @@ QUnit.test("test: request_for_quotation", function(assert) {
|
||||
assert.ok(cur_frm.doc.docstatus == 1, "Quotation request submitted");
|
||||
},
|
||||
() => frappe.click_button('Send Supplier Emails'),
|
||||
() => frappe.timeout(4),
|
||||
() => frappe.timeout(6),
|
||||
() => {
|
||||
assert.ok($('div.modal.fade.in > div.modal-dialog > div > div.modal-body.ui-front > div.msgprint').text().includes("Email sent to supplier Test Supplier"), "Send emails working");
|
||||
},
|
||||
|
@ -56,7 +56,8 @@ QUnit.test("test: supplier", function(assert) {
|
||||
() => frappe.click_button('New Contact'),
|
||||
() => {
|
||||
return frappe.tests.set_form_values(cur_frm, [
|
||||
{first_name: "Contact 3"}
|
||||
{first_name: "Contact 3"},
|
||||
{email_id: "test@supplier.com"}
|
||||
]);
|
||||
},
|
||||
() => cur_frm.save(),
|
||||
|
@ -1,23 +0,0 @@
|
||||
/* eslint-disable */
|
||||
// rename this file from _test_[name] to test_[name] to activate
|
||||
// and remove above this line
|
||||
|
||||
QUnit.test("test: Supplier Quotation", function (assert) {
|
||||
let done = assert.async();
|
||||
|
||||
// number of asserts
|
||||
assert.expect(1);
|
||||
|
||||
frappe.run_serially('Supplier Quotation', [
|
||||
// insert a new Supplier Quotation
|
||||
() => frappe.tests.make([
|
||||
// values to be set
|
||||
{key: 'value'}
|
||||
]),
|
||||
() => {
|
||||
assert.equal(cur_frm.doc.key, 'value');
|
||||
},
|
||||
() => done()
|
||||
]);
|
||||
|
||||
});
|
@ -27,6 +27,7 @@ QUnit.test("test: supplier quotation", function(assert) {
|
||||
{terms: 'This is a term'}
|
||||
]);
|
||||
},
|
||||
() => frappe.timeout(3),
|
||||
() => {
|
||||
// Get Supplier details
|
||||
assert.ok(cur_frm.doc.supplier == 'Test Supplier', "Supplier correct");
|
||||
|
@ -27,7 +27,7 @@ QUnit.test("Test: Offer Letter [HR]", function (assert) {
|
||||
]},
|
||||
]);
|
||||
},
|
||||
() => frappe.timeout(8),
|
||||
() => frappe.timeout(12),
|
||||
() => frappe.click_button('Submit'),
|
||||
() => frappe.timeout(2),
|
||||
() => frappe.click_button('Yes'),
|
||||
|
@ -15,7 +15,7 @@ QUnit.test("test salary slip", function(assert) {
|
||||
{ employee: employee_name}
|
||||
]);
|
||||
},
|
||||
() => frappe.timeout(1),
|
||||
() => frappe.timeout(3),
|
||||
() => {
|
||||
// To check if all the calculations are correctly done
|
||||
if(ename === 'Test Employee 1')
|
||||
@ -43,7 +43,7 @@ QUnit.test("test salary slip", function(assert) {
|
||||
() => salary_slip('Test Employee 1'),
|
||||
() => frappe.timeout(6),
|
||||
() => salary_slip('Test Employee 3'),
|
||||
() => frappe.timeout(3),
|
||||
() => frappe.timeout(5),
|
||||
() => done()
|
||||
]);
|
||||
});
|
@ -1,5 +1,5 @@
|
||||
QUnit.test("test Salary Structure", function(assert) {
|
||||
assert.expect(6);
|
||||
assert.expect(7);
|
||||
let done = assert.async();
|
||||
let employee_name1;
|
||||
|
||||
@ -9,6 +9,7 @@ QUnit.test("test Salary Structure", function(assert) {
|
||||
employee_name1 = r.name;
|
||||
}
|
||||
),
|
||||
() => frappe.timeout(5),
|
||||
() => frappe.db.get_value('Employee', {'employee_name': "Test Employee 3"}, 'name',
|
||||
(r) => {
|
||||
// Creating Salary Structure for employees);
|
||||
@ -48,12 +49,14 @@ QUnit.test("test Salary Structure", function(assert) {
|
||||
]);
|
||||
}
|
||||
),
|
||||
() => frappe.timeout(3),
|
||||
() => frappe.timeout(15),
|
||||
() => {
|
||||
// To check if all the fields are correctly set
|
||||
assert.ok(cur_frm.doc.employees[0].employee_name.includes('Test Employee 1') &&
|
||||
cur_frm.doc.employees[1].employee_name.includes('Test Employee 3'),
|
||||
'Employee names are correctly set');
|
||||
// To check if all the fields are correctly set
|
||||
assert.ok(cur_frm.doc.employees[0].employee_name=='Test Employee 1',
|
||||
'Employee 1 name correctly set');
|
||||
|
||||
assert.ok(cur_frm.doc.employees[1].employee_name=='Test Employee 3',
|
||||
'Employee 2 name correctly set');
|
||||
|
||||
assert.ok(cur_frm.doc.employees[0].base==25000,
|
||||
'Base value for first employee is correctly set');
|
||||
|
@ -14,7 +14,7 @@ QUnit.test("test: operation", function (assert) {
|
||||
]
|
||||
);
|
||||
},
|
||||
() => frappe.timeout(1),
|
||||
() => frappe.timeout(3),
|
||||
() => {
|
||||
assert.ok(cur_frm.docname.includes('Assemble Keyboard'),
|
||||
'Assemble Keyboard created successfully');
|
||||
@ -31,7 +31,7 @@ QUnit.test("test: operation", function (assert) {
|
||||
]
|
||||
);
|
||||
},
|
||||
() => frappe.timeout(1),
|
||||
() => frappe.timeout(3),
|
||||
|
||||
// Create a CPU operation
|
||||
() => {
|
||||
@ -42,7 +42,7 @@ QUnit.test("test: operation", function (assert) {
|
||||
]
|
||||
);
|
||||
},
|
||||
() => frappe.timeout(1),
|
||||
() => frappe.timeout(3),
|
||||
|
||||
() => done()
|
||||
]);
|
||||
|
@ -18,6 +18,7 @@ QUnit.test("test: Restaurant", function (assert) {
|
||||
{invoice_series_prefix: 'Test-Rest-1-Inv-'}
|
||||
])
|
||||
},
|
||||
() => frappe.timeout(3),
|
||||
() => {
|
||||
assert.equal(cur_frm.doc.company, 'Test Company');
|
||||
},
|
||||
@ -29,6 +30,7 @@ QUnit.test("test: Restaurant", function (assert) {
|
||||
{invoice_series_prefix: 'Test-Rest-3-Inv-'}
|
||||
]);
|
||||
},
|
||||
() => frappe.timeout(3),
|
||||
() => {
|
||||
assert.equal(cur_frm.doc.company, 'Test Company');
|
||||
},
|
||||
|
@ -50,6 +50,7 @@ QUnit.test("test: Restaurant Menu", function (assert) {
|
||||
]}
|
||||
]);
|
||||
},
|
||||
() => frappe.timeout(2),
|
||||
() => {
|
||||
return frappe.tests.make("Restaurant Menu", [
|
||||
{__newname: 'Restaurant Menu 2'},
|
||||
@ -66,6 +67,7 @@ QUnit.test("test: Restaurant Menu", function (assert) {
|
||||
]}
|
||||
]);
|
||||
},
|
||||
() => frappe.timeout(2),
|
||||
() => frappe.set_route('Form', 'Restaurant', 'Test Restaurant 1'),
|
||||
() => cur_frm.set_value('active_menu', 'Restaurant Menu 1'),
|
||||
() => cur_frm.save(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user