Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fat 16799 #4284

Merged
merged 19 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
fd3dac3
derived test Spitfire team
TetianaParanich Sep 17, 2024
facc318
Merge branch 'master' of https://github.com/folio-org/stripes-testing…
TetianaParanich Sep 18, 2024
c20734a
changed test type
TetianaParanich Sep 19, 2024
0e1a1b2
changed test type
TetianaParanich Sep 19, 2024
8198b20
Merge branch 'master' of https://github.com/folio-org/stripes-testing…
TetianaParanich Sep 19, 2024
e8440a0
Merge branch 'master' of https://github.com/folio-org/stripes-testing…
TetianaParanich Sep 19, 2024
6fc073f
Merge branch 'master' of https://github.com/folio-org/stripes-testing…
TetianaParanich Sep 23, 2024
866644e
fixed C11112
TetianaParanich Sep 23, 2024
8758f91
Merge branch 'master' of https://github.com/folio-org/stripes-testing…
TetianaParanich Sep 26, 2024
a3958df
Merge branch 'master' of https://github.com/folio-org/stripes-testing…
TetianaParanich Sep 26, 2024
61861d5
Merge branch 'master' of https://github.com/folio-org/stripes-testing…
TetianaParanich Sep 26, 2024
b0d7166
changed cy.visit for tests in shiftLeft
TetianaParanich Sep 26, 2024
8898b82
Merge branch 'master' into FAT-16557
ostapwd Sep 26, 2024
204225f
changed cy.visit to navigation
TetianaParanich Sep 30, 2024
735905d
Merge branch 'master' of https://github.com/folio-org/stripes-testing…
TetianaParanich Sep 30, 2024
90a3cd9
fixed Smoke tests
TetianaParanich Sep 30, 2024
c567a1b
Merge branch 'master' of https://github.com/folio-org/stripes-testing…
TetianaParanich Sep 30, 2024
4d12e7f
fixed CriticalPath tests
TetianaParanich Oct 1, 2024
a94ee16
Merge branch 'master' of https://github.com/folio-org/stripes-testing…
TetianaParanich Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
ACCEPTED_DATA_TYPE_NAMES,
ACTION_NAMES_IN_ACTION_PROFILE,
APPLICATION_NAMES,
EXISTING_RECORD_NAMES,
FOLIO_RECORD_TYPE,
INSTANCE_STATUS_TERM_NAMES,
Expand All @@ -26,8 +27,11 @@ import FieldMappingProfileView from '../../../support/fragments/settings/dataImp
import FieldMappingProfiles from '../../../support/fragments/settings/dataImport/fieldMappingProfile/fieldMappingProfiles';
import NewFieldMappingProfile from '../../../support/fragments/settings/dataImport/fieldMappingProfile/newFieldMappingProfile';
import MatchProfiles from '../../../support/fragments/settings/dataImport/matchProfiles/matchProfiles';
import SettingsDataImport, {
SETTINGS_TABS,
} from '../../../support/fragments/settings/dataImport/settingsDataImport';
import SettingsMenu from '../../../support/fragments/settingsMenu';
import TopMenu from '../../../support/fragments/topMenu';
import TopMenuNavigation from '../../../support/fragments/topMenuNavigation';
import Users from '../../../support/fragments/users/users';
import { getLongDelay } from '../../../support/utils/cypressTools';
import FileManager from '../../../support/utils/fileManager';
Expand Down Expand Up @@ -139,15 +143,15 @@ describe('Data Import', () => {
() => {
FieldMappingProfiles.createInstanceMappingProfile(mappingProfile);

cy.visit(SettingsMenu.actionProfilePath);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.ACTION_PROFILES);
ActionProfiles.create(actionProfile, mappingProfile.name);

cy.visit(SettingsMenu.jobProfilePath);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.JOB_PROFILES);
JobProfiles.createJobProfile(jobProfile);
NewJobProfile.linkActionProfile(actionProfile);
NewJobProfile.saveAndClose();

cy.visit(TopMenu.dataImportPath);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.DATA_IMPORT);
DataImport.verifyUploadState();
DataImport.uploadFile(marcFilePath, marcFileName);
JobProfiles.waitFileIsUploaded();
Expand All @@ -172,34 +176,37 @@ describe('Data Import', () => {
const expectedRecordHrid = req.response.body.jobExecutionHrId;

// download exported marc file
cy.visit(TopMenu.dataExportPath);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.DATA_EXPORT);
ExportFile.downloadExportedMarcFileWithRecordHrid(expectedRecordHrid, exportedFileName);
FileManager.deleteFileFromDownloadsByMask('QuickInstanceExport*');
});
cy.visit(SettingsMenu.mappingProfilePath);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.SETTINGS);
SettingsDataImport.goToSettingsDataImport();
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.FIELD_MAPPING_PROFILES);
FieldMappingProfiles.openNewMappingProfileForm();
NewFieldMappingProfile.fillSummaryInMappingProfile(mappingProfileForUpdate);
NewFieldMappingProfile.fillInstanceStatusTerm(mappingProfileForUpdate.instanceStatusTerm);
NewFieldMappingProfile.save();
FieldMappingProfileView.closeViewMode(mappingProfileForUpdate.name);
FieldMappingProfiles.checkMappingProfilePresented(mappingProfileForUpdate.name);

