File tree Expand file tree Collapse file tree
workspaces/ballerina/ballerina-extension/e2e-test/e2e-playwright-tests/utils/pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,11 @@ export class ProjectExplorer {
3333 * followed by the ", " separator, so it works on old and new VS Code.
3434 */
3535 public static treeItemSelector ( label : string ) : string {
36- return `div[role="treeitem"][aria-label="${ label } "], div[role="treeitem"][aria-label^="${ label } , "]` ;
36+ // Escape backslashes and double quotes so labels that themselves
37+ // contain quotes (e.g. `RabbitMQ Event Integration - "myQueue"`) don't
38+ // produce a malformed double-quoted CSS attribute selector.
39+ const escaped = label . replace ( / \\ / g, '\\\\' ) . replace ( / " / g, '\\"' ) ;
40+ return `div[role="treeitem"][aria-label="${ escaped } "], div[role="treeitem"][aria-label^="${ escaped } , "]` ;
3741 }
3842
3943 public async init ( ) {
You can’t perform that action at this time.
0 commit comments