Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Thunderjet Master Tests #4158

Merged
merged 60 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
b5b5f56
Fix extended tests Thunderjet
bohdanihor Apr 16, 2024
9168dee
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Apr 16, 2024
a4e661c
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Apr 18, 2024
9407007
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Apr 19, 2024
9b4ae2d
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Apr 21, 2024
f06d8f4
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Apr 23, 2024
bc7fc6f
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Apr 24, 2024
aa3ee21
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Apr 24, 2024
0a83653
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Apr 25, 2024
f6c7f3c
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Apr 29, 2024
e9f23bb
Rewrite big UI methods into one API
bohdanihor May 1, 2024
0b27fe6
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor May 1, 2024
5b4eb3a
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor May 29, 2024
2e6898b
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Jun 9, 2024
fad93f6
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Jun 17, 2024
4fa814d
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Jun 18, 2024
0d0b1ce
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Jun 19, 2024
562b6fa
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Jun 19, 2024
5f4ee15
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Jun 25, 2024
0d943b1
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Jun 26, 2024
e439f6d
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Jul 1, 2024
4521c3c
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Jul 4, 2024
643bb89
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Jul 4, 2024
dfcde3b
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Jul 8, 2024
87098f0
Merge branch 'master' of https://github.com/folio-org/stripes-testing
bohdanihor Jul 8, 2024
af8b486
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 9, 2024
b6d5309
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 10, 2024
3b95943
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 11, 2024
950de63
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 15, 2024
aa232bd
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 18, 2024
24df5da
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 19, 2024
abb0c43
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 21, 2024
c55c964
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 24, 2024
1f2b369
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 24, 2024
b23eb1d
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 26, 2024
e6bd685
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 26, 2024
1000b10
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 26, 2024
e4cc749
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 29, 2024
9f26287
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 29, 2024
15482b9
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Jul 30, 2024
baf48e4
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Aug 7, 2024
18a73d1
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Aug 8, 2024
bf5d618
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Aug 11, 2024
393e0cf
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Aug 12, 2024
1d0b6e8
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Aug 12, 2024
0465f50
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Aug 13, 2024
3b40565
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Aug 14, 2024
6dc7eac
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Aug 15, 2024
c7f6c52
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Aug 19, 2024
3f17c6a
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Aug 19, 2024
f290d30
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Aug 22, 2024
a8a0bc2
Update tests after UIF-540
IhorBohdan Aug 23, 2024
2cb5f24
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Aug 23, 2024
bef911c
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Sep 3, 2024
0bb842e
Merge branch 'master' of https://github.com/folio-org/stripes-testing
IhorBohdan Sep 4, 2024
2250e8c
Fix Thunderjet Master Tests
IhorBohdan Sep 4, 2024
dc605cc
Merge branch 'master' into FAT-16203
IhorBohdan Sep 4, 2024
94ec835
Merge branch 'master' into FAT-16203
IhorBohdan Sep 4, 2024
60344fe
Merge branch 'master' into FAT-16203
IhorBohdan Sep 5, 2024
036e3b6
Merge branch 'master' into FAT-16203
IhorBohdan Sep 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Organizations from '../../support/fragments/organizations/organizations';
import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation';
import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints';
import TopMenu from '../../support/fragments/topMenu';
import TopMenuNavigation from '../../support/fragments/topMenuNavigation';
import Users from '../../support/fragments/users/users';
import DateTools from '../../support/utils/dateTools';
import getRandomPostfix from '../../support/utils/stringTools';
Expand Down Expand Up @@ -80,21 +81,22 @@ describe('Invoices', () => {
FinanceHelp.searchByName(defaultFund.name);
Funds.selectFund(defaultFund.name);
Funds.addBudget(allocatedQuantity);
Funds.closeBudgetDetails();
});
secondFiscalYear.code = firstFiscalYear.code.slice(0, -1) + '2';
FiscalYears.createViaApi(secondFiscalYear).then((secondFiscalYearResponse) => {
secondFiscalYear.id = secondFiscalYearResponse.id;
});

