Skip to content

Commit

Permalink
FAT-10278-C402760 (#3104)
Browse files Browse the repository at this point in the history
* added test

* fixed

* changed tags

* changed its

* fixed after block

* fixed test
  • Loading branch information
TetianaParanich committed Jan 23, 2024
1 parent c947a11 commit 5e927ca
Show file tree
Hide file tree
Showing 28 changed files with 128 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('Consortia', () => {
});

it(
'C387512: Affiliation in central tenant is automatically added after creating user in the member tenant (consortia)(thunderjet)',
'C387512 Affiliation in central tenant is automatically added after creating user in the member tenant (consortia) (thunderjet)',
{ tags: ['smokeECS', 'thunderjet'] },
() => {
Users.createViaUi(testUser).then((id) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Consortia', () => {
});

it(
'C387506: User created in Member tenant is logging right into Member tenant (consortia) (thunderjet)',
'C387506 User created in Member tenant is logging right into Member tenant (consortia) (thunderjet)',
{ tags: ['smokeECS', 'thunderjet'] },
() => {
ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.college);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ describe('Consortia', () => {
});

it(
'C397335 User with "Consortium manager: Can share settings to all members" permission and active affiliations in "Central" and "Member" tenants has access to "Consortium manager" app (thunderjet) (consortia)',
{ tags: ['criticalPath', 'thunderjet'] },
'C397335 User with "Consortium manager: Can share settings to all members" permission and active affiliations in "Central" and "Member" tenants has access to "Consortium manager" app (consortia) (thunderjet)',
{ tags: ['criticalPathECS', 'thunderjet'] },
() => {
TopMenuNavigation.navigateToApp('Consortium manager');
ConsortiumManager.verifyStatusOfConsortiumManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ describe('Consortia', () => {
});

it(
'C397333 User with "Consortium manager: Can view existing settings" permission and active affiliation in "Central" tenant has access to "Consortium manager" app (thunderjet) (consortia)',
{ tags: ['criticalPath', 'thunderjet'] },
'C397333 User with "Consortium manager: Can view existing settings" permission and active affiliation in "Central" tenant has access to "Consortium manager" app (consortia) (thunderjet)',
{ tags: ['criticalPathECS', 'thunderjet'] },
() => {
TopMenuNavigation.navigateToApp('Consortium manager');
ConsortiumManager.verifyStatusOfConsortiumManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('Consortia', () => {
});

it(
'C386869: "Consortium manager" option is displayed in "Settings" only for Central Tenant (consortia) (thunderjet)',
'C386869 "Consortium manager" option is displayed in "Settings" only for Central Tenant (consortia) (thunderjet)',
{ tags: ['criticalPathECS', 'thunderjet'] },
() => {
ConsortiumManager.varifyConsortiumManagerOnPage();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import uuid from 'uuid';
import permissions from '../../../../support/dictionary/permissions';
import Users from '../../../../support/fragments/users/users';
import TopMenu from '../../../../support/fragments/topMenu';
import { getTestEntityValue } from '../../../../support/utils/stringTools';
import Affiliations, { tenantNames } from '../../../../support/dictionary/affiliations';
import Departments from '../../../../support/fragments/settings/users/departments';
import permissions from '../../../../../support/dictionary/permissions';
import Users from '../../../../../support/fragments/users/users';
import TopMenu from '../../../../../support/fragments/topMenu';
import { getTestEntityValue } from '../../../../../support/utils/stringTools';
import Affiliations, { tenantNames } from '../../../../../support/dictionary/affiliations';
import Departments from '../../../../../support/fragments/settings/users/departments';
import ConsortiumManagerApp, {
settingsItems,
usersItems,
} from '../../../../support/fragments/consortium-manager/consortiumManagerApp';
import DepartmentsConsortiumManager from '../../../../support/fragments/consortium-manager/departmentsConsortiumManager';
import ConsortiumManager from '../../../../support/fragments/settings/consortium-manager/consortium-manager';
import SelectMembers from '../../../../support/fragments/consortium-manager/modal/select-members';
} from '../../../../../support/fragments/consortium-manager/consortiumManagerApp';
import DepartmentsConsortiumManager from '../../../../../support/fragments/consortium-manager/departmentsConsortiumManager';
import ConsortiumManager from '../../../../../support/fragments/settings/consortium-manager/consortium-manager';
import SelectMembers from '../../../../../support/fragments/consortium-manager/modal/select-members';

const testData = {
centralSharedDepartment: {
Expand Down Expand Up @@ -190,7 +190,7 @@ describe('Consortium manager', () => {

it(
'C404390 User with "Consortium manager: Can view existing settings" permission is able to view the list of departments of affiliated tenants in "Consortium manager" app (consortia) (thunderjet)',
{ tags: ['criticalPath', 'thunderjet'] },
{ tags: ['criticalPathECS', 'thunderjet'] },
() => {
cy.resetTenant();
cy.login(testData.user390.username, testData.user390.password, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('Consortia', () => {
});

it(
'C380515: Edit address (tenant) name in "Consortium manager" settings (consortia)(thunderjet)',
'C380515 Edit address (tenant) name in "Consortium manager" settings (consortia) (thunderjet)',
{ tags: ['smokeECS', 'thunderjet'] },
() => {
ConsortiumManager.selectMembership();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('Inventory', () => {
});

it(
'C411384 (CONSORTIA) Check Holdings "Actions" menu on Central tenant for a member librarys holdings record',
'C411384 (CONSORTIA) Check Holdings "Actions" menu on Central tenant for a member librarys holdings record (consortia) (folijet)',
{ tags: ['criticalPathECS', 'folijet'] },
() => {
InventoryInstances.searchByTitle(testData.instance.instanceTitle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('Inventory', () => {
});

it(
'C407749 (CONSORTIA) Verify the permission for editing local instances on Member tenant (folijet)',
'C407749 (CONSORTIA) Verify the permission for editing local instances on Member tenant (consortia) (folijet)',
{ tags: ['smokeECS', 'folijet'] },
() => {
InventorySearchAndFilter.searchInstanceByTitle(testData.instance.instanceTitle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('Inventory', () => {
});

it(
'C407751 (CONSORTIA) Verify the permission for editing shared instance on Member tenant (folijet)',
'C407751 (CONSORTIA) Verify the permission for editing shared instance on Member tenant (consortia) (folijet)',
{ tags: ['smokeECS', 'folijet'] },
() => {
InventorySearchAndFilter.searchInstanceByTitle(testData.instance.instanceTitle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('Inventory', () => {
});

it(
'C411343 (CONSORTIA) Check the "Share local instance" button on a Source = FOLIO Instance on Central tenant',
'C411343 (CONSORTIA) Check the "Share local instance" button on a Source = FOLIO Instance on Central tenant (consortia) (folijet)',
{ tags: ['extendedPathECS', 'folijet'] },
() => {
cy.login(testData.user1.username, testData.user1.password, {
Expand All @@ -93,7 +93,7 @@ describe('Inventory', () => {
);

it(
'C411329 (CONSORTIA) Check the "Share local instance" button on a shared Source = FOLIO Instance on Member tenant',
'C411329 (CONSORTIA) Check the "Share local instance" button on a shared Source = FOLIO Instance on Member tenant (consortia) (folijet)',
{ tags: ['extendedPathECS', 'folijet'] },
() => {
cy.login(testData.user2.username, testData.user2.password, {
Expand All @@ -112,7 +112,7 @@ describe('Inventory', () => {
);

it(
'C411345 (CONSORTIA) Check the "Share local instance" button without permission on a Source = FOLIO Instance on Central tenant',
'C411345 (CONSORTIA) Check the "Share local instance" button without permission on a Source = FOLIO Instance on Central tenant (consortia) (folijet)',
{ tags: ['extendedPathECS', 'folijet'] },
() => {
cy.login(testData.user3.username, testData.user3.password, {
Expand All @@ -128,7 +128,7 @@ describe('Inventory', () => {
);

it(
'C411334 (CONSORTIA) Check the "Share local instance" button without permission on a local Source = FOLIO Instance on Member tenant',
'C411334 (CONSORTIA) Check the "Share local instance" button without permission on a local Source = FOLIO Instance on Member tenant (consortia) (folijet)',
{ tags: ['extendedPathECS', 'folijet'] },
() => {
cy.login(testData.user4.username, testData.user4.password, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('Inventory', () => {
});

it(
'C411344 (CONSORTIA) Check the "Share local instance" button on a source = MARC Instance on Central tenant',
'C411344 (CONSORTIA) Check the "Share local instance" button on a source = MARC Instance on Central tenant (consortia) (folijet)',
{ tags: ['extendedPathECS', 'folijet'] },
() => {
cy.login(testData.user1.username, testData.user1.password, {
Expand All @@ -116,7 +116,7 @@ describe('Inventory', () => {
);

it(
'C411333 (CONSORTIA) Check the "Share local instance" button on a shared Source = MARC Instance on Member tenant',
'C411333 (CONSORTIA) Check the "Share local instance" button on a shared Source = MARC Instance on Member tenant (consortia) (folijet)',
{ tags: ['extendedPathECS', 'folijet'] },
() => {
cy.login(testData.user2.username, testData.user2.password, {
Expand All @@ -135,7 +135,7 @@ describe('Inventory', () => {
);

it(
'C411382 (CONSORTIA) Check the "Share local instance" button without permission on a shared Source = MARC Instance on Central tenant',
'C411382 (CONSORTIA) Check the "Share local instance" button without permission on a shared Source = MARC Instance on Central tenant (consortia) (folijet)',
{ tags: ['extendedPathECS', 'folijet'] },
() => {
cy.login(testData.user3.username, testData.user3.password, {
Expand All @@ -151,7 +151,7 @@ describe('Inventory', () => {
);

it(
'C411342 (CONSORTIA) Check the "Share local instance" button without permission on a local Source = MARC Instance on Member tenant',
'C411342 (CONSORTIA) Check the "Share local instance" button without permission on a local Source = MARC Instance on Member tenant (consortia) (folijet)',
{ tags: ['extendedPathECS', 'folijet'] },
() => {
cy.login(testData.user4.username, testData.user4.password, {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import Permissions from '../../../../support/dictionary/permissions';
import getRandomPostfix from '../../../../support/utils/stringTools';
import Users from '../../../../support/fragments/users/users';
import TopMenu from '../../../../support/fragments/topMenu';
import InventoryInstances from '../../../../support/fragments/inventory/inventoryInstances';
import InventoryInstance from '../../../../support/fragments/inventory/inventoryInstance';
import InventorySearchAndFilter from '../../../../support/fragments/inventory/inventorySearchAndFilter';
import InstanceRecordView from '../../../../support/fragments/inventory/instanceRecordView';
import Affiliations, { tenantNames } from '../../../../support/dictionary/affiliations';
import ConsortiumManager from '../../../../support/fragments/settings/consortium-manager/consortium-manager';
import DataImport from '../../../../support/fragments/data_import/dataImport';
import Logs from '../../../../support/fragments/data_import/logs/logs';
import { JOB_STATUS_NAMES } from '../../../../support/constants';

describe('Inventory', () => {
describe('Instance', () => {
let user;
const C402760testData = {
filePath: 'oneMarcBib.mrc',
marcFileName: `C402760 autotestFileName ${getRandomPostfix()}`,
instanceIds: [],
instanceSource: 'MARC',
};

before('Create test data', () => {
cy.getAdminToken();
cy.createTempUser([Permissions.uiInventoryViewCreateEditInstances.gui])
.then((userProperties) => {
user = userProperties;
})
.then(() => {
cy.assignAffiliationToUser(Affiliations.College, user.userId);
cy.setTenant(Affiliations.College);
cy.assignPermissionsToExistingUser(user.userId, [
Permissions.uiInventoryViewCreateEditInstances.gui,
]);
cy.loginAsAdmin({
path: TopMenu.dataImportPath,
waiter: DataImport.waitLoading,
});
ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.central);
ConsortiumManager.switchActiveAffiliation(tenantNames.central, tenantNames.college);
DataImport.uploadFileViaApi(C402760testData.filePath, C402760testData.marcFileName);
Logs.checkStatusOfJobProfile(JOB_STATUS_NAMES.COMPLETED);
Logs.openFileDetails(C402760testData.marcFileName);
Logs.getCreatedItemsID().then((link) => {
C402760testData.instanceIds.push(link.split('/')[5]);
});
cy.resetTenant();
});
});

beforeEach('Login', () => {
cy.login(user.username, user.password, {
path: TopMenu.inventoryPath,
waiter: InventoryInstances.waitContentLoading,
});
ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.central);
ConsortiumManager.switchActiveAffiliation(tenantNames.central, tenantNames.college);
});

after('Delete test data', () => {
cy.resetTenant();
cy.getAdminToken();
Users.deleteViaApi(user.userId);
cy.setTenant(Affiliations.College);
InventoryInstance.deleteInstanceViaApi(C402760testData.instanceIds[0]);
});

it(
'C402760 (CONSORTIA) Verify the Source of a MARC, Local Instance on Member tenant (consortia) (folijet)',
{ tags: ['criticalPathECS', 'folijet'] },
() => {
InventorySearchAndFilter.verifySearchAndFilterPane();
InventorySearchAndFilter.bySource(C402760testData.instanceSource);
InventorySearchAndFilter.byShared('No');
InventorySearchAndFilter.searchInstanceByTitle(C402760testData.instanceIds[0]);
InventorySearchAndFilter.verifyInstanceDetailsView();
InstanceRecordView.verifyInstanceSource(C402760testData.instanceSource);
InstanceRecordView.verifyEditInstanceButtonIsEnabled();
},
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ describe('Inventory', () => {
});

it(
'C411665: Shared instance can be created for linked instance record when order line is connected to "Shared instance" (Member tenant) (consortia) (thunderjet)',
'C411665 Shared instance can be created for linked instance record when order line is connected to "Shared instance" (Member tenant) (consortia) (thunderjet)',
{ tags: ['criticalPathECS', 'thunderjet'] },
() => {
Orders.searchByParameter('PO number', testData.order.poNumber);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe('MARC', () => {
});

it(
'C405142 "MARC authority" record edited on Central tenant is updated in Member tenant (consortia)(spitfire)',
'C405142 "MARC authority" record edited on Central tenant is updated in Member tenant (consortia) (spitfire)',
{ tags: ['extendedPath', 'spitfire'] },
() => {
MarcAuthorities.searchBeats(testData.title);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe('MARC', () => {

it(
'C402770 Derive new Local MARC bib record from Local Instance in Member tenant (consortia) (spitfire)',
{ tags: ['criticalPath', 'spitfire'] },
{ tags: ['criticalPathECS', 'spitfire'] },
() => {
cy.visit(`${TopMenu.inventoryPath}/view/${createdInstanceIDs[0]}`);
InventoryInstance.waitLoading();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe('MARC', () => {

it(
'C402769 Derive new Local MARC bib record from Shared Instance in Member tenant (consortia) (spitfire)',
{ tags: ['criticalPath', 'spitfire'] },
{ tags: ['criticalPathECS', 'spitfire'] },
() => {
cy.visit(`${TopMenu.inventoryPath}/view/${createdInstanceIDs[0]}`);
InventoryInstance.waitLoading();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe('MARC', () => {

it(
'C405560 Link Local MARC bib with Local MARC Authority in Member tenant (consortia) (spitfire)',
{ tags: ['criticalPath', 'spitfire'] },
{ tags: ['criticalPathECS', 'spitfire'] },
() => {
InventorySearchAndFilter.searchByParameter(
testData.instanceSearchOption,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ describe('MARC', () => {

it(
'C405559 Link Local MARC bib with Shared MARC Authority in Member tenant (consortia) (spitfire)',
{ tags: ['criticalPath', 'spitfire'] },
{ tags: ['criticalPathECS', 'spitfire'] },
() => {
InventoryInstances.searchByTitle(createdRecordIDs[2]);
InventoryInstances.selectInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ describe('MARC', () => {

it(
'C410814 Link Shared MARC bib (shadow MARC Instance in Member tenant) with Shared MARC auth on Central tenant (consortia) (spitfire)',
{ tags: ['criticalPath', 'spitfire'] },
{ tags: ['criticalPathECS', 'spitfire'] },
() => {
InventoryInstances.searchByTitle(createdRecordIDs[0]);
InventoryInstances.selectInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ describe('MARC', () => {

it(
'C410819 Link Shared MARC bib (shadow MARC Instance) with Shared MARC authority from Member tenant (consortia) (spitfire)',
{ tags: ['criticalPath', 'spitfire'] },
{ tags: ['criticalPathECS', 'spitfire'] },
() => {
InventoryInstances.searchByTitle(createdRecordIDs[0]);
InventoryInstances.selectInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('MARC', () => {
});

it(
'C405520 User can edit shared "MARC Bib" in Central tenant (consortia)(spitfire)',
'C405520 User can edit shared "MARC Bib" in Central tenant (consortia) (spitfire)',
{ tags: ['criticalPathECS', 'spitfire'] },
() => {
InventoryInstances.searchByTitle(createdInstanceID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('MARC', () => {
});

it(
'C397392 Link Shared MARC bib with Shared MARC auth on Central tenant (consortia)(spitfire)',
'C397392 Link Shared MARC bib with Shared MARC auth on Central tenant (consortia) (spitfire)',
{ tags: ['criticalPathECS', 'spitfire'] },
() => {
InventoryInstances.searchByTitle(createdRecordIDs[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ describe('MARC', () => {
});

it(
'C397343 Link Shared MARC bib with Shared MARC authority from Member tenant (consortia)(spitfire)',
'C397343 Link Shared MARC bib with Shared MARC authority from Member tenant (consortia) (spitfire)',
{ tags: ['criticalPathECS', 'spitfire'] },
() => {
InventoryInstances.searchByTitle(createdRecordIDs[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('Consortia', () => {
});

it(
'C388499: "Switch active affiliation" option is NOT displayed when a user has only one assigned affiliation (consortia)(thunderjet)',
'C388499 "Switch active affiliation" option is NOT displayed when a user has only one assigned affiliation (consortia) (thunderjet)',
{ tags: ['criticalPathECS', 'thunderjet'] },
() => {
cy.createTempUser([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Users', () => {
});

it(
'C418647 Creating new patron user with empty "Username" field (thunderjet) (consortia)',
'C418647 Creating new patron user with empty "Username" field (consortia) (thunderjet)',
{ tags: ['criticalPathECS', 'thunderjet'] },
() => {
Users.createViaUiIncomplete(testUser).then((id) => {
Expand Down
Loading

0 comments on commit 5e927ca

Please sign in to comment.