monaco-page-objects
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -109,2 +109,3 @@ import { SideBarView } from "../SideBarView"; | ||
constructor(scm: ScmProvider | ScmView); | ||
openContextMenu(): Promise<ContextMenu>; | ||
} |
@@ -16,2 +16,3 @@ "use strict"; | ||
const AbstractElement_1 = require("../../AbstractElement"); | ||
const __1 = require("../../.."); | ||
const ElementWithContextMenu_1 = require("../../ElementWithContextMenu"); | ||
@@ -283,4 +284,22 @@ /** | ||
} | ||
openContextMenu() { | ||
const _super = Object.create(null, { | ||
openContextMenu: { get: () => super.openContextMenu } | ||
}); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield this.click(); | ||
const shadowRootHost = yield this.enclosingItem.findElements(selenium_webdriver_1.By.className('shadow-root-host')); | ||
yield this.getDriver().actions().sendKeys(selenium_webdriver_1.Key.ESCAPE).perform(); | ||
if (shadowRootHost.length > 0) { | ||
if ((yield this.getAttribute('aria-expanded')) !== 'true') { | ||
yield this.click(); | ||
} | ||
const shadowRoot = yield this.getDriver().executeScript('return arguments[0].shadowRoot', shadowRootHost[0]); | ||
return new __1.ContextMenu(shadowRoot).wait(); | ||
} | ||
return _super.openContextMenu.call(this); | ||
}); | ||
} | ||
} | ||
exports.MoreAction = MoreAction; | ||
//# sourceMappingURL=ScmView.js.map |
{ | ||
"name": "monaco-page-objects", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Page Objects for Monaco Editor", | ||
@@ -5,0 +5,0 @@ "main": "out/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
277838
6920