-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added test * fixed test * deleted function * changed permission
- Loading branch information
1 parent
802bdc9
commit 42b1d7c
Showing
4 changed files
with
69 additions
and
6 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
...or-deletion-option-in-actions-menu-with-instance-source-folio-and-marked-checkboxes.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { Permissions } from '../../../support/dictionary'; | ||
import InstanceRecordView from '../../../support/fragments/inventory/instanceRecordView'; | ||
import InventoryInstance from '../../../support/fragments/inventory/inventoryInstance'; | ||
import InventoryInstances from '../../../support/fragments/inventory/inventoryInstances'; | ||
import InventorySearchAndFilter from '../../../support/fragments/inventory/inventorySearchAndFilter'; | ||
import TopMenu from '../../../support/fragments/topMenu'; | ||
import Users from '../../../support/fragments/users/users'; | ||
|
||
describe('Inventory', () => { | ||
describe('Instance', () => { | ||
const testData = {}; | ||
|
||
before('Create test data and login', () => { | ||
cy.getAdminToken(); | ||
InventoryInstance.createInstanceViaApi().then(({ instanceData }) => { | ||
testData.instance = instanceData; | ||
|
||
cy.getInstanceById(testData.instance.instanceId).then((body) => { | ||
body.staffSuppress = true; | ||
body.discoverySuppress = true; | ||
cy.updateInstance(body); | ||
}); | ||
}); | ||
|
||
cy.createTempUser([ | ||
Permissions.uiInventoryViewCreateEditInstances.gui, | ||
Permissions.uiInventorySetRecordsForDeletion.gui, | ||
Permissions.enableStaffSuppressFacet.gui, | ||
]).then((userProperties) => { | ||
testData.user = userProperties; | ||
|
||
cy.login(testData.user.username, testData.user.password, { | ||
path: TopMenu.inventoryPath, | ||
waiter: InventoryInstances.waitContentLoading, | ||
}); | ||
InventorySearchAndFilter.selectYesfilterStaffSuppress(); | ||
InventoryInstances.searchByTitle(testData.instance.instanceTitle); | ||
InventoryInstances.selectInstance(); | ||
}); | ||
}); | ||
|
||
after('Delete test data', () => { | ||
cy.getAdminToken().then(() => { | ||
Users.deleteViaApi(testData.user.userId); | ||
InventoryInstance.deleteInstanceViaApi(testData.instance.instanceId); | ||
}); | ||
}); | ||
|
||
it( | ||
'C436846 Check "Set record for deletion" option in Actions menu with Instance source FOLIO and marked checkboxes (folijet)', | ||
{ tags: ['extendedPath', 'folijet'] }, | ||
() => { | ||
InstanceRecordView.verifyInstancePaneExists(); | ||
InstanceRecordView.verifySetRecordForDeletionOptionAbsent(); | ||
}, | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters