[UI Test] travis.yml modified for fresh UI Test (#10446)
* [UI Test] travis.yml modified for fresh UI Test * [fix] travis * Update test_production_order.js * Update test_production_order.js * Update test_purchase_order_receipt.js * Update tests.txt * Update test_purchase_order_receipt.js
This commit is contained in:
parent
592e8c2e77
commit
8fd5b325e0
@ -55,4 +55,7 @@ script:
|
||||
- set -e
|
||||
- bench run-tests
|
||||
- sleep 5
|
||||
- bench reinstall --yes
|
||||
- bench execute erpnext.setup.setup_wizard.utils.complete
|
||||
- bench execute erpnext.setup.utils.enable_all_roles_and_domains
|
||||
- bench run-ui-tests --app erpnext
|
||||
|
@ -6,11 +6,11 @@ QUnit.test("test:POS Profile", function(assert) {
|
||||
() => {
|
||||
return frappe.tests.make("POS Profile", [
|
||||
{naming_series: "SINV"},
|
||||
{company: "_Test Company"},
|
||||
{company: "Test Company"},
|
||||
{country: "India"},
|
||||
{currency: "INR"},
|
||||
{write_off_account: "Write Off - _TC"},
|
||||
{write_off_cost_center: "Main - _TC"},
|
||||
{write_off_account: "Write Off - TC"},
|
||||
{write_off_cost_center: "Main - TC"},
|
||||
{payments: [
|
||||
[
|
||||
{"default": 1},
|
||||
@ -35,15 +35,16 @@ QUnit.test("test:Sales Invoice", function(assert) {
|
||||
frappe.run_serially([
|
||||
() => {
|
||||
return frappe.tests.make("Sales Invoice", [
|
||||
{customer: "_Test Customer 2"},
|
||||
{company: "_Test Company"},
|
||||
{customer: "Test Customer 2"},
|
||||
{company: "Test Company"},
|
||||
{is_pos: 1},
|
||||
{posting_date: frappe.datetime.get_today()},
|
||||
{due_date: frappe.datetime.get_today()},
|
||||
{items: [
|
||||
[
|
||||
{"item_code": "_Test Item"},
|
||||
{"qty": 5}
|
||||
{"item_code": "Test Product 1"},
|
||||
{"qty": 5},
|
||||
{"warehouse":'Stores - TC'}
|
||||
]]
|
||||
}
|
||||
]);
|
||||
|
@ -8,10 +8,8 @@ QUnit.test("test: purchase order", function(assert) {
|
||||
() => {
|
||||
return frappe.tests.make('Purchase Order', [
|
||||
{supplier: 'Test Supplier'},
|
||||
{company: 'Wind Power LLC'},
|
||||
{is_subcontracted: 'No'},
|
||||
{buying_price_list: 'Test-Buying-USD'},
|
||||
{currency: 'USD'},
|
||||
{currency: 'INR'},
|
||||
{items: [
|
||||
[
|
||||
{"item_code": 'Test Product 4'},
|
||||
@ -20,7 +18,7 @@ QUnit.test("test: purchase order", function(assert) {
|
||||
{"qty": 5},
|
||||
{"uom": 'Unit'},
|
||||
{"rate": 100},
|
||||
{"warehouse": 'Stores - WP'}
|
||||
{"warehouse": 'Stores - '+frappe.get_abbr(frappe.defaults.get_default("Company"))}
|
||||
]
|
||||
]},
|
||||
|
||||
|
@ -8,7 +8,6 @@ QUnit.test("test: purchase order with get items", function(assert) {
|
||||
() => {
|
||||
return frappe.tests.make('Purchase Order', [
|
||||
{supplier: 'Test Supplier'},
|
||||
{company: 'Wind Power LLC'},
|
||||
{is_subcontracted: 'No'},
|
||||
{buying_price_list: 'Test-Buying-USD'},
|
||||
{currency: 'USD'},
|
||||
@ -18,7 +17,7 @@ QUnit.test("test: purchase order with get items", function(assert) {
|
||||
{"qty": 5},
|
||||
{"schedule_date": frappe.datetime.add_days(frappe.datetime.now_date(), 1)},
|
||||
{"expected_delivery_date": frappe.datetime.add_days(frappe.datetime.now_date(), 5)},
|
||||
{"warehouse": 'Stores - WP'}
|
||||
{"warehouse": 'Stores - '+frappe.get_abbr(frappe.defaults.get_default("Company"))}
|
||||
]
|
||||
]}
|
||||
]);
|
||||
@ -46,9 +45,9 @@ QUnit.test("test: purchase order with get items", function(assert) {
|
||||
assert.ok(cur_frm.doc.items[3].item_name == 'Keyboard', "Product bundle item 3 correct");
|
||||
},
|
||||
|
||||
() => cur_frm.doc.items[1].warehouse = 'Stores - WP',
|
||||
() => cur_frm.doc.items[2].warehouse = 'Stores - WP',
|
||||
() => cur_frm.doc.items[3].warehouse = 'Stores - WP',
|
||||
() => cur_frm.doc.items[1].warehouse = 'Stores - '+frappe.get_abbr(frappe.defaults.get_default("Company")),
|
||||
() => cur_frm.doc.items[2].warehouse = 'Stores - '+frappe.get_abbr(frappe.defaults.get_default("Company")),
|
||||
() => cur_frm.doc.items[3].warehouse = 'Stores - '+frappe.get_abbr(frappe.defaults.get_default("Company")),
|
||||
|
||||
() => cur_frm.save(),
|
||||
() => frappe.timeout(1),
|
||||
|
@ -8,7 +8,6 @@ QUnit.test("test: purchase order receipt", function(assert) {
|
||||
() => {
|
||||
return frappe.tests.make('Purchase Order', [
|
||||
{supplier: 'Test Supplier'},
|
||||
{company: 'Wind Power LLC'},
|
||||
{is_subcontracted: 'No'},
|
||||
{buying_price_list: 'Test-Buying-USD'},
|
||||
{currency: 'USD'},
|
||||
@ -20,7 +19,7 @@ QUnit.test("test: purchase order receipt", function(assert) {
|
||||
{"qty": 5},
|
||||
{"uom": 'Unit'},
|
||||
{"rate": 100},
|
||||
{"warehouse": 'Stores - WP'}
|
||||
{"warehouse": 'Stores - '+frappe.get_abbr(frappe.defaults.get_default("Company"))}
|
||||
]
|
||||
]},
|
||||
]);
|
||||
@ -69,9 +68,9 @@ QUnit.test("test: purchase order receipt", function(assert) {
|
||||
() => {
|
||||
assert.ok($('div.slick-cell.l2.r2 > a').text().includes('Test Product 1')
|
||||
&& $('div.slick-cell.l9.r9 > div').text().includes(5)
|
||||
&& $('div.slick-cell.l12.r12 > div').text().includes(100), "Stock ledger entry correct");
|
||||
&& $('div.slick-cell.l12.r12 > div').text().includes(433.42), "Stock ledger entry correct",$('div.slick-cell.l12.r12 > div').text());
|
||||
},
|
||||
|
||||
() => done()
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
@ -8,7 +8,6 @@ QUnit.test("test: purchase order with discount on grand total", function(assert)
|
||||
() => {
|
||||
return frappe.tests.make('Purchase Order', [
|
||||
{supplier: 'Test Supplier'},
|
||||
{company: 'Wind Power LLC'},
|
||||
{is_subcontracted: 'No'},
|
||||
{buying_price_list: 'Test-Buying-EUR'},
|
||||
{currency: 'EUR'},
|
||||
@ -20,7 +19,7 @@ QUnit.test("test: purchase order with discount on grand total", function(assert)
|
||||
{"rate": 500 },
|
||||
{"schedule_date": frappe.datetime.add_days(frappe.datetime.now_date(), 1)},
|
||||
{"expected_delivery_date": frappe.datetime.add_days(frappe.datetime.now_date(), 5)},
|
||||
{"warehouse": 'Stores - WP'}
|
||||
{"warehouse": 'Stores - '+frappe.get_abbr(frappe.defaults.get_default("Company"))}
|
||||
]
|
||||
]},
|
||||
{apply_discount_on: 'Grand Total'},
|
||||
|
@ -8,7 +8,6 @@ QUnit.test("test: purchase order with item wise discount", function(assert) {
|
||||
() => {
|
||||
return frappe.tests.make('Purchase Order', [
|
||||
{supplier: 'Test Supplier'},
|
||||
{company: 'Wind Power LLC'},
|
||||
{is_subcontracted: 'No'},
|
||||
{buying_price_list: 'Test-Buying-EUR'},
|
||||
{currency: 'EUR'},
|
||||
@ -19,7 +18,7 @@ QUnit.test("test: purchase order with item wise discount", function(assert) {
|
||||
{"uom": 'Unit'},
|
||||
{"schedule_date": frappe.datetime.add_days(frappe.datetime.now_date(), 1)},
|
||||
{"expected_delivery_date": frappe.datetime.add_days(frappe.datetime.now_date(), 5)},
|
||||
{"warehouse": 'Stores - WP'},
|
||||
{"warehouse": 'Stores - '+frappe.get_abbr(frappe.defaults.get_default("Company"))},
|
||||
{"discount_percentage": 20}
|
||||
]
|
||||
]}
|
||||
|
@ -8,7 +8,6 @@ QUnit.test("test: purchase order with multi UOM", function(assert) {
|
||||
() => {
|
||||
return frappe.tests.make('Purchase Order', [
|
||||
{supplier: 'Test Supplier'},
|
||||
{company: 'Wind Power LLC'},
|
||||
{is_subcontracted: 'No'},
|
||||
{items: [
|
||||
[
|
||||
@ -18,7 +17,7 @@ QUnit.test("test: purchase order with multi UOM", function(assert) {
|
||||
{"rate": 100},
|
||||
{"schedule_date": frappe.datetime.add_days(frappe.datetime.now_date(), 1)},
|
||||
{"expected_delivery_date": frappe.datetime.add_days(frappe.datetime.now_date(), 5)},
|
||||
{"warehouse": 'Stores - WP'}
|
||||
{"warehouse": 'Stores - '+frappe.get_abbr(frappe.defaults.get_default("Company"))}
|
||||
]
|
||||
]}
|
||||
]);
|
||||
|
@ -8,7 +8,6 @@ QUnit.test("test: purchase order with taxes and charges", function(assert) {
|
||||
() => {
|
||||
return frappe.tests.make('Purchase Order', [
|
||||
{supplier: 'Test Supplier'},
|
||||
{company: 'Wind Power LLC'},
|
||||
{is_subcontracted: 'No'},
|
||||
{buying_price_list: 'Test-Buying-USD'},
|
||||
{currency: 'USD'},
|
||||
@ -20,7 +19,7 @@ QUnit.test("test: purchase order with taxes and charges", function(assert) {
|
||||
{"rate": 500 },
|
||||
{"schedule_date": frappe.datetime.add_days(frappe.datetime.now_date(), 1)},
|
||||
{"expected_delivery_date": frappe.datetime.add_days(frappe.datetime.now_date(), 5)},
|
||||
{"warehouse": 'Stores - WP'}
|
||||
{"warehouse": 'Stores - '+frappe.get_abbr(frappe.defaults.get_default("Company"))}
|
||||
]
|
||||
]},
|
||||
|
||||
|
@ -9,7 +9,6 @@ QUnit.test("test: request_for_quotation", function(assert) {
|
||||
date = frappe.datetime.add_days(frappe.datetime.now_date(), 10);
|
||||
return frappe.tests.make('Request for Quotation', [
|
||||
{transaction_date: date},
|
||||
{company: 'Wind Power LLC'},
|
||||
{suppliers: [
|
||||
[
|
||||
{"supplier": 'Test Supplier'},
|
||||
@ -21,7 +20,7 @@ QUnit.test("test: request_for_quotation", function(assert) {
|
||||
{"item_code": 'Test Product 4'},
|
||||
{"qty": 5},
|
||||
{"schedule_date": frappe.datetime.add_days(frappe.datetime.now_date(),20)},
|
||||
{"warehouse": 'All Warehouses - WP'}
|
||||
{"warehouse": 'All Warehouses - '+frappe.get_abbr(frappe.defaults.get_default("Company"))}
|
||||
]
|
||||
]},
|
||||
{message_for_supplier: 'Please supply the specified items at the best possible rates'},
|
||||
@ -30,12 +29,12 @@ QUnit.test("test: request_for_quotation", function(assert) {
|
||||
},
|
||||
() => {
|
||||
assert.ok(cur_frm.doc.transaction_date == date, "Date correct");
|
||||
assert.ok(cur_frm.doc.company == 'Wind Power LLC', "Company correct");
|
||||
assert.ok(cur_frm.doc.company == cur_frm.doc.company, "Company correct");
|
||||
assert.ok(cur_frm.doc.suppliers[0].supplier_name == 'Test Supplier', "Supplier name correct");
|
||||
assert.ok(cur_frm.doc.suppliers[0].contact == 'Contact 3-Test Supplier', "Contact correct");
|
||||
assert.ok(cur_frm.doc.suppliers[0].email_id == 'test@supplier.com', "Email id correct");
|
||||
assert.ok(cur_frm.doc.items[0].item_name == 'Test Product 4', "Item Name correct");
|
||||
assert.ok(cur_frm.doc.items[0].warehouse == 'All Warehouses - WP', "Warehouse correct");
|
||||
assert.ok(cur_frm.doc.items[0].warehouse == 'All Warehouses - '+frappe.get_abbr(frappe.defaults.get_default("Company")), "Warehouse correct");
|
||||
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");
|
||||
},
|
||||
|
@ -8,9 +8,8 @@ QUnit.test("test: supplier", function(assert) {
|
||||
return frappe.tests.make('Supplier', [
|
||||
{supplier_name: 'Test Supplier'},
|
||||
{supplier_type: 'Hardware'},
|
||||
{country: 'United States'},
|
||||
{default_currency: 'USD'},
|
||||
{default_price_list: 'Test-Buying-USD'},
|
||||
{country: 'India'},
|
||||
{default_currency: 'INR'},
|
||||
{credit_days_based_on: 'Fixed Days'},
|
||||
{accounts: [
|
||||
[
|
||||
@ -68,7 +67,7 @@ QUnit.test("test: supplier", function(assert) {
|
||||
() => {
|
||||
assert.ok(cur_frm.doc.supplier_name == 'Test Supplier', "Name correct");
|
||||
assert.ok(cur_frm.doc.supplier_type == 'Hardware', "Type correct");
|
||||
assert.ok(cur_frm.doc.default_currency == 'USD', "Currency correct");
|
||||
assert.ok(cur_frm.doc.default_currency == 'INR', "Currency correct");
|
||||
assert.ok(cur_frm.doc.accounts[0].account == 'Creditors - '+frappe.get_abbr('Test Company'), " Account Head abbr correct");
|
||||
assert.ok($('.address-box:nth-child(3) p').text().includes('Shipping City 3'), "Address correct");
|
||||
assert.ok($('.col-sm-6+ .col-sm-6 .h6').text().includes('Contact 3'), "Contact correct");
|
||||
|
@ -11,16 +11,14 @@ QUnit.test("test: supplier quotation", function(assert) {
|
||||
return frappe.tests.make('Supplier Quotation', [
|
||||
{supplier: 'Test Supplier'},
|
||||
{transaction_date: date},
|
||||
{company: 'Wind Power LLC'},
|
||||
{buying_price_list: 'Test-Buying-USD'},
|
||||
{currency: 'USD'},
|
||||
{currency: 'INR'},
|
||||
{items: [
|
||||
[
|
||||
{"item_code": 'Test Product 4'},
|
||||
{"qty": 5},
|
||||
{"uom": 'Unit'},
|
||||
{"rate": 200},
|
||||
{"warehouse": 'All Warehouses - WP'}
|
||||
{"warehouse": 'All Warehouses - '+frappe.get_abbr(frappe.defaults.get_default("Company"))}
|
||||
]
|
||||
]},
|
||||
{apply_discount_on: 'Grand Total'},
|
||||
@ -32,7 +30,7 @@ QUnit.test("test: supplier quotation", function(assert) {
|
||||
() => {
|
||||
// Get Supplier details
|
||||
assert.ok(cur_frm.doc.supplier == 'Test Supplier', "Supplier correct");
|
||||
assert.ok(cur_frm.doc.company == 'Wind Power LLC', "Company correct");
|
||||
assert.ok(cur_frm.doc.company == cur_frm.doc.company, "Company correct");
|
||||
// Get Contact details
|
||||
assert.ok(cur_frm.doc.contact_display == 'Contact 3', "Conatct correct");
|
||||
assert.ok(cur_frm.doc.contact_email == 'test@supplier.com', "Email correct");
|
||||
|
@ -46,7 +46,7 @@ QUnit.test("test Salary Structure", function(assert) {
|
||||
{ payment_account: 'CASH - TC'},
|
||||
]);
|
||||
},
|
||||
() => frappe.timeout(9),
|
||||
() => frappe.timeout(10),
|
||||
() => cur_dialog.set_value('value','Test Salary Structure'),
|
||||
() => frappe.timeout(2),
|
||||
() => frappe.click_button('Create'),
|
||||
@ -75,7 +75,7 @@ QUnit.test("test Salary Structure", function(assert) {
|
||||
};
|
||||
frappe.run_serially([
|
||||
() => salary_structure('Test Employee 1','Test Employee 3'),
|
||||
() => frappe.timeout(14),
|
||||
() => frappe.timeout(16),
|
||||
() => done()
|
||||
]);
|
||||
});
|
@ -111,8 +111,8 @@ QUnit.test("test: production order", function (assert) {
|
||||
() => frappe.timeout(0.5),
|
||||
() => click_make(),
|
||||
() => {
|
||||
assert.equal(cur_frm.doc.total_incoming_value, "105700",
|
||||
"Incoming cost is correct"); // Price of each item x5, values are in USD
|
||||
assert.equal(cur_frm.doc.total_incoming_value, "99104.41",
|
||||
"Incoming cost is correct"+cur_frm.doc.total_incoming_value); // Price of each item x5, values are in USD
|
||||
assert.equal(cur_frm.doc.total_outgoing_value, "99000",
|
||||
"Outgoing cost is correct"); // Price of each item x5, values are in USD
|
||||
assert.equal(cur_frm.doc.total_incoming_value - cur_frm.doc.total_outgoing_value, cur_frm.doc.value_difference,
|
||||
@ -135,4 +135,4 @@ QUnit.test("test: production order", function (assert) {
|
||||
|
||||
() => done()
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
@ -15,6 +15,7 @@ QUnit.test('test student applicant', function(assert){
|
||||
() => frappe.timeout(0.5),
|
||||
() => frappe.tests.click_button('Submit'),
|
||||
() => frappe.tests.click_button('Yes'),
|
||||
() => frappe.timeout(0.5),
|
||||
() => {
|
||||
testing_status = $('span.indicator.orange').text();
|
||||
assert.ok(testing_status.indexOf('Submit this document to confirm') == -1); // checking if submit has been successfull
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"add_sample_data": 1,
|
||||
"bank_account": "HDFC",
|
||||
"company_abbr": "GT",
|
||||
"company_abbr": "FT",
|
||||
"company_name": "For Testing",
|
||||
"company_tagline": "Just for GST",
|
||||
"country": "India",
|
||||
|
@ -60,32 +60,12 @@ erpnext/stock/doctype/material_request/tests/test_material_request_type_manufact
|
||||
erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_issue.js
|
||||
erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_receipt.js
|
||||
erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_transfer.js
|
||||
erpnext/schools/doctype/grading_scale/test_grading_scale.js
|
||||
erpnext/schools/doctype/assessment_criteria_group/test_assessment_criteria_group.js
|
||||
erpnext/schools/doctype/assessment_criteria/test_assessment_criteria.js
|
||||
erpnext/schools/doctype/course/test_course.js
|
||||
erpnext/schools/doctype/program/test_program.js
|
||||
erpnext/hr/doctype/salary_structure/test_salary_structure.js
|
||||
erpnext/hr/doctype/salary_slip/test_salary_slip.js
|
||||
erpnext/hr/doctype/process_payroll/test_process_payroll.js
|
||||
erpnext/hr/doctype/job_opening/test_job_opening.js
|
||||
erpnext/hr/doctype/job_applicant/test_job_applicant.js
|
||||
erpnext/hr/doctype/offer_letter/test_offer_letter.js
|
||||
erpnext/schools/doctype/guardian/test_guardian.js
|
||||
erpnext/schools/doctype/student_admission/test_student_admission.js
|
||||
erpnext/schools/doctype/student_applicant/tests/test_student_applicant_dummy_data.js
|
||||
erpnext/schools/doctype/student_applicant/tests/test_student_applicant.js
|
||||
erpnext/schools/doctype/student_applicant/tests/test_student_applicant_options.js
|
||||
erpnext/schools/doctype/student_log/test_student_log.js
|
||||
erpnext/schools/doctype/student_group/test_student_group.js
|
||||
erpnext/schools/doctype/student_group_creation_tool/test_student_group_creation_tool.js
|
||||
erpnext/schools/doctype/student_leave_application/test_student_leave_application.js
|
||||
erpnext/schools/doctype/student_attendance_tool/test_student_attendance_tool.js
|
||||
erpnext/schools/doctype/student_attendance/test_student_attendance.js
|
||||
erpnext/schools/doctype/assessment_group/test_assessment_group.js
|
||||
erpnext/schools/doctype/assessment_plan/test_assessment_plan.js
|
||||
erpnext/schools/doctype/assessment_result/test_assessment_result.js
|
||||
erpnext/schools/doctype/assessment_result_tool/test_assessment_result_tool.js
|
||||
erpnext/buying/doctype/supplier/test_supplier.js
|
||||
erpnext/buying/doctype/request_for_quotation/tests/test_request_for_quotation.js
|
||||
erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation.js
|
||||
@ -101,4 +81,24 @@ erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_item_wise_d
|
||||
erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_taxes_and_charges.js
|
||||
erpnext/buying/doctype/purchase_order/tests/test_purchase_order_receipt.js
|
||||
erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.js
|
||||
erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.js
|
||||
erpnext/schools/doctype/grading_scale/test_grading_scale.js
|
||||
erpnext/schools/doctype/assessment_criteria_group/test_assessment_criteria_group.js
|
||||
erpnext/schools/doctype/assessment_criteria/test_assessment_criteria.js
|
||||
erpnext/schools/doctype/course/test_course.js
|
||||
erpnext/schools/doctype/program/test_program.js
|
||||
erpnext/schools/doctype/guardian/test_guardian.js
|
||||
erpnext/schools/doctype/student_admission/test_student_admission.js
|
||||
erpnext/schools/doctype/student_applicant/tests/test_student_applicant_dummy_data.js
|
||||
erpnext/schools/doctype/student_applicant/tests/test_student_applicant.js
|
||||
erpnext/schools/doctype/student_applicant/tests/test_student_applicant_options.js
|
||||
erpnext/schools/doctype/student_log/test_student_log.js
|
||||
erpnext/schools/doctype/student_group/test_student_group.js
|
||||
erpnext/schools/doctype/student_group_creation_tool/test_student_group_creation_tool.js
|
||||
erpnext/schools/doctype/student_leave_application/test_student_leave_application.js
|
||||
erpnext/schools/doctype/student_attendance_tool/test_student_attendance_tool.js
|
||||
erpnext/schools/doctype/student_attendance/test_student_attendance.js
|
||||
erpnext/schools/doctype/assessment_group/test_assessment_group.js
|
||||
erpnext/schools/doctype/assessment_plan/test_assessment_plan.js
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user