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

FAT-14561 #4360

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
58 changes: 32 additions & 26 deletions cypress/e2e/checkin/check-in-backdate.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,32 +69,38 @@ describe('Check in backdate', () => {
Users.deleteViaApi(userData.userId);
});

it('C587 Check in: backdate check ins (vega) (TaaS)', { tags: ['extendedPath', 'vega', 'C587'] }, () => {
const itemEditedReturnTime = '2:00 AM';
const today = new Date();
const itemEditedReturnDateWithoutZero = DateTools.getFormattedDateWithSlashes({ date: today });
const itemEditedReturnDate = DateTools.getFormattedDate({ date: today }, 'MM/DD/YYYY');
it(
'C587 Check in: backdate check ins (vega) (TaaS)',
{ tags: ['extendedPath', 'vega', 'C587'] },
() => {
const itemEditedReturnTime = '2:00 AM';
const today = new Date();
const itemEditedReturnDateWithoutZero = DateTools.getFormattedDateWithSlashes({
date: today,
});
const itemEditedReturnDate = DateTools.getFormattedDate({ date: today }, 'MM/DD/YYYY');

// Find an open loan that is not overdue
cy.visit(AppPaths.getOpenLoansPath(userData.userId));
UserLoans.openLoanDetails(itemBarcode);
// Find an open loan that is not overdue
cy.visit(AppPaths.getOpenLoansPath(userData.userId));
UserLoans.openLoanDetails(itemBarcode);

// Edit Date returned and Time returned
cy.visit(TopMenu.checkInPath);
CheckInActions.waitLoading();
CheckInActions.editDateAndTimeReturned(itemEditedReturnDate, itemEditedReturnTime);
// Enter barcode of item being checked in
CheckInActions.checkInItemGui(itemBarcode);
// Time returned is time entered
CheckInActions.checkTimeReturned(0, itemEditedReturnTime);
// Under Actions click on loan details
CheckInActions.openLoanDetails(userData.username);
// Return date/time are the values entered at check in
LoanDetails.checkKeyValue(
'Return date',
`${itemEditedReturnDateWithoutZero}, ${itemEditedReturnTime}`,
);
// Item status is available
LoanDetails.checkKeyValue('Item status', 'Available');
});
// Edit Date returned and Time returned
cy.visit(TopMenu.checkInPath);
CheckInActions.waitLoading();
CheckInActions.editDateAndTimeReturned(itemEditedReturnDate, itemEditedReturnTime);
// Enter barcode of item being checked in
CheckInActions.checkInItemGui(itemBarcode);
// Time returned is time entered
CheckInActions.checkTimeReturned(0, itemEditedReturnTime);
// Under Actions click on loan details
CheckInActions.openLoanDetails(userData.username);
// Return date/time are the values entered at check in
LoanDetails.checkKeyValue(
'Return date',
`${itemEditedReturnDateWithoutZero}, ${itemEditedReturnTime}`,
);
// Item status is available
LoanDetails.checkKeyValue('Item status', 'Available');
},
);
});
76 changes: 40 additions & 36 deletions cypress/e2e/checkin/check-in-claimed-returned-items.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,48 +152,52 @@ describe('Check in', () => {
);
cy.deleteLoanType(testData.loanTypeId);
});
it('C10974 Check In: claimed returned items (vega)', { tags: ['criticalPath', 'vega', 'C10974'] }, () => {
cy.login(userData.username, userData.password, {
path: TopMenu.checkInPath,
waiter: CheckInActions.waitLoading,
});
it(
'C10974 Check In: claimed returned items (vega)',
{ tags: ['criticalPath', 'vega', 'C10974'] },
() => {
cy.login(userData.username, userData.password, {
path: TopMenu.checkInPath,
waiter: CheckInActions.waitLoading,
});

const itemForFoundByLibrary = itemsData.itemsWithSeparateInstance[0];
const itemForFoundByLibrary = itemsData.itemsWithSeparateInstance[0];

CheckInActions.checkInItemGui(itemForFoundByLibrary.barcode);
ClaimedReturned.checkModalMessage(itemForFoundByLibrary);
ClaimedReturned.closeModal();
CheckInActions.checkInItemGui(itemForFoundByLibrary.barcode);
ClaimedReturned.checkModalMessage(itemForFoundByLibrary);
ClaimedReturned.chooseItemReturnedByLibrary();
CheckInActions.openLoanDetails(userData.username);
UsersCard.getApi(userData.userId).then((user) => {
Loans.getApi(userData.userId).then(([foundByLibraryLoan]) => {
cy.getLoanHistory(foundByLibraryLoan.id).then(([loanHistoryFirstAction]) => {
LoanDetails.checkAction('Checked in (found by library)');
LoanDetails.checkLoansActionsHaveSameDueDate(0, 1, loanHistoryFirstAction.loan.dueDate);
LoanDetails.checkStatusInList(0, ITEM_STATUS_NAMES.AVAILABLE);
LoanDetails.checkSource(0, user);
CheckInActions.checkInItemGui(itemForFoundByLibrary.barcode);
ClaimedReturned.checkModalMessage(itemForFoundByLibrary);
ClaimedReturned.closeModal();
CheckInActions.checkInItemGui(itemForFoundByLibrary.barcode);
ClaimedReturned.checkModalMessage(itemForFoundByLibrary);
ClaimedReturned.chooseItemReturnedByLibrary();
CheckInActions.openLoanDetails(userData.username);
UsersCard.getApi(userData.userId).then((user) => {
Loans.getApi(userData.userId).then(([foundByLibraryLoan]) => {
cy.getLoanHistory(foundByLibraryLoan.id).then(([loanHistoryFirstAction]) => {
LoanDetails.checkAction('Checked in (found by library)');
LoanDetails.checkLoansActionsHaveSameDueDate(0, 1, loanHistoryFirstAction.loan.dueDate);
LoanDetails.checkStatusInList(0, ITEM_STATUS_NAMES.AVAILABLE);
LoanDetails.checkSource(0, user);
});
});
});
});

const itemReturnedByPatron = itemsData.itemsWithSeparateInstance[1];
const itemReturnedByPatron = itemsData.itemsWithSeparateInstance[1];

TopMenuNavigation.navigateToApp(APPLICATION_NAMES.CHECK_IN);
CheckInActions.checkInItemGui(itemReturnedByPatron.barcode);
ClaimedReturned.checkModalMessage(itemReturnedByPatron);
ClaimedReturned.chooseItemReturnedByPatron();
CheckInActions.openLoanDetails(userData.username);
UsersCard.getApi(userData.userId).then((user) => {
Loans.getApi(userData.userId).then(([returnedByPatron]) => {
cy.getLoanHistory(returnedByPatron.id).then(([loanHistoryFirstAction]) => {
LoanDetails.checkAction('Checked in (returned by patron)');
LoanDetails.checkLoansActionsHaveSameDueDate(0, 1, loanHistoryFirstAction.loan.dueDate);
LoanDetails.checkStatusInList(0, ITEM_STATUS_NAMES.AVAILABLE);
LoanDetails.checkSource(0, user);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.CHECK_IN);
CheckInActions.checkInItemGui(itemReturnedByPatron.barcode);
ClaimedReturned.checkModalMessage(itemReturnedByPatron);
ClaimedReturned.chooseItemReturnedByPatron();
CheckInActions.openLoanDetails(userData.username);
UsersCard.getApi(userData.userId).then((user) => {
Loans.getApi(userData.userId).then(([returnedByPatron]) => {
cy.getLoanHistory(returnedByPatron.id).then(([loanHistoryFirstAction]) => {
LoanDetails.checkAction('Checked in (returned by patron)');
LoanDetails.checkLoansActionsHaveSameDueDate(0, 1, loanHistoryFirstAction.loan.dueDate);
LoanDetails.checkStatusInList(0, ITEM_STATUS_NAMES.AVAILABLE);
LoanDetails.checkSource(0, user);
});
});
});
});
});
},
);
});
84 changes: 44 additions & 40 deletions cypress/e2e/checkin/check-in-in-house-use.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,44 +97,48 @@ describe('Check in', () => {
Users.deleteViaApi(testData.user.userId);
});

it('C9198 Check In: in-house use icon (vega) (TaaS)', { tags: ['extendedPath', 'vega', 'C9198'] }, () => {
// #1 Navigate to Check In app. Check in checked out item A at service point X.
CheckInActions.checkInItemGui(itemAData.barcode);
CheckInPane.checkResultsInTheRow([ITEM_STATUS_NAMES.AVAILABLE, itemAData.barcode]);
// Check in succeeds. In-house use column is not populated
CheckInPane.checkInHouseUseIcon(false);
// #2 Switch user's service point to service point Y. Check in item A.
SwitchServicePoint.switchServicePoint(testData.servicePointY.name);
SwitchServicePoint.checkIsServicePointSwitched(testData.servicePointY.name);
CheckInActions.checkInItemGui(itemAData.barcode);
InTransit.verifyModalTitle();
InTransit.unselectCheckboxPrintSlip();
InTransit.closeModal();
CheckInPane.checkResultsInTheRow([
`${ITEM_STATUS_NAMES.IN_TRANSIT} - ${testData.servicePointX.name}`,
itemAData.barcode,
]);
// Check in succeeds. In-house use column is not populated
CheckInPane.checkInHouseUseIcon(false);
// #3 Switch user's service point to service point X. Check in item A.
SwitchServicePoint.switchServicePoint(testData.servicePointX.name);
SwitchServicePoint.checkIsServicePointSwitched(testData.servicePointX.name);
CheckInActions.checkInItemGui(itemAData.barcode);
CheckInPane.checkResultsInTheRow([ITEM_STATUS_NAMES.AVAILABLE, itemAData.barcode]);
// Check in succeeds. In-house use column is not populated
CheckInPane.checkInHouseUseIcon(false);
// #4 Still using service point X, check in item A.
CheckInActions.checkInItemGui(itemAData.barcode);
CheckInPane.checkResultsInTheRow([ITEM_STATUS_NAMES.AVAILABLE, itemAData.barcode]);
// Check in succeeds. In-house use column is populated with house icon.
CheckInPane.checkInHouseUseIcon(true);
// #5 Still using service point X, check in item B (available, with at least one open request).
CheckInActions.checkInItemGui(itemBData.barcode);
AwaitingPickupForARequest.verifyModalTitle();
AwaitingPickupForARequest.unselectCheckboxPrintSlip();
AwaitingPickupForARequest.closeModal();
CheckInPane.checkResultsInTheRow([ITEM_STATUS_NAMES.AWAITING_PICKUP, itemBData.barcode]);
// Check in succeeds. In-house use column is not populated
CheckInPane.checkInHouseUseIcon(false);
});
it(
'C9198 Check In: in-house use icon (vega) (TaaS)',
{ tags: ['extendedPath', 'vega', 'C9198'] },
() => {
// #1 Navigate to Check In app. Check in checked out item A at service point X.
CheckInActions.checkInItemGui(itemAData.barcode);
CheckInPane.checkResultsInTheRow([ITEM_STATUS_NAMES.AVAILABLE, itemAData.barcode]);
// Check in succeeds. In-house use column is not populated
CheckInPane.checkInHouseUseIcon(false);
// #2 Switch user's service point to service point Y. Check in item A.
SwitchServicePoint.switchServicePoint(testData.servicePointY.name);
SwitchServicePoint.checkIsServicePointSwitched(testData.servicePointY.name);
CheckInActions.checkInItemGui(itemAData.barcode);
InTransit.verifyModalTitle();
InTransit.unselectCheckboxPrintSlip();
InTransit.closeModal();
CheckInPane.checkResultsInTheRow([
`${ITEM_STATUS_NAMES.IN_TRANSIT} - ${testData.servicePointX.name}`,
itemAData.barcode,
]);
// Check in succeeds. In-house use column is not populated
CheckInPane.checkInHouseUseIcon(false);
// #3 Switch user's service point to service point X. Check in item A.
SwitchServicePoint.switchServicePoint(testData.servicePointX.name);
SwitchServicePoint.checkIsServicePointSwitched(testData.servicePointX.name);
CheckInActions.checkInItemGui(itemAData.barcode);
CheckInPane.checkResultsInTheRow([ITEM_STATUS_NAMES.AVAILABLE, itemAData.barcode]);
// Check in succeeds. In-house use column is not populated
CheckInPane.checkInHouseUseIcon(false);
// #4 Still using service point X, check in item A.
CheckInActions.checkInItemGui(itemAData.barcode);
CheckInPane.checkResultsInTheRow([ITEM_STATUS_NAMES.AVAILABLE, itemAData.barcode]);
// Check in succeeds. In-house use column is populated with house icon.
CheckInPane.checkInHouseUseIcon(true);
// #5 Still using service point X, check in item B (available, with at least one open request).
CheckInActions.checkInItemGui(itemBData.barcode);
AwaitingPickupForARequest.verifyModalTitle();
AwaitingPickupForARequest.unselectCheckboxPrintSlip();
AwaitingPickupForARequest.closeModal();
CheckInPane.checkResultsInTheRow([ITEM_STATUS_NAMES.AWAITING_PICKUP, itemBData.barcode]);
// Check in succeeds. In-house use column is not populated
CheckInPane.checkInHouseUseIcon(false);
},
);
});
74 changes: 39 additions & 35 deletions cypress/e2e/checkin/check-in-multipiece-items.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,39 +79,43 @@ describe('Check In', () => {
Users.deleteViaApi(userData.userId);
});

it('C590 Check in: multipiece items (vega) (TaaS)', { tags: ['extendedPath', 'vega', 'C590'] }, () => {
// Enter barcode for item A (number of pieces set to 1, and description of pieces, number of missing pieces, and description of missing pieces left blank)
CheckInActions.checkInItem(itemBarcodes[0]);
// Confirm multipiece check in modal does not appear.
MultipieceCheckIn.verifyMultipieceCheckInModalIsAbsent();
// Enter barcode for item B (number of pieces set to a number greater than 1 and/or some value for description of pieces; number of missing pieces and description of missing pieces left blank)
CheckInActions.waitLoading();
CheckInActions.checkInItem(itemBarcodes[1]);
// Confirm multipiece check in modal appears: <Title of item> (<material type of item>) (Barcode: <barcode of item>) will be checked in.
MultipieceCheckIn.verifyMultipieceCheckInModalIsDisplayed();
MultipieceCheckIn.checkContent(testItems[1]);
// Click Cancel and Item is not checked in.
MultipieceCheckIn.cancelMultipieceCheckInModal(itemBarcodes[1]);
// Enter barcode for item B again.
CheckInActions.checkInItem(itemBarcodes[1]);
// Same modal from step 3 displays.
MultipieceCheckIn.verifyMultipieceCheckInModalIsDisplayed();
// Click check in.
// Item is checked in.
CheckInActions.confirmMultipleItemsCheckinWithoutConfirmation(itemBarcodes[1]);
// Enter barcode for item C (number of pieces set to a number greater than 1 and/or some value for description of pieces, and some value for number of missing pieces and/or description of missing pieces)
CheckInActions.checkInItem(itemBarcodes[2]);
// Confirm multipiece check in modal appears.
MultipieceCheckIn.verifyMultipieceCheckInModalIsDisplayed();
MultipieceCheckIn.checkContent(testItems[2]);
// Click check in.Item is checked in.
CheckInActions.confirmMultipleItemsCheckinWithoutConfirmation(itemBarcodes[2]);
// Enter barcode for item D (number of pieces left blank, description of pieces left blank, and some value for number of missing pieces and/or description of missing pieces)
CheckInActions.checkInItem(itemBarcodes[3]);
// Confirm multipiece check in modal appears.
MultipieceCheckIn.verifyMultipieceCheckInModalIsDisplayed();
MultipieceCheckIn.checkContent(testItems[3]);
// Click check in. Item is checked in.
CheckInActions.confirmMultipleItemsCheckinWithoutConfirmation(itemBarcodes[3]);
});
it(
'C590 Check in: multipiece items (vega) (TaaS)',
{ tags: ['extendedPath', 'vega', 'C590'] },
() => {
// Enter barcode for item A (number of pieces set to 1, and description of pieces, number of missing pieces, and description of missing pieces left blank)
CheckInActions.checkInItem(itemBarcodes[0]);
// Confirm multipiece check in modal does not appear.
MultipieceCheckIn.verifyMultipieceCheckInModalIsAbsent();
// Enter barcode for item B (number of pieces set to a number greater than 1 and/or some value for description of pieces; number of missing pieces and description of missing pieces left blank)
CheckInActions.waitLoading();
CheckInActions.checkInItem(itemBarcodes[1]);
// Confirm multipiece check in modal appears: <Title of item> (<material type of item>) (Barcode: <barcode of item>) will be checked in.
MultipieceCheckIn.verifyMultipieceCheckInModalIsDisplayed();
MultipieceCheckIn.checkContent(testItems[1]);
// Click Cancel and Item is not checked in.
MultipieceCheckIn.cancelMultipieceCheckInModal(itemBarcodes[1]);
// Enter barcode for item B again.
CheckInActions.checkInItem(itemBarcodes[1]);
// Same modal from step 3 displays.
MultipieceCheckIn.verifyMultipieceCheckInModalIsDisplayed();
// Click check in.
// Item is checked in.
CheckInActions.confirmMultipleItemsCheckinWithoutConfirmation(itemBarcodes[1]);
// Enter barcode for item C (number of pieces set to a number greater than 1 and/or some value for description of pieces, and some value for number of missing pieces and/or description of missing pieces)
CheckInActions.checkInItem(itemBarcodes[2]);
// Confirm multipiece check in modal appears.
MultipieceCheckIn.verifyMultipieceCheckInModalIsDisplayed();
MultipieceCheckIn.checkContent(testItems[2]);
// Click check in.Item is checked in.
CheckInActions.confirmMultipleItemsCheckinWithoutConfirmation(itemBarcodes[2]);
// Enter barcode for item D (number of pieces left blank, description of pieces left blank, and some value for number of missing pieces and/or description of missing pieces)
CheckInActions.checkInItem(itemBarcodes[3]);
// Confirm multipiece check in modal appears.
MultipieceCheckIn.verifyMultipieceCheckInModalIsDisplayed();
MultipieceCheckIn.checkContent(testItems[3]);
// Click check in. Item is checked in.
CheckInActions.confirmMultipleItemsCheckinWithoutConfirmation(itemBarcodes[3]);
},
);
});
54 changes: 29 additions & 25 deletions cypress/e2e/checkin/check-in-notes.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,29 +105,33 @@ describe('Check in', () => {
Users.deleteViaApi(userData.userId);
});

it('C776 Check in: check in notes (vega) (TaaS)', { tags: ['extendedPath', 'vega', 'C776'] }, () => {
// Scan item with at least two check in notes in Check In app
CheckInActions.checkInItemGui(itemBarcode);
// Check in note modal appears
CheckInModal.verifyModalTitle();
CheckInModal.verifyNotesInfo([note2, note1]);
// Click cancel on check in note modal
CheckInModal.closeModal();
CheckInModal.verifyModalIsClosed();
CheckInPane.checkItemIsNotCheckedIn(itemBarcode);
// Scan item in Check In app
CheckInActions.checkInItemGui(itemBarcode);
// Check in note modal appears
CheckInModal.verifyModalTitle();
CheckInModal.verifyNotesInfo([note2, note1]);
// Click confirm on check in note modal
CheckInModal.confirmModal();
// Item is checked in
CheckInPane.checkResultsInTheRow([itemBarcode]);
// Check in notes appears in menu
CheckInActions.checkActionsMenuOptions(['checkInNotes']);
// Click check in notes
CheckInActions.openCheckInNotes([note2, note1]);
CheckInModal.verifyModalIsClosed();
});
it(
'C776 Check in: check in notes (vega) (TaaS)',
{ tags: ['extendedPath', 'vega', 'C776'] },
() => {
// Scan item with at least two check in notes in Check In app
CheckInActions.checkInItemGui(itemBarcode);
// Check in note modal appears
CheckInModal.verifyModalTitle();
CheckInModal.verifyNotesInfo([note2, note1]);
// Click cancel on check in note modal
CheckInModal.closeModal();
CheckInModal.verifyModalIsClosed();
CheckInPane.checkItemIsNotCheckedIn(itemBarcode);
// Scan item in Check In app
CheckInActions.checkInItemGui(itemBarcode);
// Check in note modal appears
CheckInModal.verifyModalTitle();
CheckInModal.verifyNotesInfo([note2, note1]);
// Click confirm on check in note modal
CheckInModal.confirmModal();
// Item is checked in
CheckInPane.checkResultsInTheRow([itemBarcode]);
// Check in notes appears in menu
CheckInActions.checkActionsMenuOptions(['checkInNotes']);
// Click check in notes
CheckInActions.openCheckInNotes([note2, note1]);
CheckInModal.verifyModalIsClosed();
},
);
});
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('Check in', () => {
});

it(
'C588 Check in: at service point not assigned to item\'s effective location (vega) (TaaS)',
"C588 Check in: at service point not assigned to item's effective location (vega) (TaaS)",
{ tags: ['criticalPath', 'vega', 'C588'] },
() => {
cy.visit(TopMenu.checkInPath);
Expand Down
Loading
Loading