orc-shared 5.10.0-dev.15 → 5.10.0-dev.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65,6 +65,9 @@ var MultipleLinesText = function MultipleLinesText(_ref) {
65
65
  setIsClamped(true);
66
66
  }
67
67
  }, [isClamped, setIsClamped]);
68
+ if (!children) {
69
+ return null;
70
+ }
68
71
  return /*#__PURE__*/_react.default.createElement(TooltippedTextClamp, {
69
72
  disableCssClamp: false,
70
73
  clamp: lineCount,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orc-shared",
3
- "version": "5.10.0-dev.15",
3
+ "version": "5.10.0-dev.16",
4
4
  "description": "Shared code for Orckestra applications",
5
5
  "main": "./src/index.js",
6
6
  "exports": {
@@ -39,6 +39,10 @@ const MultipleLinesText = ({ children, titleValue, textProps, tooltipClasses })
39
39
  [isClamped, setIsClamped],
40
40
  );
41
41
 
42
+ if (!children) {
43
+ return null;
44
+ }
45
+
42
46
  return (
43
47
  <TooltippedTextClamp
44
48
  disableCssClamp={false}
@@ -89,4 +89,10 @@ describe("MultipleLinesText", () => {
89
89
  expect(() => mount(component), "to throw a", TypeError);
90
90
  });
91
91
  });
92
+
93
+ it("Returns null if children is null", () => {
94
+ const component = <MultipleLinesText>{null}</MultipleLinesText>;
95
+ const mountedComponent = shallow(component);
96
+ expect(mountedComponent.isEmptyRender(), "to be true");
97
+ });
92
98
  });
@@ -78,9 +78,7 @@ describe("TaskDetailsModal", () => {
78
78
  const expectedContent = (
79
79
  <div>
80
80
  <InformationItem label={sharedMessages.taskId}>1234</InformationItem>
81
- <InformationItem label={sharedMessages.taskStatus}>
82
- <Ignore />
83
- </InformationItem>
81
+ <InformationItem label={sharedMessages.taskStatus} />
84
82
  <InformationItem label={sharedMessages.taskLogs}>
85
83
  <textarea />
86
84
  </InformationItem>