* [ui-tests] python is back! * [minor] remove old test * [test] dont test test_runner * [tests] try firefox * [tests] try chrome * [tests] try chrome * [tests] try chrome * [tests] try chrome 1 * [tests] try chrome 2 * [tests] try chrome 3 * [tests] try phantomJS * [tests] try chrome * [tests] try chrome * [tests] try chrome * [tests] try chrome * [tests] try chrome * [tests] try chrome * [tests] try chrome * [tests] try chrome * [tests] login click button * [tests] login click button * [tests] show log * [test] test with start_maximized * [test] test only login * [travis] test another port for selenium * [travis] try running ui tests after unittests are done * [travis] pring body_div if fails * [tests] complete setup wizard for frappe * [minor] move ui tests to frappe/ui/tests * [tests] ui tests in public and codacy fixes * [fix] tests + eslint * [minor] move tests to tests/ui folder and print console after print * [fix] linting * [tests] added documentation and better integration testing * [promise] form triggering is now promise based * [test] * [test] * [test] * [test] * [test] print output * [minor] default empty in select and print console * [cleanup] more minor fixes * [enhance] first-cut done! * [minor] frappe.run_serially to pass arguments while chaining
33 lines
No EOL
865 B
JavaScript
33 lines
No EOL
865 B
JavaScript
QUnit.module('views');
|
|
|
|
QUnit.test("test quick entry", function(assert) {
|
|
assert.expect(2);
|
|
let done = assert.async();
|
|
let random = frappe.utils.get_random(10);
|
|
|
|
frappe.run_serially([
|
|
() => frappe.set_route('List', 'ToDo'),
|
|
() => frappe.new_doc('ToDo'),
|
|
() => frappe.quick_entry.dialog.set_value('description', random),
|
|
() => frappe.quick_entry.insert(),
|
|
(doc) => {
|
|
assert.ok(doc && !doc.__islocal);
|
|
return frappe.set_route('Form', 'ToDo', doc.name);
|
|
},
|
|
() => {
|
|
assert.ok(cur_frm.doc.description.includes(random));
|
|
return done();
|
|
}
|
|
]);
|
|
});
|
|
|
|
QUnit.test("test list values", function(assert) {
|
|
assert.expect(2);
|
|
let done = assert.async();
|
|
frappe.set_route('List', 'DocType')
|
|
.then(() => {
|
|
assert.deepEqual(['List', 'DocType', 'List'], frappe.get_route());
|
|
assert.ok($('.list-item:visible').length > 10);
|
|
done();
|
|
});
|
|
}); |