diff --git a/canvas_modules/common-canvas/__tests__/common-properties/controls/oneofselect-test.js b/canvas_modules/common-canvas/__tests__/common-properties/controls/oneofselect-test.js index abfe27e70..69f2cb397 100644 --- a/canvas_modules/common-canvas/__tests__/common-properties/controls/oneofselect-test.js +++ b/canvas_modules/common-canvas/__tests__/common-properties/controls/oneofselect-test.js @@ -318,8 +318,8 @@ describe("oneofselect paramDef works correctly", () => { // combobox should have aria-label const comboboxWrapper = container.querySelector("div[data-id='properties-ctrl-oneofselect_custom_value']"); - const comboboxAriaLabel = comboboxWrapper.querySelector(".cds--list-box__menu").getAttribute("aria-label"); - expect(comboboxAriaLabel).to.equal("oneofselect custom value allowed"); + const comboboxAriaLabelledby = comboboxWrapper.querySelector(".cds--list-box__menu").getAttribute("aria-labelledby"); + expect(comboboxWrapper.querySelector(`label[id='${comboboxAriaLabelledby}']`).textContent).to.equal("oneofselect custom value allowed(required)"); }); }); diff --git a/canvas_modules/common-canvas/__tests__/common-properties/panels/tearsheet-test.js b/canvas_modules/common-canvas/__tests__/common-properties/panels/tearsheet-test.js index 2f2188cad..76a40f15e 100644 --- a/canvas_modules/common-canvas/__tests__/common-properties/panels/tearsheet-test.js +++ b/canvas_modules/common-canvas/__tests__/common-properties/panels/tearsheet-test.js @@ -46,7 +46,7 @@ describe("tearsheet tests", () => { it("should have title and description set", () => { controller.setActiveTearsheet("tearsheet1"); wrapper.update(); - expect(wrapper.find("div.properties-tearsheet-panel .properties-tearsheet-header h3").text()).to.equal("Python"); + expect(wrapper.find("div.properties-tearsheet-panel .properties-tearsheet-header h2").text()).to.equal("Python"); expect(wrapper.find("div.properties-tearsheet-panel .properties-tearsheet-header p").text()).to.equal("Your change is automatically saved."); }); it("should be hidden but not removed from DOM on the tearsheet close button", () => { @@ -68,7 +68,7 @@ describe("tearsheet tests", () => { wrapper.find("div[data-id='properties-ctrl-code_rows'] button.maximize").simulate("click"); wrapper.update(); expect(wrapper.find("div.properties-tearsheet-panel.is-visible")).to.have.length(1); - expect(wrapper.find("div.properties-tearsheet-panel .properties-tearsheet-header h3").text()).to.equal("Python 2"); + expect(wrapper.find("div.properties-tearsheet-panel .properties-tearsheet-header h2").text()).to.equal("Python 2"); expect(wrapper.find("div.properties-tearsheet-panel div[data-id='properties-ctrl-code_rows']")).to.have.length(1); }); }); @@ -88,7 +88,7 @@ describe("Tearsheet renders correctly", () => { const tearsheet = wrapper.find("div.properties-tearsheet-panel"); expect(tearsheet).to.have.length(1); expect(tearsheet.find("div.properties-tearsheet-header")).to.have.length(1); - expect(tearsheet.find("div.properties-tearsheet-header > h3").text()).to.equal("test title"); + expect(tearsheet.find("div.properties-tearsheet-header > h2").text()).to.equal("test title"); expect(tearsheet.find("div.properties-tearsheet-body")).to.have.length(1); expect(tearsheet.find("div.properties-tearsheet-body").text()).to.equal("test content"); expect(tearsheet.find("div.properties-tearsheet-body.with-buttons")).to.have.length(0); diff --git a/canvas_modules/common-canvas/package.json b/canvas_modules/common-canvas/package.json index 47bff42c3..dcda6038f 100644 --- a/canvas_modules/common-canvas/package.json +++ b/canvas_modules/common-canvas/package.json @@ -59,7 +59,7 @@ "@babel/plugin-transform-runtime": "7.24.7", "@babel/preset-env": "7.25.3", "@babel/preset-react": "7.24.7", - "@carbon/react": "1.62.0-rc.0", + "@carbon/react": "1.71.0", "@rollup/plugin-babel": "5.3.0", "@rollup/plugin-commonjs": "21.0.1", "@rollup/plugin-json": "4.1.0", diff --git a/canvas_modules/common-canvas/src/common-properties/common-properties.jsx b/canvas_modules/common-canvas/src/common-properties/common-properties.jsx index b9f41f3fc..b3ba8019b 100644 --- a/canvas_modules/common-canvas/src/common-properties/common-properties.jsx +++ b/canvas_modules/common-canvas/src/common-properties/common-properties.jsx @@ -43,6 +43,7 @@ class CommonProperties extends React.Component { } componentDidCatch(error, info) { + console.error(error); this.setState({ hasError: true, error: error, diff --git a/canvas_modules/common-canvas/src/common-properties/controls/dropdown/dropdown.jsx b/canvas_modules/common-canvas/src/common-properties/controls/dropdown/dropdown.jsx index 5bf942c17..4458b93b9 100644 --- a/canvas_modules/common-canvas/src/common-properties/controls/dropdown/dropdown.jsx +++ b/canvas_modules/common-canvas/src/common-properties/controls/dropdown/dropdown.jsx @@ -185,7 +185,7 @@ class DropDown extends React.Component { } handleComboOnChange(evt) { - let value = evt.selectedItem && evt.selectedItem.value ? evt.selectedItem.value : ""; + let value = evt.selectedItem && evt.selectedItem.value ? evt.selectedItem.value : evt.selectedItem; if (this.props.control.controlType === ControlType.SELECTCOLUMN) { value = PropertyUtils.fieldStringToValue(value, this.props.control, this.props.controller); } @@ -290,6 +290,7 @@ class DropDown extends React.Component { disabled={this.props.state === STATES.DISABLED || this.disableEmptyListDropdown} type="default" items={dropDown.options} + itemToString={(item) => (item ? item.label : "")} itemToElement={this.renderItem} renderSelectedItem={this.renderItem} onChange={this.handleChange} diff --git a/canvas_modules/harness/package.json b/canvas_modules/harness/package.json index 4ef7340ea..20c1858e9 100644 --- a/canvas_modules/harness/package.json +++ b/canvas_modules/harness/package.json @@ -37,7 +37,7 @@ "@babel/preset-react": "7.24.1", "@carbon/charts": "1.15.3", "@carbon/charts-react": "1.15.3", - "@carbon/react": "1.62.0-rc.0", + "@carbon/react": "1.71.0", "@elyra/canvas": "file:../common-canvas", "@pmmmwh/react-refresh-webpack-plugin": "0.5.11", "ajv": "8.12.0",