diff --git a/cypress/e2e/invoices/invoices.createCreditInvoice.cy.js b/cypress/e2e/invoices/invoices.createCreditInvoice.cy.js index 0c73a93f13..20f9c6512b 100644 --- a/cypress/e2e/invoices/invoices.createCreditInvoice.cy.js +++ b/cypress/e2e/invoices/invoices.createCreditInvoice.cy.js @@ -39,37 +39,41 @@ describe('ui-invoices: Credit Invoice creation', () => { cy.visit(TopMenu.invoicesPath); }); - it('C343209 Create a credit invoice (thunderjet)', { tags: ['smoke', 'thunderjet'] }, () => { - const transactionFactory = new Transaction(); - Invoices.createDefaultInvoice(invoice, vendorPrimaryAddress); - Invoices.createInvoiceLine(invoiceLine); - Invoices.addFundDistributionToLine(invoiceLine, fund); - Invoices.approveInvoice(); - // check transactions after approve - cy.visit(TopMenu.fundPath); - Helper.searchByName(fund.name); - Funds.selectFund(fund.name); - Funds.openBudgetDetails(fund.code, DateTools.getCurrentFiscalYearCode()); - Funds.openTransactions(); - const valueInTransactionTable = `$${subtotalValue.toFixed(2)}`; - Funds.checkTransaction( - 1, - transactionFactory.create('pending', valueInTransactionTable, fund.code, '', 'Invoice', ''), - ); - // pay invoice - cy.visit(TopMenu.invoicesPath); - Invoices.searchByNumber(invoice.invoiceNumber); - Invoices.selectInvoice(invoice.invoiceNumber); - Invoices.payInvoice(); - // check transactions after payment - cy.visit(TopMenu.fundPath); - Helper.searchByName(fund.name); - Funds.selectFund(fund.name); - Funds.openBudgetDetails(fund.code, DateTools.getCurrentFiscalYearCode()); - Funds.openTransactions(); - Funds.checkTransaction( - 1, - transactionFactory.create('credit', valueInTransactionTable, fund.code, '', 'Invoice', ''), - ); - }); + it( + 'C343209 Create, approve and pay a credit invoice (thunderjet)', + { tags: ['smoke', 'thunderjet'] }, + () => { + const transactionFactory = new Transaction(); + Invoices.createDefaultInvoice(invoice, vendorPrimaryAddress); + Invoices.createInvoiceLine(invoiceLine); + Invoices.addFundDistributionToLine(invoiceLine, fund); + Invoices.approveInvoice(); + // check transactions after approve + cy.visit(TopMenu.fundPath); + Helper.searchByName(fund.name); + Funds.selectFund(fund.name); + Funds.openBudgetDetails(fund.code, DateTools.getCurrentFiscalYearCode()); + Funds.openTransactions(); + const valueInTransactionTable = `$${subtotalValue.toFixed(2)}`; + Funds.checkTransaction( + 1, + transactionFactory.create('pending', valueInTransactionTable, fund.code, '', 'Invoice', ''), + ); + // pay invoice + cy.visit(TopMenu.invoicesPath); + Invoices.searchByNumber(invoice.invoiceNumber); + Invoices.selectInvoice(invoice.invoiceNumber); + Invoices.payInvoice(); + // check transactions after payment + cy.visit(TopMenu.fundPath); + Helper.searchByName(fund.name); + Funds.selectFund(fund.name); + Funds.openBudgetDetails(fund.code, DateTools.getCurrentFiscalYearCode()); + Funds.openTransactions(); + Funds.checkTransaction( + 1, + transactionFactory.create('credit', valueInTransactionTable, fund.code, '', 'Invoice', ''), + ); + }, + ); }); diff --git a/cypress/e2e/orders/inventory-interaction/create-new-holdings.cy.js b/cypress/e2e/orders/inventory-interaction/create-new-holdings.cy.js index b4babf063b..daddcf033c 100644 --- a/cypress/e2e/orders/inventory-interaction/create-new-holdings.cy.js +++ b/cypress/e2e/orders/inventory-interaction/create-new-holdings.cy.js @@ -145,7 +145,6 @@ describe('Orders: Inventory interaction', () => { // Need to wait,while instance will be saved cy.wait(7000); InventoryItems.closeItem(); - InventoryInstance.openHoldingsAccordion(testData.locations[1].name); InventoryInstance.openItemByBarcodeAndIndex('No barcode'); InventoryItems.edit(); ItemRecordEdit.addBarcode(barcodeForSecondItem); @@ -153,7 +152,6 @@ describe('Orders: Inventory interaction', () => { // Need to wait,while instance will be saved cy.wait(7000); InventoryItems.closeItem(); - InventoryInstance.openHoldingsAccordion(testData.locations[1].name); InventoryInstance.openItemByBarcodeAndIndex(barcodeForFirstItem); ItemRecordView.checkItemDetails( testData.locations[1].name, @@ -161,7 +159,6 @@ describe('Orders: Inventory interaction', () => { ITEM_STATUS_NAMES.ON_ORDER, ); InventoryItems.closeItem(); - InventoryInstance.openHoldingsAccordion(testData.locations[1].name); InventoryInstance.openItemByBarcodeAndIndex(barcodeForSecondItem); ItemRecordView.checkItemDetails( testData.locations[1].name, diff --git a/cypress/e2e/settings/orders/preffix-suffix-create.cy.js b/cypress/e2e/settings/orders/preffix-suffix-create.cy.js index 7563f1a1c4..edfb01d19f 100644 --- a/cypress/e2e/settings/orders/preffix-suffix-create.cy.js +++ b/cypress/e2e/settings/orders/preffix-suffix-create.cy.js @@ -45,6 +45,7 @@ describe('orders: Settings', () => { after(() => { cy.getAdminToken(); + cy.wait(4000); Orders.deleteOrderViaApi(order.id); Organizations.deleteOrganizationViaApi(organization.id); cy.loginAsAdmin({ @@ -60,7 +61,7 @@ describe('orders: Settings', () => { }); it( - 'C671 Add a couple PO prefixes and suffixes, then create a couple POs and PO lines, selecting various prefixes and suffixes; also create a couple PO Lines to ensure that the prefixes/suffixes carry down to the PO Line numbers as well (thunderjet)', + 'C671 Create prefix and suffix for purchase order (thunderjet)', { tags: ['criticalPath', 'thunderjet'] }, () => { Orders.createOrderWithPONumberPreffixSuffix( diff --git a/cypress/support/fragments/orders/modals/exportSettingsModal.js b/cypress/support/fragments/orders/modals/exportSettingsModal.js index 4ece14936a..758e951a03 100644 --- a/cypress/support/fragments/orders/modals/exportSettingsModal.js +++ b/cypress/support/fragments/orders/modals/exportSettingsModal.js @@ -7,7 +7,6 @@ import { MultiSelectOption, RadioButton, including, - matching, } from '../../../../../interactors'; import InteractorsTools from '../../../utils/interactorsTools'; import OrderStates from '../orderStates'; @@ -66,14 +65,9 @@ export default { cy.do(cancelButton.click()); cy.expect(exportSettingsModal.absent()); }, - clickExportButton({ exportStarted = true } = {}) { + clickExportButton() { cy.do(exportButton.click()); + InteractorsTools.checkCalloutMessage(OrderStates.exportJobStartedSuccessfully); cy.expect(exportSettingsModal.absent()); - - if (exportStarted) { - InteractorsTools.checkCalloutMessage( - matching(new RegExp(OrderStates.exportJobStartedSuccessfully)), - ); - } }, };