Skip to content

Commit

Permalink
Thunderjet Poppy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdanihor committed Apr 17, 2024
1 parent 06c2759 commit 1eef989
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 45 deletions.
70 changes: 37 additions & 33 deletions cypress/e2e/invoices/invoices.createCreditInvoice.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', ''),
);
},
);
});
Original file line number Diff line number Diff line change
Expand Up @@ -145,23 +145,20 @@ 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);
ItemRecordEdit.saveAndClose();
// 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,
barcodeForFirstItem,
ITEM_STATUS_NAMES.ON_ORDER,
);
InventoryItems.closeItem();
InventoryInstance.openHoldingsAccordion(testData.locations[1].name);
InventoryInstance.openItemByBarcodeAndIndex(barcodeForSecondItem);
ItemRecordView.checkItemDetails(
testData.locations[1].name,
Expand Down
3 changes: 2 additions & 1 deletion cypress/e2e/settings/orders/preffix-suffix-create.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe('orders: Settings', () => {

after(() => {
cy.getAdminToken();
cy.wait(4000);
Orders.deleteOrderViaApi(order.id);
Organizations.deleteOrganizationViaApi(organization.id);
cy.loginAsAdmin({
Expand All @@ -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(
Expand Down
10 changes: 2 additions & 8 deletions cypress/support/fragments/orders/modals/exportSettingsModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
MultiSelectOption,
RadioButton,
including,
matching,
} from '../../../../../interactors';
import InteractorsTools from '../../../utils/interactorsTools';
import OrderStates from '../orderStates';
Expand Down Expand Up @@ -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)),
);
}
},
};

0 comments on commit 1eef989

Please sign in to comment.