Skip to content

Commit

Permalink
Merge branch 'main' into 1635-radio-group-radioset
Browse files Browse the repository at this point in the history
  • Loading branch information
matthoward366 authored Apr 19, 2024
2 parents 2854216 + 0a8abb5 commit cb48f0f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
8 changes: 6 additions & 2 deletions canvas_modules/common-canvas/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ echo "npm install"
npm install
echo "npm run build"
npm run build
echo "Run jest tests"
npm run test-coverage
if [[ "${DISABLE_JEST_TESTS}" == "true" ]]; then
echo "Skipping jest tests when deploying to https://ibm.biz/elyra-canvas-test-harness"
else
echo "Run jest tests"
npm run test-coverage
fi

echo "cd $WORKING_DIR"
cd $WORKING_DIR
5 changes: 4 additions & 1 deletion canvas_modules/common-canvas/jest-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ Object.defineProperty(window, "matchMedia", {
});

function mockConsole(consoleMethod) {
const ignoredMessages = ["test was not wrapped in act(...)", "Rendering components directly into document.body is discouraged"];
const ignoredMessages = [
"test was not wrapped in act(...)", "Rendering components directly into document.body is discouraged",
"Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"
];
return (message, ...args) => {
const hasIgnoredMessage = ignoredMessages.some((ignoredMessage) => message && typeof message === "string" && message.includes(ignoredMessage));
if (!hasIgnoredMessage) {
Expand Down
21 changes: 14 additions & 7 deletions canvas_modules/harness/src/client/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2425,35 +2425,41 @@ class App extends React.Component {
<span className="harness-title">Common Canvas</span>
<span className="harness-version">{todaysDateFormatted}</span>
</li>
<li className="harness-navbar-li harness-nav-divider" data-tip={consoleLabel}>
<li className="harness-navbar-li harness-nav-divider" data-tooltip-id="toolbar-tooltip" data-tooltip-content={consoleLabel}>
<a onClick={this.openConsole.bind(this) }>
<Isvg src={listview32} />
</a>
</li>
<li className="harness-navbar-li" data-tip={downloadFlowLabel}>
<li className="harness-navbar-li" data-tooltip-id="toolbar-tooltip" data-tooltip-content={downloadFlowLabel}>
<a onClick={this.downloadPipelineFlow.bind(this) }>
<Isvg src={download32} />
</a>
</li>
<li className="harness-navbar-li" data-tip={downloadPaletteLabel}>
<li className="harness-navbar-li" data-tooltip-id="toolbar-tooltip" data-tooltip-content={downloadPaletteLabel}>
<a onClick={this.downloadPalette.bind(this) }>
<Isvg src={download32} />
</a>
</li>
<li className="harness-navbar-li harness-pipeline-breadcrumbs-container">
{breadcrumbs}
</li>
<li id="harness-action-bar-sidepanel-api" className="harness-navbar-li harness-nav-divider harness-action-bar-sidepanel" data-tip={apiLabel}>
<li id="harness-action-bar-sidepanel-api" className="harness-navbar-li harness-nav-divider harness-action-bar-sidepanel"
data-tooltip-id="toolbar-tooltip" data-tooltip-content={apiLabel}
>
<a onClick={this.sidePanelAPI.bind(this) }>
<Isvg src={api32} />
</a>
</li>
<li id="harness-action-bar-sidepanel-properties" className="harness-navbar-li harness-action-bar-sidepanel" data-tip={commonPropertiesModalLabel}>
<li id="harness-action-bar-sidepanel-properties" className="harness-navbar-li harness-action-bar-sidepanel"
data-tooltip-id="toolbar-tooltip" data-tooltip-content={commonPropertiesModalLabel}
>
<a onClick={this.sidePanelProperties.bind(this) }>
<Isvg src={template32} />
</a>
</li>
<li id="harness-action-bar-sidepanel-canvas" className="harness-navbar-li harness-nav-divider harness-action-bar-sidepanel" data-tip={commonCanvasLabel}>
<li id="harness-action-bar-sidepanel-canvas" className="harness-navbar-li harness-nav-divider harness-action-bar-sidepanel"
data-tooltip-id="toolbar-tooltip" data-tooltip-content={commonCanvasLabel}
>
<a onClick={this.sidePanelCanvas.bind(this) }>
<Isvg src={justify32} />
</a>
Expand Down Expand Up @@ -2764,6 +2770,7 @@ class App extends React.Component {
);
}

const tooltipFontSize = "13px";
const mainView = (<div id="harness-app-container">
{navBar}
<SidePanel
Expand All @@ -2787,7 +2794,7 @@ class App extends React.Component {
{commonCanvas}
</div>
{consoleView}
<ReactTooltip place="bottom" effect="solid" />
<ReactTooltip id="toolbar-tooltip" place="bottom" effect="solid" style={{ fontSize: tooltipFontSize }} />
</div>);

return (
Expand Down

0 comments on commit cb48f0f

Please sign in to comment.