Skip to content

Commit

Permalink
C357032 fix (#2546)
Browse files Browse the repository at this point in the history
  • Loading branch information
zentestuken committed Dec 1, 2023
1 parent ba484e9 commit a2f820a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions cypress/e2e/inventory/search/browse-contributors-back.cy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Permissions from '../../../support/dictionary/permissions';
import InstanceRecordEdit from '../../../support/fragments/inventory/instanceRecordEdit';
import InventoryInstances from '../../../support/fragments/inventory/inventoryInstances';
import InventoryInstance from '../../../support/fragments/inventory/inventoryInstance';
import InventorySearchAndFilter from '../../../support/fragments/inventory/inventorySearchAndFilter';
import BrowseContributors from '../../../support/fragments/inventory/search/browseContributors';
import TopMenu from '../../../support/fragments/topMenu';
Expand Down Expand Up @@ -36,7 +37,17 @@ describe('Inventory -> Contributors Browse', () => {
});

beforeEach(() => {
InventoryInstances.createInstanceViaApi(testData.item.instanceName, testData.item.itemBarcode);
cy.getInstanceTypes({ limit: 2 }).then((instanceTypes) => {
InventoryInstances.createFolioInstanceViaApi({
instance: {
instanceTypeId: instanceTypes[0].id,
title: testData.item.instanceName,
},
}).then((instanceIds) => {
testData.instanceId = instanceIds.instanceId;
});
});

cy.loginAsAdmin({
path: TopMenu.inventoryPath,
waiter: InventorySearchAndFilter.waitLoading,
Expand Down Expand Up @@ -74,7 +85,7 @@ describe('Inventory -> Contributors Browse', () => {

afterEach(() => {
cy.getAdminToken();
InventoryInstances.deleteInstanceAndHoldingRecordAndAllItemsViaApi(testData.item.itemBarcode);
InventoryInstance.deleteInstanceViaApi(testData.instanceId);
});

it(
Expand Down

0 comments on commit a2f820a

Please sign in to comment.