Skip to content

Commit 39dc9e3

Browse files
committed
revert test changes
1 parent 0bb039f commit 39dc9e3

File tree

4 files changed

+2
-20
lines changed

4 files changed

+2
-20
lines changed

lib/VersionHistory/VersionHistoryPane/VersionHistoryPane.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const VersionHistoryPane = ({
2727
onClose,
2828
onSelectVersion,
2929
hiddenFields = [],
30-
systemUpdatedFields = [],
3130
labelsMap,
3231
versions,
3332
}) => {
@@ -144,7 +143,6 @@ VersionHistoryPane.propTypes = {
144143
onSelectVersion: PropTypes.func.isRequired,
145144
labelsMap: PropTypes.object.isRequired,
146145
hiddenFields: PropTypes.arrayOf(PropTypes.string),
147-
systemUpdatedFields: PropTypes.arrayOf(PropTypes.string),
148146
versions: PropTypes.arrayOf(PropTypes.object).isRequired,
149147
};
150148

lib/VersionHistory/VersionHistoryPane/VersionHistoryPane.test.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -97,22 +97,6 @@ describe('VersionHistoryPane', () => {
9797
expect(screen.getByText('stripes-acq-components.fundDistribution.value')).toBeInTheDocument();
9898
});
9999

100-
it('should display "System maintenance update" label if there is only system changes', () => {
101-
const clonedAuditEvent = Object.assign(cloneDeep(orderLineAuditEvent), { id: TEST_ID });
102-
103-
set(clonedAuditEvent.orderLineSnapshot, 'searchLocationId[0]', 'locationId');
104-
105-
renderVersionHistoryPane({
106-
versions: [
107-
clonedAuditEvent,
108-
orderLineAuditEvent,
109-
],
110-
systemUpdatedFields: ['searchLocationId'],
111-
});
112-
113-
expect(screen.getByText(/systemChange/)).toBeInTheDocument();
114-
});
115-
116100
it('should not display version cards without changed fields', () => {
117101
const clonedAuditEvent = Object.assign(cloneDeep(orderLineAuditEvent), { id: TEST_ID });
118102

lib/VersionHistory/getFieldLabels.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const getFieldLabels = (intl, paths, labelsMap = {}, hiddenFields = []) =
88

99
return paths.reduce((acc, path) => {
1010
const fieldLabel = labelsMapEntries.find(([fieldPath]) => {
11-
const regex = new RegExp(`^${escapeRegExp(fieldPath).replace('\\\\d', '\\d')}$`);
11+
const regex = new RegExp(`^${escapeRegExp(fieldPath).replaceAll('\\\\d', '\\d')}$`);
1212

1313
return regex.test(path);
1414
})?.[1] || path;

lib/VersionHistory/getVersionMetadata.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('getVersionMetadata', () => {
1818
expect(getVersionMetadata(version, entity)).toEqual({
1919
metadataKey: 'metadataValue',
2020
updatedByUserId: 'userId',
21-
updatedDate: version.eventDate,
21+
updatedDate: version.actionDate,
2222
...entity.metadata,
2323
});
2424
});

0 commit comments

Comments
 (0)