-
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.
Merge branch 'master' of https://github.com/folio-org/stripes-testing …
…into FAT-13498
- Loading branch information
Showing
18 changed files
with
507 additions
and
118 deletions.
There are no files selected for viewing
78 changes: 78 additions & 0 deletions
78
...s/e2e/consortia/inventory/instance/view-source-button-on-member-local-instance-page.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,78 @@ | ||
import { DEFAULT_JOB_PROFILE_NAMES, INSTANCE_SOURCE_NAMES } from '../../../../support/constants'; | ||
import Affiliations, { tenantNames } from '../../../../support/dictionary/affiliations'; | ||
import Permissions from '../../../../support/dictionary/permissions'; | ||
import DataImport from '../../../../support/fragments/data_import/dataImport'; | ||
import InstanceRecordView from '../../../../support/fragments/inventory/instanceRecordView'; | ||
import InventoryInstance from '../../../../support/fragments/inventory/inventoryInstance'; | ||
import InventoryInstances from '../../../../support/fragments/inventory/inventoryInstances'; | ||
import ConsortiumManager from '../../../../support/fragments/settings/consortium-manager/consortium-manager'; | ||
import TopMenu from '../../../../support/fragments/topMenu'; | ||
import Users from '../../../../support/fragments/users/users'; | ||
import getRandomPostfix from '../../../../support/utils/stringTools'; | ||
import InventoryViewSource from '../../../../support/fragments/inventory/inventoryViewSource'; | ||
|
||
describe('Inventory', () => { | ||
describe('Instance', () => { | ||
const testData = { | ||
filePath: 'oneMarcBib.mrc', | ||
marcFileName: `C409518 autotestFileName ${getRandomPostfix()}`, | ||
instanceSource: INSTANCE_SOURCE_NAMES.MARC, | ||
}; | ||
|
||
before('Create test data', () => { | ||
cy.getAdminToken(); | ||
cy.setTenant(Affiliations.College); | ||
DataImport.uploadFileViaApi( | ||
testData.filePath, | ||
testData.marcFileName, | ||
DEFAULT_JOB_PROFILE_NAMES.CREATE_INSTANCE_AND_SRS, | ||
).then((response) => { | ||
testData.instanceId = response[0].instance.id; | ||
}); | ||
|
||
cy.createTempUser([ | ||
Permissions.inventoryAll.gui, | ||
Permissions.uiQuickMarcQuickMarcBibliographicEditorView.gui, | ||
]).then((userProperties) => { | ||
testData.user = userProperties; | ||
|
||
cy.assignAffiliationToUser(Affiliations.College, testData.user.userId); | ||
cy.setTenant(Affiliations.College); | ||
cy.assignPermissionsToExistingUser(testData.user.userId, [ | ||
Permissions.inventoryAll.gui, | ||
Permissions.uiQuickMarcQuickMarcBibliographicEditorView.gui, | ||
]); | ||
|
||
cy.login(testData.user.username, testData.user.password, { | ||
path: TopMenu.inventoryPath, | ||
waiter: InventoryInstances.waitContentLoading, | ||
}); | ||
ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.central); | ||
ConsortiumManager.switchActiveAffiliation(tenantNames.central, tenantNames.college); | ||
ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.college); | ||
}); | ||
}); | ||
|
||
after('Delete test data', () => { | ||
cy.resetTenant(); | ||
cy.getAdminToken(); | ||
Users.deleteViaApi(testData.user.userId); | ||
cy.setTenant(Affiliations.College); | ||
InventoryInstance.deleteInstanceViaApi(testData.instanceId); | ||
}); | ||
|
||
it( | ||
'C409518 (CONSORTIA) Verify the "View source" button on Member tenant local Instance page (folijet)', | ||
{ tags: ['extendedPathECS', 'folijet'] }, | ||
() => { | ||
InventoryInstances.searchByTitle(testData.instanceId); | ||
InventoryInstances.selectInstance(); | ||
InventoryInstance.waitLoading(); | ||
InstanceRecordView.verifyInstanceSource(testData.instanceSource); | ||
InstanceRecordView.viewSource(); | ||
InstanceRecordView.verifySrsMarcRecord(); | ||
InventoryViewSource.contains('MARC bibliographic record'); | ||
}, | ||
); | ||
}); | ||
}); |
76 changes: 76 additions & 0 deletions
76
.../e2e/consortia/inventory/instance/view-source-button-on-member-shared-instance-page.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,76 @@ | ||
import { DEFAULT_JOB_PROFILE_NAMES, INSTANCE_SOURCE_NAMES } from '../../../../support/constants'; | ||
import Affiliations, { tenantNames } from '../../../../support/dictionary/affiliations'; | ||
import Permissions from '../../../../support/dictionary/permissions'; | ||
import DataImport from '../../../../support/fragments/data_import/dataImport'; | ||
import InstanceRecordView from '../../../../support/fragments/inventory/instanceRecordView'; | ||
import InventoryInstance from '../../../../support/fragments/inventory/inventoryInstance'; | ||
import InventoryInstances from '../../../../support/fragments/inventory/inventoryInstances'; | ||
import ConsortiumManager from '../../../../support/fragments/settings/consortium-manager/consortium-manager'; | ||
import TopMenu from '../../../../support/fragments/topMenu'; | ||
import Users from '../../../../support/fragments/users/users'; | ||
import getRandomPostfix from '../../../../support/utils/stringTools'; | ||
import InventoryViewSource from '../../../../support/fragments/inventory/inventoryViewSource'; | ||
|
||
describe('Inventory', () => { | ||
describe('Instance', () => { | ||
const testData = { | ||
filePath: 'oneMarcBib.mrc', | ||
marcFileName: `C409517 autotestFileName ${getRandomPostfix()}`, | ||
instanceSource: INSTANCE_SOURCE_NAMES.MARC, | ||
}; | ||
|
||
before('Create test data', () => { | ||
cy.getAdminToken(); | ||
DataImport.uploadFileViaApi( | ||
testData.filePath, | ||
testData.marcFileName, | ||
DEFAULT_JOB_PROFILE_NAMES.CREATE_INSTANCE_AND_SRS, | ||
).then((response) => { | ||
testData.instanceId = response[0].instance.id; | ||
}); | ||
|
||
cy.createTempUser([ | ||
Permissions.inventoryAll.gui, | ||
Permissions.uiQuickMarcQuickMarcBibliographicEditorView.gui, | ||
]).then((userProperties) => { | ||
testData.user = userProperties; | ||
|
||
cy.assignAffiliationToUser(Affiliations.College, testData.user.userId); | ||
cy.setTenant(Affiliations.College); | ||
cy.assignPermissionsToExistingUser(testData.user.userId, [ | ||
Permissions.inventoryAll.gui, | ||
Permissions.uiQuickMarcQuickMarcBibliographicEditorView.gui, | ||
]); | ||
|
||
cy.login(testData.user.username, testData.user.password, { | ||
path: TopMenu.inventoryPath, | ||
waiter: InventoryInstances.waitContentLoading, | ||
}); | ||
ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.central); | ||
ConsortiumManager.switchActiveAffiliation(tenantNames.central, tenantNames.college); | ||
ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.college); | ||
}); | ||
}); | ||
|
||
after('Delete test data', () => { | ||
cy.resetTenant(); | ||
cy.getAdminToken(); | ||
Users.deleteViaApi(testData.user.userId); | ||
InventoryInstance.deleteInstanceViaApi(testData.instanceId); | ||
}); | ||
|
||
it( | ||
'C409517 (CONSORTIA) Verify the "View source" button on Member tenant shared Instance page (folijet)', | ||
{ tags: ['extendedPathECS', 'folijet'] }, | ||
() => { | ||
InventoryInstances.searchByTitle(testData.instanceId); | ||
InventoryInstances.selectInstance(); | ||
InventoryInstance.waitLoading(); | ||
InstanceRecordView.verifyInstanceSource(testData.instanceSource); | ||
InstanceRecordView.viewSource(); | ||
InstanceRecordView.verifySrsMarcRecord(); | ||
InventoryViewSource.contains('Shared MARC bibliographic record'); | ||
}, | ||
); | ||
}); | ||
}); |
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
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
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
Oops, something went wrong.