Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #307 from eclipse/development
Browse files Browse the repository at this point in the history
Release 1.4.2
  • Loading branch information
roman-kupriyanov authored Feb 14, 2023
2 parents 9b6f225 + 7f9afc2 commit c4cfe24
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

You can find all notable changes to Explorer for Endevor in this document.

## [1.4.2] – 2023-02-14

### Fixed

- Fixed an issue with the up-the-map view which showed an incomplete list of the elements if the same element name is used for different types.

## [1.4.1] – 2023-01-26

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-for-endevor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Explorer for Endevor",
"description": "Extension that modernizes the way you interact with Endevor inventory locations and elements",
"author": "Broadcom",
"version": "1.4.1",
"version": "1.4.2",
"publisher": "BroadcomMFD",
"homepage": "https://github.com/eclipse/che-che4z-explorer-for-endevor",
"repository": {
Expand Down
52 changes: 42 additions & 10 deletions packages/explorer-for-endevor/src/store/__tests__/store-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2568,27 +2568,49 @@ describe('store getters', () => {
element: elementInPlace,
lastRefreshTimestamp: Date.now(),
};
const upTheMapLocation: SubSystemMapPath = {
const upTheMapFirstLocation: SubSystemMapPath = {
...inPlaceLocation,
stageNumber: '2',
};
const elementUpTheMap: Element = {
const elementUpTheMapOne: Element = {
configuration: 'TEST',
...upTheMapLocation,
...upTheMapFirstLocation,
type: elementInPlace.type,
name: elementInPlace.name,
lastActionCcid: 'LAST-CCID',
};
const cachedUpTheMapElementVersion = {
element: elementUpTheMap,
const elementUpTheMapTwo: Element = {
configuration: 'TEST',
...upTheMapFirstLocation,
type: elementInPlace.type,
name: 'ELM2',
lastActionCcid: 'LAST-CCID',
};
const elementUpTheMapThree: Element = {
configuration: 'TEST',
...upTheMapFirstLocation,
type: 'TYPE2',
name: elementUpTheMapTwo.name,
lastActionCcid: 'LAST-CCID',
};
const cachedUpTheMapElementOneVersion = {
element: elementUpTheMapOne,
lastRefreshTimestamp: Date.now(),
};
const cachedUpTheMapElementTwoVersion = {
element: elementUpTheMapTwo,
lastRefreshTimestamp: Date.now(),
};
const cachedUpTheMapElementThreeVersion = {
element: elementUpTheMapThree,
lastRefreshTimestamp: Date.now(),
};
storeState.caches = {
[toServiceLocationCompositeKey(serviceId)(inventoryLocationId)]: {
endevorMap: {
value: {
[toSubsystemMapPathId(inPlaceLocation)]: [
toSubsystemMapPathId(upTheMapLocation),
toSubsystemMapPathId(upTheMapFirstLocation),
],
},
cacheVersion: EndevorCacheVersion.OUTDATED,
Expand All @@ -2602,12 +2624,18 @@ describe('store getters', () => {
)]: cachedInPlaceElementVersion,
},
},
[toSubsystemMapPathId(upTheMapLocation)]: {
[toSubsystemMapPathId(upTheMapFirstLocation)]: {
cacheVersion: EndevorCacheVersion.OUTDATED,
elements: {
[toElementCompositeKey(serviceId)(inventoryLocationId)(
elementUpTheMap
)]: cachedUpTheMapElementVersion,
elementUpTheMapOne
)]: cachedUpTheMapElementOneVersion,
[toElementCompositeKey(serviceId)(inventoryLocationId)(
elementUpTheMapTwo
)]: cachedUpTheMapElementTwoVersion,
[toElementCompositeKey(serviceId)(inventoryLocationId)(
elementUpTheMapThree
)]: cachedUpTheMapElementThreeVersion,
},
},
},
Expand All @@ -2620,7 +2648,11 @@ describe('store getters', () => {
// assert
expect(
actualElements?.elementsPerRoute[toSubsystemMapPathId(inPlaceLocation)]
).toEqual([cachedInPlaceElementVersion]);
).toEqual([
cachedInPlaceElementVersion,
cachedUpTheMapElementTwoVersion,
cachedUpTheMapElementThreeVersion,
]);
});
it('should return elements from several independent routes', () => {
// arrange
Expand Down
4 changes: 3 additions & 1 deletion packages/explorer-for-endevor/src/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2518,7 +2518,9 @@ export const getFirstFoundElements =
const elementsInLocation = Object.values(locationData.elements);
const elementsInRoute = acc[inPlaceLocation] ?? {};
elementsInLocation.forEach((element) => {
elementsInRoute[element.element.name] = element;
elementsInRoute[
`${element.element.type}/${element.element.name}`
] = element;
});
acc[inPlaceLocation] = elementsInRoute;
return;
Expand Down

0 comments on commit c4cfe24

Please sign in to comment.