Fix travis (#11882)

* fieldname wrong

* bifurcated test into two - error when both were running async

* minor fixes with link and route

* move school domain rename up

* fix async creation of operations test

* edit-in-full-page is button, not link

* set_route issue in production order test

* minor changes

* fix task tree test

* more fixes

* fix server side issue

* improvising ui tests
This commit is contained in:
Zarrar
2017-12-08 14:57:38 +05:30
committed by Nabin Hait
parent 2ba198ec70
commit 17fd6610dc
34 changed files with 184 additions and 168 deletions

View File

@@ -8,7 +8,8 @@ QUnit.test("test: Activity Type", function (assert) {
() => frappe.set_route("List", "Activity Type", "List"),
() => frappe.new_doc("Activity Type"),
() => frappe.timeout(1),
() => frappe.click_link('Edit in full page'),
() => frappe.quick_entry.dialog.$wrapper.find('.edit-full').click(),
() => frappe.timeout(1),
() => cur_frm.set_value("activity_type", "Test Activity"),
() => frappe.click_button('Save'),
() => frappe.timeout(1),

View File

@@ -6,7 +6,7 @@ QUnit.test("test: Task Tree", function (assert) {
let done = assert.async();
// number of asserts
assert.expect(5);
assert.expect(4);
frappe.run_serially([
// insert a new Task
@@ -21,9 +21,8 @@ QUnit.test("test: Task Tree", function (assert) {
() => frappe.timeout(0.5),
// Creating child nodes
() => frappe.tests.click_link('task'),
() => frappe.tests.click_link('All Tasks'),
() => frappe.map_group.make('Test-1'),
() => frappe.map_group.make('Test-2'),
() => frappe.map_group.make('Test-3', 1),
() => frappe.timeout(1),
() => frappe.tests.click_link('Test-3'),
@@ -33,8 +32,9 @@ QUnit.test("test: Task Tree", function (assert) {
() => frappe.timeout(0.5),
() => frappe.tests.click_link('Test-1'),
() => frappe.tests.click_button('Edit'),
() => frappe.timeout(0.5),
() => {assert.deepEqual(frappe.get_route(), ["Form", "Task", "Test-1"], "Edit route checks");},
() => frappe.timeout(1),
() => frappe.db.get_value('Task', {'subject': 'Test-1'}, 'name'),
(task) => {assert.deepEqual(frappe.get_route(), ["Form", "Task", task.message.name], "Edit route checks");},
// Deleting child Node
() => frappe.set_route('Tree', 'Task'),
@@ -54,17 +54,6 @@ QUnit.test("test: Task Tree", function (assert) {
() => {assert.equal(cur_dialog.title, 'Message', 'Error thrown correctly');},
() => frappe.tests.click_button('Close'),
// Renaming Child node
() => frappe.timeout(0.5),
() => frappe.tests.click_link('Test-2'),
() => frappe.tests.click_button('Rename'),
() => frappe.timeout(1),
() => cur_dialog.set_value('new_name', 'Test-5'),
() => frappe.timeout(1.5),
() => cur_dialog.get_primary_btn().click(),
() => frappe.timeout(1),
() => {assert.equal($(`a:contains("Test-5"):visible`).length, 1, 'Rename successfull');},
// Add multiple child tasks
() => frappe.tests.click_link('Test-3'),
() => frappe.timeout(0.5),