Skip to content

Commit

Permalink
restore cypress configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
eremv committed Jan 21, 2025
1 parent 66e9ff3 commit d312853
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 19 deletions.
3 changes: 2 additions & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const reportportalOptions = {
};

module.exports = defineConfig({
watchForFileChanges: false,
retries: {
runMode: 0,
openMode: 0,
Expand All @@ -39,6 +38,8 @@ module.exports = defineConfig({
OKAPI_TENANT: 'diku',
diku_login: 'diku_admin',
diku_password: 'admin',
z3950_login: 'z3950Admin',
z3950_password: 'password',
is_kiwi_release: false,
downloadTimeout: 2000,
allure: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,9 @@ describe('MARC', () => {
permissions.uiMarcAuthoritiesAuthorityRecordView.gui,
permissions.uiQuickMarcQuickMarcBibliographicEditorAll.gui,
permissions.inventoryAll.gui,
permissions.dataExportUploadExportDownloadFileViewLogs.gui,
]).then((userProperties) => {
testData.userProperties = userProperties;
});
});

after(() => {
cy.getAdminToken();
InventoryInstances.deleteInstanceByTitleViaApi('C369080');
MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C369080');
if (testData?.userProperties?.userId) Users.deleteViaApi(testData.userProperties.userId);
});

it(
'C369080 Export and Import "MARC Bibliographic" record with linked fields (which have $9 with UUID) (spitfire)',
{ tags: ['criticalPath', 'spitfire', 'C369080'] },
() => {
cy.loginAsAdmin({
path: TopMenu.inventoryPath,
waiter: InventoryInstances.waitContentLoading,
Expand All @@ -93,7 +80,30 @@ describe('MARC', () => {
cy.wait(3000);
QuickMarcEditor.pressSaveAndClose();
QuickMarcEditor.checkAfterSaveAndClose();
InventoryInstance.waitLoading();
cy.logout();
});
});

after(() => {
cy.getAdminToken();
InventoryInstances.deleteInstanceByTitleViaApi('C369080');
MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C369080');
if (testData?.userProperties?.userId) Users.deleteViaApi(testData.userProperties.userId);
FileManager.deleteFileFromDownloadsByMask('C369080*');
FileManager.deleteFile(`cypress/fixtures/${exportedInstanceFileName}`);
FileManager.deleteFile(`cypress/fixtures/${updatedInstanceFileName}`);
});

it(
'C369080 Export and Import "MARC Bibliographic" record with linked fields (which have $9 with UUID) (spitfire)',
{ tags: ['criticalPath', 'spitfire', 'C369080'] },
() => {
cy.login(testData.userProperties.username, testData.userProperties.password, {
path: TopMenu.inventoryPath,
waiter: InventoryInstances.waitContentLoading,
});

InventoryInstances.searchByTitle(testData.createdInstanceIDs[0]);
InventoryInstances.selectInstanceCheckboxByIndex(0);
InventoryInstances.exportInstanceMarc();

Expand Down Expand Up @@ -122,13 +132,13 @@ describe('MARC', () => {
DataImport.waitLoading();

DataImport.uploadFilesViaApi(markfileWithout999Field).then(({ createdInstanceIDs }) => {
TopMenuNavigation.openAppFromDropdown(APPLICATION_NAMES.INVENTORY);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY);
InventoryInstances.searchByTitle(createdInstanceIDs[0]);
InventoryInstance.checkAbsenceOfAuthorityIconInInstanceDetailPane('Contributor');

InventoryInstance.editMarcBibliographicRecord();
QuickMarcEditor.checkLinkButtonExist('100');
QuickMarcEditor.checkLinkButtonExist('650');
QuickMarcEditor.checkLinkButtonDontExist('100');
QuickMarcEditor.checkLinkButtonDontExist('650');
});
},
);
Expand Down

0 comments on commit d312853

Please sign in to comment.