|
|
@@ -11,9 +11,8 @@ QUnit.test("Test Workflow", function(assert) { |
|
|
|
cur_frm.set_value('email', 'test1@testmail.com'); |
|
|
|
cur_frm.set_value('first_name', 'Test Name'); |
|
|
|
cur_frm.set_value('send_welcome_email', 0); |
|
|
|
cur_frm.save(); |
|
|
|
return cur_frm.save(); |
|
|
|
}, |
|
|
|
() => frappe.timeout(2), |
|
|
|
() => frappe.tests.click_button('Actions'), |
|
|
|
() => frappe.timeout(0.5), |
|
|
|
() => { |
|
|
@@ -32,18 +31,17 @@ QUnit.test("Test Workflow", function(assert) { |
|
|
|
}, |
|
|
|
() => frappe.timeout(1), |
|
|
|
() => { |
|
|
|
$('.user-role input:eq(5)').click(); |
|
|
|
cur_frm.save(); |
|
|
|
cur_frm.set_value('role_profile_name', 'Test 2'); |
|
|
|
return cur_frm.save(); |
|
|
|
}, |
|
|
|
() => frappe.timeout(0.5), |
|
|
|
() => frappe.tests.click_button('Actions'), |
|
|
|
() => frappe.timeout(0.5), |
|
|
|
() => frappe.timeout(1), |
|
|
|
() => { |
|
|
|
let reject = $(`.dropdown-menu li:contains("Reject"):visible`).size(); |
|
|
|
assert.equal(reject, 1, "Review Action exists"); |
|
|
|
assert.equal(reject, 1, "Reject Action exists"); |
|
|
|
}, |
|
|
|
() => frappe.tests.click_dropdown_item('Reject'), |
|
|
|
() => frappe.timeout(0.5), |
|
|
|
() => frappe.timeout(1), |
|
|
|
() => { |
|
|
|
if(frappe.tests.click_button('Close')) |
|
|
|
assert.equal(1, 1, "Reject action works"); |
|
|
|