Skip to content

Commit 22b76cb

Browse files
authored
Updated C1292064 C1322593 (#7185)
1 parent 39ff3fc commit 22b76cb

2 files changed

Lines changed: 27 additions & 32 deletions

File tree

cypress/e2e/lists/query-builder/authority/generate-authority-list-export-verify-columns.cy.js

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,13 @@ const COLUMNS = {
3838
UPDATED_BY_USER_EMAIL: 'Updated by user — Email',
3939
UPDATED_BY_USER_LAST_NAME_FIRST_NAME: 'Updated by user — Last name, first name',
4040
UPDATED_BY_USER_USERNAME: 'Updated by user — Username',
41-
MARC_AUTHORITY_CREATED_DATE: 'MARC Authority — Created date',
4241
MARC_AUTHORITY_EXTERNAL_HRID: 'MARC Authority — External HRID',
4342
MARC_AUTHORITY_GENERATION: 'MARC Authority — Generation',
4443
MARC_AUTHORITY_LEADER_RECORD_STATUS: 'MARC Authority — Leader record status',
4544
MARC_AUTHORITY_MARC_JSONB: 'MARC Authority — MARC jsonb',
4645
MARC_AUTHORITY_MATCHED_UUID: 'MARC Authority — Matched UUID',
4746
MARC_AUTHORITY_ORDER: 'MARC Authority — Order',
4847
MARC_AUTHORITY_STATE: 'MARC Authority — State',
49-
MARC_AUTHORITY_UPDATED_DATE: 'MARC Authority — Updated date',
5048
};
5149

5250
describe('Lists', () => {
@@ -82,8 +80,6 @@ describe('Lists', () => {
8280
[COLUMNS.UPDATED_BY_USER_USERNAME]: null,
8381
[COLUMNS.AUTHORITY_CREATED_DATE]: null,
8482
[COLUMNS.AUTHORITY_UPDATED_DATE]: null,
85-
[COLUMNS.MARC_AUTHORITY_CREATED_DATE]: null,
86-
[COLUMNS.MARC_AUTHORITY_UPDATED_DATE]: null,
8783
},
8884
// Columns checked by default per TestRail spec (marked with "(Checked)")
8985
defaultCheckedColumns: [
@@ -185,32 +181,34 @@ describe('Lists', () => {
185181
testData.specificRecordValues[COLUMNS.CREATED_BY_USER_LAST_NAME_FIRST_NAME] = record;
186182
});
187183

188-
DataImport.uploadFileViaApi(
189-
marcFile.marc,
190-
marcFile.fileName,
191-
marcFile.jobProfileToRun,
192-
).then((response) => {
193-
response.forEach((record) => {
194-
createdAuthorityIds.push(record.authority.id);
195-
testData.specificRecordValues[COLUMNS.AUTHORITY_CREATED_DATE] = getDate();
196-
testData.specificRecordValues[COLUMNS.MARC_AUTHORITY_CREATED_DATE] = getDate();
197-
createdDateCsvFormat = getDate({ csvFormat: true });
184+
cy.then(() => {
185+
DataImport.uploadFileViaApi(
186+
marcFile.marc,
187+
marcFile.fileName,
188+
marcFile.jobProfileToRun,
189+
).then((response) => {
190+
response.forEach((record) => {
191+
createdAuthorityIds.push(record.authority.id);
192+
testData.specificRecordValues[COLUMNS.AUTHORITY_CREATED_DATE] = getDate();
193+
createdDateCsvFormat = getDate({ csvFormat: true });
194+
});
198195
});
199-
});
200-
201-
// Create user with required permissions and email
202-
cy.createTempUser(
203-
[
204-
Permissions.listsAll.gui,
205-
Permissions.uiMarcAuthoritiesAuthorityRecordView.gui,
206-
Permissions.uiMarcAuthoritiesAuthorityRecordEdit.gui,
207-
Permissions.uiQuickMarcQuickMarcAuthoritiesEditorAll.gui,
208-
],
209-
undefined,
210-
undefined,
211-
undefined,
212-
testData.userEmail,
213-
)
196+
})
197+
.then(() => {
198+
// Create user with required permissions and email
199+
cy.createTempUser(
200+
[
201+
Permissions.listsAll.gui,
202+
Permissions.uiMarcAuthoritiesAuthorityRecordView.gui,
203+
Permissions.uiMarcAuthoritiesAuthorityRecordEdit.gui,
204+
Permissions.uiQuickMarcQuickMarcAuthoritiesEditorAll.gui,
205+
],
206+
undefined,
207+
undefined,
208+
undefined,
209+
testData.userEmail,
210+
);
211+
})
214212
.then((userProperties) => {
215213
userData = userProperties;
216214
testData.specificRecordValues[COLUMNS.UPDATED_BY_USER_EMAIL] = testData.userEmail;
@@ -233,7 +231,6 @@ describe('Lists', () => {
233231
({ status }) => {
234232
expect(status).to.eq(202);
235233
testData.specificRecordValues[COLUMNS.AUTHORITY_UPDATED_DATE] = getDate();
236-
testData.specificRecordValues[COLUMNS.MARC_AUTHORITY_UPDATED_DATE] = getDate();
237234
updatedDateCsvFormat = getDate({ csvFormat: true });
238235
},
239236
);

cypress/support/constants/constants.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,14 +380,12 @@ export const AUTHORITY_QUERY_FIELDS = {
380380
CREATED_BY_USER_EMAIL: 'Created by user — Email',
381381
CREATED_BY_USER_LAST_NAME_FIRST_NAME: 'Created by user — Last name, first name',
382382
CREATED_BY_USER_USERNAME: 'Created by user — Username',
383-
MARC_AUTHORITY_CREATED_DATE: 'MARC Authority — Created date',
384383
MARC_AUTHORITY_EXTERNAL_HRID: 'MARC Authority — External HRID',
385384
MARC_AUTHORITY_GENERATION: 'MARC Authority — Generation',
386385
MARC_AUTHORITY_LEADER_RECORD_STATUS: 'MARC Authority — Leader record status',
387386
MARC_AUTHORITY_MATCHED_UUID: 'MARC Authority — Matched UUID',
388387
MARC_AUTHORITY_ORDER: 'MARC Authority — Order',
389388
MARC_AUTHORITY_STATE: 'MARC Authority — State',
390-
MARC_AUTHORITY_UPDATED_DATE: 'MARC Authority — Updated date',
391389
SOURCE_FILE_NAME: 'Source file — Name',
392390
UPDATED_BY_USER_EMAIL: 'Updated by user — Email',
393391
UPDATED_BY_USER_LAST_NAME_FIRST_NAME: 'Updated by user — Last name, first name',

0 commit comments

Comments
 (0)