* feat: Bulk Transaction Processing * fix: add flags to ignore validations and exception handling correction * fix: remove duplicate code, added logger functionality and improved notifications * fix: linting and sider issues * test: added tests * fix: linter issues * fix: failing test case * fix: sider issues and test cases * refactor: mapping function calls to create order/invoice * fix: added more test cases to increase coverage * fix: test cases * fix: sider issue * fix: rename doctype, improve formatting and minor refactor * fix: update doctype name in hooks and sider issues * fix: entry log test case * fix: typos, translations and company name in tests * fix: linter issues and translations * fix: linter issue * fix: split into separate function for marking failed transaction * fix: typos, retry failed transaction logic and make log read only * fix: hide retry button when no failed transactions and remove test cases not rrelevant * fix: sider issues and indentation to tabs Co-authored-by: Ankush Menat <ankush@frappe.io>
		
			
				
	
	
		
			45 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| describe("Bulk Transaction Processing", () => {
 | |
| 	before(() => {
 | |
| 		cy.login();
 | |
| 		cy.visit("/app/website");
 | |
| 	});
 | |
| 
 | |
| 	it("Creates To Sales Order", () => {
 | |
| 		cy.visit("/app/sales-order");
 | |
| 		cy.url().should("include", "/sales-order");
 | |
| 		cy.window()
 | |
| 			.its("frappe.csrf_token")
 | |
| 			.then((csrf_token) => {
 | |
| 				return cy
 | |
| 					.request({
 | |
| 						url: "/api/method/erpnext.tests.ui_test_bulk_transaction_processing.create_records",
 | |
| 						method: "POST",
 | |
| 						headers: {
 | |
| 							Accept: "application/json",
 | |
| 							"Content-Type": "application/json",
 | |
| 							"X-Frappe-CSRF-Token": csrf_token,
 | |
| 						},
 | |
| 						timeout: 60000,
 | |
| 					})
 | |
| 					.then((res) => {
 | |
| 						expect(res.status).eq(200);
 | |
| 					});
 | |
| 			});
 | |
| 		cy.wait(5000);
 | |
| 		cy.get(
 | |
| 			".list-row-head > .list-header-subject > .list-row-col > .list-check-all"
 | |
| 		).check({ force: true });
 | |
| 		cy.wait(3000);
 | |
| 		cy.get(".actions-btn-group > .btn-primary").click({ force: true });
 | |
| 		cy.wait(3000);
 | |
| 		cy.get(".dropdown-menu-right > .user-action > .dropdown-item")
 | |
| 			.contains("Sales Invoice")
 | |
| 			.click({ force: true });
 | |
| 		cy.wait(3000);
 | |
| 		cy.get(".modal-content > .modal-footer > .standard-actions")
 | |
| 			.contains("Yes")
 | |
| 			.click({ force: true });
 | |
| 		cy.contains("Creation of Sales Invoice successful");
 | |
| 	});
 | |
| });
 |