Skip to content

Commit

Permalink
#2057 Downgrade Carbon (#2059)
Browse files Browse the repository at this point in the history
Signed-off-by: Carita Ou <[email protected]>
  • Loading branch information
caritaou authored Jul 16, 2024
1 parent d34a8f7 commit 9a4b48d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion canvas_modules/common-canvas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@babel/plugin-transform-runtime": "7.11.5",
"@babel/preset-env": "7.11.5",
"@babel/preset-react": "7.10.4",
"@carbon/react": "^1.52.0",
"@carbon/react": "1.62.0-rc.0",
"@rollup/plugin-babel": "5.3.0",
"@rollup/plugin-commonjs": "21.0.1",
"@rollup/plugin-json": "4.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ Cypress.Commands.add("dropdownSelect", (dropdownElement, selectedItemName) => {
// Select option from drop down list
cy.get(".cds--list-box__menu")
.find(".cds--list-box__menu-item")
.then((options) => options.filter((idx) => options[idx].outerText === selectedItemName))
.click();
.then((options) => {
const opt = options.filter((idx) => options[idx].outerText === selectedItemName);
opt.click();
});
});

Cypress.Commands.add("setCanvasConfig", (config) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
*/

Cypress.Commands.add("enterTextInExpressionEditor", (text, propertyId) => {
const clipboardData = new DataTransfer();
clipboardData.setData("text/plain", text);
const pasteEvent = new ClipboardEvent("paste", {
clipboardData
});

cy.useCtrlOrCmdKey()
.then((selectedKey) => {
cy.get(`div[data-id='properties-ctrl-${propertyId}']`)
Expand All @@ -24,8 +30,10 @@ Cypress.Commands.add("enterTextInExpressionEditor", (text, propertyId) => {
.as("editorContent");
cy.get("@editorContent")
.type(selectedKey + "{a}{del}"); // Select all and delete existing text in expression editor
cy.get(".cm-editor [role='textbox']") // Paste text in place of typing https://stackoverflow.com/questions/55362875/how-to-type-using-cypress-type-inside-the-codemirror-editor
.trigger("paste", pasteEvent);
cy.get("@editorContent")
.type(text + "{ctrl} "); // Type text and ctrl + space to display hints
.type("{ctrl} "); // Type ctrl + space to display hints
});
});

Expand Down
2 changes: 1 addition & 1 deletion canvas_modules/harness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@babel/preset-react": "7.24.1",
"@carbon/charts": "1.15.3",
"@carbon/charts-react": "1.15.3",
"@carbon/react": "^1.52.0",
"@carbon/react": "1.62.0-rc.0",
"@elyra/canvas": "file:../common-canvas",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.11",
"ajv": "8.12.0",
Expand Down

0 comments on commit 9a4b48d

Please sign in to comment.