cy.visit(TopMenu.ledgerPath);
FinanceHelp.selectLedgersNavigation();
FinanceHelp.searchByName(defaultLedger.name);
Ledgers.selectLedger(defaultLedger.name);
Ledgers.rollover();
Ledgers.fillInCommonRolloverInfo(secondFiscalYear.code, 'None', 'Allocation');
});
});

cy.visit(TopMenu.fiscalYearPath);
FinanceHelp.selectFiscalYearsNavigation();
FinanceHelp.searchByName(firstFiscalYear.name);
FiscalYears.selectFY(firstFiscalYear.name);
FiscalYears.editFiscalYearDetails();
Expand Down Expand Up @@ -167,7 +169,7 @@ describe('Invoices', () => {
Invoices.createInvoiceFromOrder(invoice, firstFiscalYear.code);
Invoices.approveInvoice();
Invoices.payInvoice();
cy.visit(TopMenu.fundPath);
TopMenuNavigation.navigateToApp('Finance');
FinanceHelp.searchByName(defaultFund.name);
Funds.selectFund(defaultFund.name);
Funds.selectPreviousBudgetDetails();
Expand All @@ -177,12 +179,11 @@ describe('Invoices', () => {
firstFiscalYear.code,
'($10.00)',
invoice.invoiceNumber,
'Encumbrance',
'Payment',
`${defaultFund.name} (${defaultFund.code})`,
);
cy.visit(TopMenu.fundPath);
FinanceHelp.searchByName(defaultFund.name);
Funds.selectFund(defaultFund.name);
Funds.closeTransactionApp(defaultFund, firstFiscalYear);
Funds.closeBudgetDetails();
Funds.selectBudgetDetails();
Funds.openTransactions();
Funds.selectTransactionInList('Encumbrance');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ describe('Invoices', () => {
'C440075: Check invoice duplicate validation on "Approve & pay" option (thunderjet)',
{ tags: ['criticalPath', 'thunderjet'] },
() => {
Invoices.selectInvoice(testData.firstInvoice.vendorInvoiceNo);
Invoices.selectInvoiceByIndex(testData.firstInvoice.vendorInvoiceNo, 0);
InvoiceView.clickApproveAndPayInvoice({ isApprovePayEnabled });
ApproveInvoiceModal.verifyModalViewForDuplicateInvoice(
{ isApprovePayEnabled },
Expand All @@ -204,7 +204,7 @@ describe('Invoices', () => {
invoiceInformation: [{ key: 'Status', value: INVOICE_STATUSES.PAID }],
});
cy.wait(2000);
Invoices.selectInvoice(testData.firstInvoice.vendorInvoiceNo);
Invoices.selectInvoiceByIndex(testData.firstInvoice.vendorInvoiceNo, 1);
InvoiceView.checkInvoiceDetails({
invoiceInformation: [{ key: 'Status', value: INVOICE_STATUSES.OPEN }],
});
Expand Down
5 changes: 1 addition & 4 deletions cypress/e2e/invoices/invoices-create-credit-invoice.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ describe('Invoices', () => {
Invoices.approveInvoice();
// check transactions after approve
TopMenuNavigation.openAppFromDropdown('Finance');
Helper.selectFundsNavigation();
Helper.searchByName(fund.name);
Funds.selectFund(fund.name);
Funds.openBudgetDetails(fund.code, DateTools.getCurrentFiscalYearCode());
Expand All @@ -70,10 +71,6 @@ describe('Invoices', () => {
Invoices.payInvoice();
// check transactions after payment
TopMenuNavigation.openAppFromDropdown('Finance');
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', ''),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import MaterialTypes from '../../support/fragments/settings/inventory/materialTy
import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation';
import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints';
import TopMenu from '../../support/fragments/topMenu';
import TopMenuNavigation from '../../support/fragments/topMenuNavigation';
import Users from '../../support/fragments/users/users';
import getRandomPostfix from '../../support/utils/stringTools';

Expand Down Expand Up @@ -183,19 +184,19 @@ describe('ui-orders: Orders', () => {
OrderLines.editPOLInOrder();
OrderLines.editFundInPOL(secondFund, '70', '100');
OrderLines.checkFundInPOL(secondFund);
cy.visit(TopMenu.fundPath);
TopMenuNavigation.navigateToApp('Finance');
FinanceHelp.searchByName(secondFund.name);
Funds.selectFund(secondFund.name);
Funds.selectBudgetDetails();
Funds.viewTransactions();
Funds.checkOrderInTransactionList(`${secondFund.code}`, '($20.00)');
cy.visit(TopMenu.invoicesPath);
TopMenuNavigation.navigateToApp('Invoices');
Invoices.searchByNumber(firstInvoice.vendorInvoiceNo);
Invoices.selectInvoice(firstInvoice.vendorInvoiceNo);
Invoices.selectInvoiceLine();
cy.reload();
Invoices.checkFundInInvoiceLine(firstFund);
cy.visit(TopMenu.fundPath);
TopMenuNavigation.navigateToApp('Finance');
FinanceHelp.searchByName(firstFund.name);
Funds.selectFund(firstFund.name);
Funds.selectBudgetDetails();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,33 +57,37 @@ describe('ui-organizations: Organizations', () => {
// Need to wait,while data is load
cy.wait(2000);
AcquisitionUnits.assignUser(user.username);

cy.logout();
cy.login(user.username, user.password, {
path: TopMenu.organizationsPath,
waiter: Organizations.waitLoading,
});
Organizations.createOrganizationWithAU(organization, defaultAcquisitionUnit.name);
Organizations.checkOrganizationInfo(organization);
cy.logout();

cy.loginAsAdmin({
path: SettingsMenu.acquisitionUnitsPath,
waiter: AcquisitionUnits.waitLoading,
});
AcquisitionUnits.unAssignUser(defaultAcquisitionUnit.name);
cy.logout();

cy.login(user.username, user.password, {
path: TopMenu.organizationsPath,
waiter: Organizations.waitLoading,
});
Organizations.searchByParameters('Name', organization.name);
Organizations.checkZeroSearchResultsHeader();
cy.logout();

cy.loginAsAdmin({
path: SettingsMenu.acquisitionUnitsPath,
waiter: AcquisitionUnits.waitLoading,
});
AcquisitionUnits.edit(defaultAcquisitionUnit.name);
AcquisitionUnits.selectViewCheckbox();
cy.logout();

cy.login(user.username, user.password, {
path: TopMenu.organizationsPath,
Expand Down
10 changes: 10 additions & 0 deletions cypress/support/fragments/invoices/invoices.js
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,16 @@ export default {
cy.do(invoiceResultsPane.find(Link(invoiceNumber)).click());
},

selectInvoiceByIndex: (invoiceNumber, indexNumber) => {
cy.wait(4000);
cy.do(
invoiceResultsPane
.find(MultiColumnListRow({ index: indexNumber }))
.find(Link(invoiceNumber))
.click(),
);
},

checkVendorCodeInInvoicePane: (vendorCode) => {
cy.wait(4000);
cy.expect(Pane({ subtitle: vendorCode }).exists());
Expand Down
5 changes: 5 additions & 0 deletions cypress/support/fragments/orders/orders.js
Original file line number Diff line number Diff line change
Expand Up @@ -925,4 +925,9 @@ export default {
cy.wait(4000);
cy.expect(ordersResultsPane.find(MultiColumnListCell(POL)).exists());
},

selectOrdersNavigation: () => {
cy.wait(4000);
cy.get('[data-test-orders-navigation="true"]').click();
},
};
3 changes: 2 additions & 1 deletion cypress/support/fragments/organizations/organizations.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ export default {

createOrganizationViaUi: (organization) => {
cy.expect(buttonNew.exists());
cy.do(buttonNew.click());
cy.wait(4000);
cy.do([
buttonNew.click(),
organizationStatus.choose(organization.status),
organizationNameField.fillIn(organization.name),
organizationCodeField.fillIn(organization.code),
Expand Down
Loading