Skip to content

Commit

Permalink
Release note and test added
Browse files Browse the repository at this point in the history
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
  • Loading branch information
jitu5 committed Aug 15, 2023
1 parent 85bf053 commit 5e17f6f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Please follow the established format:
- Fix incorrect rendering of datasets in modular pipelines. (#1439)
- Fix broken SVG/PNG exports in light theme. (#1463)
- Fix dataset and global toolbar error with standalone React component (#1351)
- Fix Sidebar search result based on Pretty name setting (#1252)

# Release 6.3.4

Expand Down
28 changes: 28 additions & 0 deletions src/selectors/nodes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
getNodesWithInputParams,
getInputOutputNodesForFocusedModularPipeline,
getNodeLabel,
getOppositeForPrettyName,
} from './nodes';
import {
toggleTextLabels,
Expand Down Expand Up @@ -132,6 +133,33 @@ describe('Selectors', () => {
expect(nodeLabels[nodeId]).toEqual(nodePrettyName);
});
});

describe('getOppositeForPrettyName', () => {
it('returns opposite node labels with full name when pretty name is turned off', () => {
const nodes = getVisibleNodes(mockState.spaceflights);
const nodeId = nodes[0].id;
const nodePrettyName = nodes[0].name;
const newMockState = reducer(
mockState.spaceflights,
toggleIsPrettyName(false)
);
const nodeLabels = getOppositeForPrettyName(newMockState);

expect(nodeLabels[nodeId]).toEqual(nodePrettyName);
});

it('returns opposite node labels with pretty name when pretty name is turned on', () => {
const nodes = getVisibleNodes(mockState.spaceflights);
const nodeId = nodes[0].id;
const nodeFullName = nodes[0].fullName;
const newMockState = reducer(
mockState.spaceflights,
toggleIsPrettyName(true)
);
const nodeLabels = getOppositeForPrettyName(newMockState);
expect(nodeLabels[nodeId]).toEqual(nodeFullName);
});
});
});

describe('getNodeData', () => {
Expand Down

0 comments on commit 5e17f6f

Please sign in to comment.