Skip to content

Commit

Permalink
Merge branch 'master' into FAT-13505
Browse files Browse the repository at this point in the history
  • Loading branch information
Sherzod-Kenjaev committed May 22, 2024
2 parents 80916e6 + 3c37682 commit f0c09bd
Show file tree
Hide file tree
Showing 22 changed files with 33 additions and 30 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/requests/assign-tags-to-request.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('ui-requests: Assign Tags to Request', () => {
Requests.openTagsPane();
Requests.addTag(tag);
Requests.closePane('Tags');
Requests.closePane('Request Detail');
Requests.closePane('Request details');
Requests.findCreatedRequest(instanceData.instanceTitle);
Requests.selectFirstRequest(instanceData.instanceTitle);
Requests.openTagsPane();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/requests/edit-title-level-request.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ describe('Title Level Request', () => {
);
ServicePoints.deleteViaApi(servicePoint1.id);
ServicePoints.deleteViaApi(servicePoint2.id);
// eslint-disable-next-line no-console
} catch (e) {
// eslint-disable-next-line no-console
console.log(e);
}
});
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/requests/filter-request-by-tags.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ describe('ui-requests: Filter requests by tags', () => {
Requests.openTagsPane();
Requests.addTag(tags[index].label);
Requests.closePane('Tags');
Requests.closePane('Request Detail');
Requests.closePane('Request detail');
Requests.resetAllFilters();
Requests.filterRequestsByTag(tags[index].label);
Requests.selectFirstRequest(instance.instanceTitle);
Requests.openTagsPane();
Requests.verifyAssignedTags(tags[index].label);
Requests.closePane('Tags');
Requests.closePane('Request Detail');
Requests.closePane('Request detail');
Requests.resetAllFilters();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ describe('Requests -> Filter Requests with Special Symbols', () => {
InteractorsTools.checkCalloutMessage('New tag created');

Requests.closePane('Tags');
Requests.closePane('Request Detail');
Requests.closePane('Request detail');
Requests.resetAllFilters();
Requests.filterRequestsByTag(tag);
Requests.selectFirstRequest(itemData.instanceTitle);
Requests.openTagsPane();
Requests.verifyAssignedTags(tag);

Requests.closePane('Tags');
Requests.closePane('Request Detail');
Requests.closePane('Request detail');
Requests.clearSelectedTags();
Requests.verifyNoResultMessage('Choose a filter or enter a search query to show results.');

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/requests/patron-comments-request-csv.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ describe('Requests Export CSV File', () => {
Requests.selectNotYetFilledRequest();
Requests.findCreatedRequest(itemData.barcode);
Requests.exportRequestToCsv();
Requests.checkCellInCsvFileContainsValue(fileName, 1, 30, patronComment);
Requests.checkCellInCsvFileContainsValue(fileName, 1, 31, patronComment);
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import Location from '../../support/fragments/settings/tenant/locations/newLocat
import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints';
import SwitchServicePoint from '../../support/fragments/settings/tenant/servicePoints/switchServicePoint';
import PatronGroups from '../../support/fragments/settings/users/patronGroups';
import SettingsMenu from '../../support/fragments/settingsMenu';
import TopMenu from '../../support/fragments/topMenu';
import UserEdit from '../../support/fragments/users/userEdit';
import Users from '../../support/fragments/users/users';
Expand All @@ -38,11 +37,7 @@ describe('Title Level Request', () => {
cy.getAdminToken();
ServicePoints.createViaApi(testData.servicePoint);
ServicePoints.createViaApi(testData.servicePoint2);
cy.loginAsAdmin({
path: SettingsMenu.circulationTitleLevelRequestsPath,
waiter: TitleLevelRequests.waitLoading,
});
TitleLevelRequests.changeTitleLevelRequestsStatus('allow');
TitleLevelRequests.enableTLRViaApi();
testData.defaultLocation = Location.getDefaultLocation(testData.servicePoint.id);
Location.createViaApi(testData.defaultLocation).then((location) => {
InventoryInstances.createFolioInstancesViaApi({
Expand Down Expand Up @@ -110,10 +105,10 @@ describe('Title Level Request', () => {
'C350425 Check that request goes to "Fulfillment in progress" if the items status has changed to "In progress" (vega) (TaaS)',
{ tags: ['criticalPath', 'vega'] },
() => {
SwitchServicePoint.switchServicePoint(testData.servicePoint2.name);
SwitchServicePoint.checkIsServicePointSwitched(testData.servicePoint2.name);
cy.visit(TopMenu.checkInPath);
CheckInActions.waitLoading();
SwitchServicePoint.switchServicePoint(testData.servicePoint2.name);
SwitchServicePoint.checkIsServicePointSwitched(testData.servicePoint2.name);
CheckInActions.checkInItem(testData.folioInstances[0].barcodes[0]);
InTransit.verifyModalTitle();
InTransit.unselectCheckboxPrintSlip();
Expand Down
4 changes: 1 addition & 3 deletions cypress/e2e/staff-slips/hold-slip.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ describe('Check In - Actions', () => {
RequestPolicy.deleteViaApi(requestPolicyBody.id);
CirculationRules.deleteRuleViaApi(testData.addedRule);
UserEdit.changeServicePointPreferenceViaApi(userData.userId, [testData.userServicePoint.id]);
UserEdit.changeServicePointPreferenceViaApi(requestUserData.userId, [
testData.userServicePoint.id,
]);
UserEdit.changeServicePointPreferenceViaApi(requestUserData.userId, [testData.userServicePoint.id]);
ServicePoints.deleteViaApi(testData.userServicePoint.id);
Requests.getRequestApi({ query: `(item.barcode=="${itemData.barcode}")` }).then(
(requestResponse) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Users from '../../support/fragments/users/users';
import generateItemBarcode from '../../support/utils/generateItemBarcode';
import getRandomPostfix from '../../support/utils/stringTools';

describe('Title Level Request. Request Detail', () => {
describe('Title Level Request. Request detail', () => {
let userData = {};
let userForTLR = {};
const requestIds = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('Title Level Request. Create Item or Title level request', () => {
requestId = intercept.response.body.id;
cy.location('pathname').should('eq', `/requests/view/${requestId}`);
});
Requests.closePane('Request Detail');
Requests.closePane('Request detail');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ describe('Title Level Request. Create Item or Title level request', () => {
requestId = intercept.response.body.id;
cy.location('pathname').should('eq', `/requests/view/${requestId}`);
});
Requests.closePane('Request Detail');
Requests.closePane('Request detail');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Users from '../../support/fragments/users/users';
import generateItemBarcode from '../../support/utils/generateItemBarcode';
import getRandomPostfix from '../../support/utils/stringTools';

describe('Title Level Request. Request Detail', () => {
describe('Title Level Request. Request detail', () => {
let instanceHRID;
const unchecked = false;
let requestId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import UsersCard from '../../support/fragments/users/usersCard';
import generateItemBarcode from '../../support/utils/generateItemBarcode';
import getRandomPostfix from '../../support/utils/stringTools';

describe('Title Level Request. Request Detail', () => {
describe('Title Level Request. Request detail', () => {
let userData = {};
let userForTLR = {};
const requestIds = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import Users from '../../support/fragments/users/users';
import generateItemBarcode from '../../support/utils/generateItemBarcode';
import getRandomPostfix from '../../support/utils/stringTools';

describe('Title Level Request. Request Detail', () => {
describe('Title Level Request. Request detail', () => {
let userData = {};
let userForTLR = {};
const requestIds = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Users from '../../support/fragments/users/users';
import generateItemBarcode from '../../support/utils/generateItemBarcode';
import getRandomPostfix from '../../support/utils/stringTools';

describe('Title Level Request. Request Detail', () => {
describe('Title Level Request. Request detail', () => {
let userData = {};
let userForTLR = {};
const requestIds = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export default {

openRequestDetails: (itemBarcode) => {
cy.do([availableActionsButton.click(), requestDetailsButton.click()]);
cy.expect(Pane(including('Request Detail')).exists());
cy.expect(Pane(including('Request details')).exists());
cy.expect(HTML(including(itemBarcode)).exists());
},

Expand Down
2 changes: 2 additions & 0 deletions cypress/support/fragments/inventory/createPageTypeRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export default {
cy.do(Button('Requester look-up').click());
this.checkModalExists(true);
this.filterRequesterLookup(patronGroupName);
cy.wait(1000);
this.selectUser(username);
this.checkModalExists(false);
this.verifyRequesterDetailsPopulated(username, patronGroupName);
Expand All @@ -113,6 +114,7 @@ export default {
newRequest.chooseRequestType(REQUEST_TYPES.PAGE);
Requests.verifyFulfillmentPreference();
newRequest.choosePickupServicePoint(servicePointName);
cy.wait(1000);
newRequest.saveRequestAndClose();
Requests.verifyRequestsPage();
this.verifyNewRequest();
Expand Down
1 change: 1 addition & 0 deletions cypress/support/fragments/lists/lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ export default {
method: 'DELETE',
path: `lists/${id}`,
isDefaultSearchParamsRequired: false,
failOnStatusCode: false,
});
},

Expand Down
2 changes: 1 addition & 1 deletion cypress/support/fragments/requests/newRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default {
},

saveRequestAndClose: () => cy.do(saveAndCloseButton.click()),
waitLoading: () => cy.expect(Pane({ title: 'Request Detail' }).exists()),
waitLoading: () => cy.expect(Pane({ title: 'Request details' }).exists()),

createNewRequest(newRequest) {
openNewRequestPane();
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/fragments/requests/requestDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const availableOptions = {
export default {
waitLoading: (type = 'staff') => {
cy.expect([
Pane({ id: 'instance-details', title: 'Request Detail' }).exists(),
Pane({ id: 'instance-details', title: 'Request details' }).exists(),
requestDetailsSection.find(titleInformationSection).exists(),
requestDetailsSection.find(itemInformationSection).exists(),
requestDetailsSection.find(requestInfoSection).exists(),
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/fragments/requests/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import ServicePoints from '../settings/tenant/servicePoints/servicePoints';
import Helper from '../finance/financeHelper';

const requestsResultsSection = Section({ id: 'pane-results' });
const requestDetailsSection = Pane({ title: 'Request Detail' });
const requestDetailsSection = Pane({ title: 'Request details' });
const appsButton = Button({ id: 'app-list-dropdown-toggle' });
const requestsPane = Pane({ title: 'Requests' });
const requestQueuePane = Pane({ id: 'request-queue' });
Expand Down
1 change: 1 addition & 0 deletions cypress/support/fragments/users/loans/userLoans.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export default {
cy.do(rowInList.find(HTML(including(barcode))).click());
},
openLoanDetails: (itemBarcode) => {
cy.wait(2000);
cy.do(MultiColumnListRow({ text: matching(itemBarcode), isContainer: false }).click());
return LoansPage;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@ export default {
});
},
startDeclareLost() {
cy.wait(500);
cy.do(DeclareLostButton.click());
},
finishDeclareLost(additionalInformation) {
cy.wait(500);
cy.do([
DeclareLostModal.find(TextArea('Additional information*')).fillIn(additionalInformation),
DeclareLostModal.find(Button('Confirm')).click(),
]);

cy.wait(500);
this.checkDeclareLostModalAbsent();
},
checkDeclareLostModalAbsent() {
Expand Down Expand Up @@ -264,11 +266,15 @@ export default {
},
payFeeFine(amount, paymentMethod) {
FeeFinesDetails.openActions();
cy.wait(500);
FeeFinesDetails.openPayModal();
cy.wait(500);
PayFeeFaine.checkAmount(amount);
cy.wait(500);
PayFeeFaine.setPaymentMethod(paymentMethod);
PayFeeFaine.setAmount(amount);
PayFeeFaine.checkRestOfPay(amount);
cy.wait(500);
PayFeeFaine.submitAndConfirm();
},
};

0 comments on commit f0c09bd

Please sign in to comment.