cy.visit(SettingsMenu.actionProfilePath);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.ACTION_PROFILES);
ActionProfiles.create(actionProfileForUpdate, mappingProfileForUpdate.name);
ActionProfiles.checkActionProfilePresented(actionProfileForUpdate.name);

cy.visit(SettingsMenu.matchProfilePath);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.MATCH_PROFILES);
MatchProfiles.createMatchProfile(matchProfile);

cy.visit(SettingsMenu.jobProfilePath);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.JOB_PROFILES);
JobProfiles.createJobProfileWithLinkingProfiles(
jobProfileForUpdate,
actionProfileForUpdate.name,
matchProfile.profileName,
);
JobProfiles.checkJobProfilePresented(jobProfileForUpdate.profileName);

cy.visit(TopMenu.dataImportPath);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.DATA_IMPORT);
FileDetails.close();
DataImport.verifyUploadState();
DataImport.uploadFile(exportedFileName, updatedMarcFileName);
JobProfiles.waitFileIsUploaded();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/* eslint-disable cypress/no-unnecessary-waiting */
import { DEFAULT_JOB_PROFILE_NAMES } from '../../../support/constants';
import { APPLICATION_NAMES, DEFAULT_JOB_PROFILE_NAMES } from '../../../support/constants';
import { Permissions } from '../../../support/dictionary';
import DataImport from '../../../support/fragments/data_import/dataImport';
import Logs from '../../../support/fragments/data_import/logs/logs';
import LogsViewAll from '../../../support/fragments/data_import/logs/logsViewAll';
import InventoryInstance from '../../../support/fragments/inventory/inventoryInstance';
import TopMenu from '../../../support/fragments/topMenu';
import TopMenuNavigation from '../../../support/fragments/topMenuNavigation';
import Users from '../../../support/fragments/users/users';
import InteractorsTools from '../../../support/utils/interactorsTools';
import getRandomPostfix from '../../../support/utils/stringTools';
Expand Down Expand Up @@ -75,7 +76,8 @@ describe('Data Import', () => {
Logs.clickOnHotLink();
cy.location('pathname').should('include', '/inventory/view');

cy.visit(TopMenu.dataImportPath);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.DATA_IMPORT);
TopMenuNavigation.clickToGoHomeButton();
DataImport.getLogsHrIdsFromUI(numberOfLogsToDelete).then((logsHrIdsToBeDeleted) => {
// verify that user can cancel deletion of logs
DataImport.selectAllLogs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
RECORD_STATUSES,
VENDOR_NAMES,
} from '../../../support/constants';
import permissions from '../../../support/dictionary/permissions';
import Permissions from '../../../support/dictionary/permissions';
import ActionProfiles from '../../../support/fragments/data_import/action_profiles/actionProfiles';
import DataImport from '../../../support/fragments/data_import/dataImport';
import JobProfiles from '../../../support/fragments/data_import/job_profiles/jobProfiles';
Expand Down Expand Up @@ -60,11 +60,11 @@ describe('Data Import', () => {

before('Create test user and login', () => {
cy.createTempUser([
permissions.dataImportUploadAll.gui,
permissions.moduleDataImportEnabled.gui,
permissions.settingsDataImportEnabled.gui,
permissions.uiOrganizationsView.gui,
permissions.viewEditDeleteInvoiceInvoiceLine.gui,
Permissions.dataImportUploadAll.gui,
Permissions.moduleDataImportEnabled.gui,
Permissions.settingsDataImportEnabled.gui,
Permissions.uiOrganizationsView.gui,
Permissions.viewEditDeleteInvoiceInvoiceLine.gui,
]).then((userProperties) => {
user = userProperties;

Expand Down Expand Up @@ -99,18 +99,21 @@ describe('Data Import', () => {

// create Action profile and link it to Field mapping profile
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.ACTION_PROFILES);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.ACTION_PROFILES);
ActionProfiles.create(actionProfile, mappingProfile.name);
ActionProfiles.checkActionProfilePresented(actionProfile.name);

// create Job profile
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.JOB_PROFILES);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.JOB_PROFILES);
JobProfiles.createJobProfile(jobProfile);
NewJobProfile.linkActionProfile(actionProfile);
NewJobProfile.saveAndClose();
JobProfiles.checkJobProfilePresented(jobProfile.profileName);

// upload a marc file
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.DATA_IMPORT);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.DATA_IMPORT);
DataImport.verifyUploadState();
DataImport.uploadFile('ediFileForC343338.edi', fileName);
JobProfiles.waitFileIsUploaded();
Expand All @@ -126,7 +129,7 @@ describe('Data Import', () => {
);
FileDetails.checkInvoiceInSummaryTable(quantityOfItems);
FileDetails.getInvoiceNumber(vendorInvoiceNumber).then((invoiceNumber) => {
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVOICES);
Invoices.searchByNumber(invoiceNumber);
Invoices.selectInvoice(invoiceNumber);

Expand Down
18 changes: 12 additions & 6 deletions cypress/e2e/data-import/e2e/edi-import-large-invoice-file.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
FOLIO_RECORD_TYPE,
PAYMENT_METHOD,
VENDOR_NAMES,
APPLICATION_NAMES,
} from '../../../support/constants';
import { Permissions } from '../../../support/dictionary';
import ActionProfiles from '../../../support/fragments/data_import/action_profiles/actionProfiles';
Expand All @@ -19,8 +20,11 @@ import {
} from '../../../support/fragments/settings/dataImport';
import FieldMappingProfiles from '../../../support/fragments/settings/dataImport/fieldMappingProfile/fieldMappingProfiles';
import NewFieldMappingProfile from '../../../support/fragments/settings/dataImport/fieldMappingProfile/newFieldMappingProfile';
import SettingsDataImport, {
SETTINGS_TABS,
} from '../../../support/fragments/settings/dataImport/settingsDataImport';
import SettingsMenu from '../../../support/fragments/settingsMenu';
import TopMenu from '../../../support/fragments/topMenu';
import TopMenuNavigation from '../../../support/fragments/topMenuNavigation';
import Users from '../../../support/fragments/users/users';
import getRandomPostfix from '../../../support/utils/stringTools';

Expand Down Expand Up @@ -57,7 +61,10 @@ describe('Data Import', () => {
]).then((userProperties) => {
user = userProperties;

cy.login(user.username, user.password);
cy.login(user.username, user.password, {
path: SettingsMenu.mappingProfilePath,
waiter: FieldMappingProfiles.waitLoading,
});
});
});

Expand All @@ -76,24 +83,23 @@ describe('Data Import', () => {
{ tags: ['smoke', 'folijet'] },
() => {
// create Field mapping profile
cy.visit(SettingsMenu.mappingProfilePath);
FieldMappingProfiles.createInvoiceMappingProfile(mappingProfile, profileForDuplicate);
FieldMappingProfiles.checkMappingProfilePresented(mappingProfile.name);

// create Action profile and link it to Field mapping profile
cy.visit(SettingsMenu.actionProfilePath);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.ACTION_PROFILES);
ActionProfiles.create(actionProfile, mappingProfile.name);
ActionProfiles.checkActionProfilePresented(actionProfile.name);

// create Job profile
cy.visit(SettingsMenu.jobProfilePath);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.JOB_PROFILES);
JobProfiles.createJobProfile(jobProfile);
NewJobProfile.linkActionProfile(actionProfile);
NewJobProfile.saveAndClose();
JobProfiles.checkJobProfilePresented(jobProfile.profileName);

// upload a marc file for creating of the new instance, holding and item
cy.visit(TopMenu.dataImportPath);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.DATA_IMPORT);
DataImport.verifyUploadState();
DataImport.uploadFile('ediFileForC347615.edi', fileName);
DataImport.waitFileIsUploaded();
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/data-import/e2e/field-protection-overrides.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ describe('Data Import', () => {

// upload a marc file
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.DATA_IMPORT);
FileDetails.close();
DataImport.verifyUploadState();
DataImport.uploadFile(editedFileNameRev1, fileNameForProtect);
JobProfiles.waitFileIsUploaded();
Expand Down Expand Up @@ -400,6 +401,7 @@ describe('Data Import', () => {

// upload a marc file
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.DATA_IMPORT);
FileDetails.close();
DataImport.verifyUploadState();
DataImport.uploadFile(editedFileNameRev2, fileNameForOverride);
JobProfiles.waitFileIsUploaded();
Expand Down
31 changes: 20 additions & 11 deletions cypress/e2e/data-import/e2e/field-protection-settings.cy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
ACCEPTED_DATA_TYPE_NAMES,
ACTION_NAMES_IN_ACTION_PROFILE,
APPLICATION_NAMES,
EXISTING_RECORD_NAMES,
FOLIO_RECORD_TYPE,
INSTANCE_STATUS_TERM_NAMES,
Expand Down Expand Up @@ -28,8 +29,11 @@ import NewFieldMappingProfile from '../../../support/fragments/settings/dataImpo
import MarcFieldProtection from '../../../support/fragments/settings/dataImport/marcFieldProtection';
import MatchProfiles from '../../../support/fragments/settings/dataImport/matchProfiles/matchProfiles';
import NewMatchProfile from '../../../support/fragments/settings/dataImport/matchProfiles/newMatchProfile';
import SettingsDataImport, {
SETTINGS_TABS,
} from '../../../support/fragments/settings/dataImport/settingsDataImport';
import SettingsMenu from '../../../support/fragments/settingsMenu';
import TopMenu from '../../../support/fragments/topMenu';
import TopMenuNavigation from '../../../support/fragments/topMenuNavigation';
import Users from '../../../support/fragments/users/users';
import FileManager from '../../../support/utils/fileManager';
import getRandomPostfix from '../../../support/utils/stringTools';
Expand Down Expand Up @@ -124,7 +128,10 @@ describe('Data Import', () => {
]).then((userProperties) => {
userId = userProperties.userId;

cy.login(userProperties.username, userProperties.password);
cy.login(userProperties.username, userProperties.password, {
path: SettingsMenu.mappingProfilePath,
waiter: FieldMappingProfiles.waitLoading,
});
});
});

Expand Down Expand Up @@ -175,22 +182,21 @@ describe('Data Import', () => {
{ tags: ['criticalPath', 'folijet'] },
() => {
// create mapping profile
cy.visit(SettingsMenu.mappingProfilePath);
createInstanceMappingProfileForCreate(mappingProfile);
FieldMappingProfiles.checkMappingProfilePresented(mappingProfile.name);

// create action profile
cy.visit(SettingsMenu.actionProfilePath);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.ACTION_PROFILES);
ActionProfiles.create(actionProfile, mappingProfile.name);
ActionProfiles.checkActionProfilePresented(actionProfile.name);

// create job profile
cy.visit(SettingsMenu.jobProfilePath);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.JOB_PROFILES);
JobProfiles.createJobProfileWithLinkingProfiles(jobProfile, actionProfile.name);
JobProfiles.checkJobProfilePresented(jobProfile.profileName);

// upload a marc file for creating of the new instance
cy.visit(TopMenu.dataImportPath);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.DATA_IMPORT);
DataImport.verifyUploadState();
DataImport.uploadFile('marcFileForC17017.mrc', nameMarcFileForCreate);
JobProfiles.waitFileIsUploaded();
Expand Down Expand Up @@ -228,21 +234,23 @@ describe('Data Import', () => {
});

// create mapping profile for update
cy.visit(SettingsMenu.mappingProfilePath);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.SETTINGS);
SettingsDataImport.goToSettingsDataImport();
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.FIELD_MAPPING_PROFILES);
createInstanceMappingProfileForUpdate(mappingProfileUpdate);
FieldMappingProfiles.checkMappingProfilePresented(mappingProfileUpdate.name);

// create action profile for update
cy.visit(SettingsMenu.actionProfilePath);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.ACTION_PROFILES);
ActionProfiles.create(actionProfileUpdate, mappingProfileUpdate.name);
ActionProfiles.checkActionProfilePresented(actionProfileUpdate.name);

// create match profile for update
cy.visit(SettingsMenu.matchProfilePath);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.MATCH_PROFILES);
MatchProfiles.createMatchProfile(matchProfile);

// create job profile for update
cy.visit(SettingsMenu.jobProfilePath);
SettingsDataImport.selectSettingsTab(SETTINGS_TABS.JOB_PROFILES);
JobProfiles.createJobProfileWithLinkingProfiles(
jobProfileUpdate,
actionProfileUpdate.name,
Expand All @@ -251,7 +259,8 @@ describe('Data Import', () => {
JobProfiles.checkJobProfilePresented(jobProfileUpdate.profileName);

// upload a marc file for updating already created instance
cy.visit(TopMenu.dataImportPath);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.DATA_IMPORT);
FileDetails.close();
DataImport.verifyUploadState();
DataImport.uploadFile(editedMarcFileName, fileNameForUpdate);
JobProfiles.waitFileIsUploaded();
Expand Down
Loading
Loading