Skip to content

Commit e0d5349

Browse files
committed
updates for sunflower tests
1 parent ea996f5 commit e0d5349

File tree

4 files changed

+4
-26
lines changed

4 files changed

+4
-26
lines changed

cypress/e2e/inventory/version-history/version-history-crud-updates-repeatable-fields-quickmarc.cy.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,7 @@ describe('Inventory', () => {
308308
cy.wait(500);
309309
});
310310
cy.wait(3000);
311-
QuickMarcEditor.pressSaveAndClose();
312-
QuickMarcEditor.constinueWithSaveAndCheckInstanceRecord();
311+
QuickMarcEditor.pressSaveAndClose({ acceptDeleteModal: true });
313312

314313
InventoryInstance.viewSource();
315314
InventoryViewSource.verifyVersionHistoryButtonShown();

cypress/e2e/marc/marc-authority/version-history/version-history-authority-crud-updates-quickmarc.cy.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,7 @@ describe('MARC', () => {
310310
);
311311
QuickMarcEditor.deleteFieldByTagAndCheck(testData.combinedUpdate.deletedField.tag);
312312
cy.wait(3000);
313-
QuickMarcEditor.pressSaveAndClose();
314-
QuickMarcEditor.confirmDeletingFields();
313+
QuickMarcEditor.pressSaveAndClose({ acceptDeleteModal: true });
315314
QuickMarcEditor.checkAfterSaveAndCloseAuthority();
316315
MarcAuthority.contains(testData.authorityHeadingFinal);
317316

cypress/e2e/marc/marc-bibliographic/create-new-marc-bib/create-marc-bib-standard-local-indicators-not-repeatable-subfields.cy.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ describe('MARC', () => {
5454
let createdInstanceId;
5555
let bibSpecId;
5656
let localField981Id;
57-
let field245Indicator1Id;
5857
let field245SubfieldLId;
5958

6059
before('Create test user and setup validation rules', () => {
@@ -89,15 +88,7 @@ describe('MARC', () => {
8988
deprecated: false,
9089
};
9190

92-
cy.createSpecificationIndicatorCode(
93-
indicator1.id,
94-
indicatorCodePayload,
95-
false,
96-
).then((codeResp) => {
97-
if (codeResp.status === 201) {
98-
field245Indicator1Id = codeResp.body.id;
99-
}
100-
});
91+
cy.createSpecificationIndicatorCode(indicator1.id, indicatorCodePayload, false);
10192
});
10293

10394
// Setup not repeatable subfield 'l' for field 245
@@ -212,11 +203,6 @@ describe('MARC', () => {
212203
if (createdInstanceId) {
213204
InventoryInstance.deleteInstanceViaApi(createdInstanceId);
214205
}
215-
216-
// Cleanup validation rules
217-
if (field245Indicator1Id) {
218-
cy.deleteSpecificationFieldIndicatorCode(field245Indicator1Id, false);
219-
}
220206
if (field245SubfieldLId) {
221207
cy.deleteSpecificationFieldSubfield(field245SubfieldLId, false);
222208
}

cypress/support/api/specifications-helper.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,10 @@ export function createFieldWithIndicatorsAndCodes(specId, fieldData, indicatorsD
170170
}
171171

172172
// Cleanup utilities
173-
export function cleanupField(fieldId, indicatorIds = [], codeIds = []) {
173+
export function cleanupField(fieldId, indicatorIds = []) {
174174
// Clean up in reverse order: codes -> indicators -> field
175175
const cleanupPromises = [];
176176

177-
if (codeIds.length > 0) {
178-
codeIds.forEach((codeId) => {
179-
cleanupPromises.push(cy.deleteSpecificationFieldIndicatorCode(codeId, false));
180-
});
181-
}
182-
183177
if (indicatorIds.length > 0) {
184178
indicatorIds.forEach((indicatorId) => {
185179
cleanupPromises.push(cy.deleteSpecificationFieldIndicator(indicatorId, false));

0 commit comments

Comments
 (0)