[UI Test] UI Test added for Journal Entry (#10512)

* [UI Test] UI Test added for Journal Entry

* [mod] Edited date in journal Entry

* [fix] Codacy fixed
diff --git a/erpnext/accounts/doctype/journal_entry/test_journal_entry.js b/erpnext/accounts/doctype/journal_entry/test_journal_entry.js
new file mode 100644
index 0000000..28ccd95
--- /dev/null
+++ b/erpnext/accounts/doctype/journal_entry/test_journal_entry.js
@@ -0,0 +1,39 @@
+QUnit.module('Journal Entry');
+
+QUnit.test("test journal entry", function(assert) {
+	assert.expect(2);
+	let done = assert.async();
+	frappe.run_serially([
+		() => {
+			return frappe.tests.make('Journal Entry', [
+				{posting_date:frappe.datetime.add_days(frappe.datetime.nowdate(), 0)},
+				{accounts: [
+					[
+						{'account':'Debtors - '+frappe.get_abbr(frappe.defaults.get_default('Company'))},
+						{'party_type':'Customer'},
+						{'party':'Test Customer 1'},
+						{'credit_in_account_currency':1000},
+						{'is_advance':'Yes'},
+					],
+					[
+						{'account':'HDFC - '+frappe.get_abbr(frappe.defaults.get_default('Company'))},
+						{'debit_in_account_currency':1000},
+					]
+				]},
+				{cheque_no:1234},
+				{cheque_date: frappe.datetime.add_days(frappe.datetime.nowdate(), -1)},
+				{user_remark: 'Test'},
+			]);
+		},
+		() => cur_frm.save(),
+		() => {
+			// get_item_details
+			assert.ok(cur_frm.doc.total_debit==1000, "total debit correct");
+			assert.ok(cur_frm.doc.total_credit==1000, "total credit correct");
+		},
+		() => frappe.tests.click_button('Submit'),
+		() => frappe.tests.click_button('Yes'),
+		() => frappe.timeout(0.3),
+		() => done()
+	]);
+});
diff --git a/erpnext/tests/ui/tests.txt b/erpnext/tests/ui/tests.txt
index cb33c90..f76b1c0 100644
--- a/erpnext/tests/ui/tests.txt
+++ b/erpnext/tests/ui/tests.txt
@@ -103,3 +103,4 @@
 erpnext/schools/doctype/assessment_result/test_assessment_result.js
 erpnext/schools/doctype/assessment_result_tool/test_assessment_result_tool.js
 erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.js
+erpnext/accounts/doctype/journal_entry/test_journal_entry.js