monaco-page-objects
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -15,7 +15,10 @@ import { Editor } from "./Editor"; | ||
* | ||
* If your setting has nested categories (i.e `example.general.test`), | ||
* pass in each category as a separate string. | ||
* | ||
* @param title title of the setting | ||
* @param category category of the setting | ||
* @param categories category of the setting | ||
* @returns Promise resolving to a Setting object if found, undefined otherwise | ||
*/ | ||
findSetting(title: string, category: string): Promise<Setting>; | ||
findSetting(title: string, ...categories: string[]): Promise<Setting>; | ||
/** | ||
@@ -22,0 +25,0 @@ * Switch between settings perspectives |
@@ -29,8 +29,12 @@ "use strict"; | ||
* | ||
* If your setting has nested categories (i.e `example.general.test`), | ||
* pass in each category as a separate string. | ||
* | ||
* @param title title of the setting | ||
* @param category category of the setting | ||
* @param categories category of the setting | ||
* @returns Promise resolving to a Setting object if found, undefined otherwise | ||
*/ | ||
findSetting(title, category) { | ||
findSetting(title, ...categories) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const category = categories.join(' › '); | ||
const searchBox = yield this.findElement(SettingsEditor.locators.Editor.inputArea); | ||
@@ -37,0 +41,0 @@ yield searchBox.sendKeys(selenium_webdriver_1.Key.chord(SettingsEditor.ctlKey, 'a')); |
@@ -18,2 +18,7 @@ import { ContentAssist } from "../.."; | ||
/** | ||
* Retrieve the Uri of the file opened in the active editor | ||
* @returns Promise resolving to editor's underlying Uri | ||
*/ | ||
getFileUri(): Promise<string>; | ||
/** | ||
* Retrieve the path to the file opened in the active editor | ||
@@ -20,0 +25,0 @@ * @returns Promise resolving to editor's underlying file path |
@@ -45,2 +45,12 @@ "use strict"; | ||
/** | ||
* Retrieve the Uri of the file opened in the active editor | ||
* @returns Promise resolving to editor's underlying Uri | ||
*/ | ||
getFileUri() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const ed = yield this.findElement(TextEditor.locators.TextEditor.editorContainer); | ||
return ed.getAttribute(TextEditor.locators.TextEditor.dataUri); | ||
}); | ||
} | ||
/** | ||
* Retrieve the path to the file opened in the active editor | ||
@@ -51,5 +61,3 @@ * @returns Promise resolving to editor's underlying file path | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const ed = yield this.findElement(TextEditor.locators.TextEditor.editorContainer); | ||
const url = yield ed.getAttribute(TextEditor.locators.TextEditor.dataUri); | ||
return url_1.fileURLToPath(url); | ||
return url_1.fileURLToPath(yield this.getFileUri()); | ||
}); | ||
@@ -56,0 +64,0 @@ } |
@@ -31,4 +31,4 @@ import { ViewSection } from "../ViewSection"; | ||
*/ | ||
openItem(title: string): Promise<void>; | ||
openItem(title: string): Promise<never[]>; | ||
private getSectionForCategory; | ||
} |
@@ -105,2 +105,3 @@ "use strict"; | ||
} | ||
return []; | ||
}); | ||
@@ -107,0 +108,0 @@ } |
@@ -59,3 +59,3 @@ import { AbstractElement } from "../AbstractElement"; | ||
*/ | ||
abstract openItem(...path: string[]): Promise<ViewItem[] | void>; | ||
abstract openItem(...path: string[]): Promise<ViewItem[]>; | ||
/** | ||
@@ -62,0 +62,0 @@ * Retrieve the action buttons on the section's header |
@@ -48,2 +48,10 @@ import { AbstractElement } from "../../AbstractElement"; | ||
/** | ||
* Select/Deselect all quick picks using the 'select all' checkbox | ||
* If multiple selection is disabled on the input box, no action is performed | ||
* | ||
* @param state true to select all, false to deselect all | ||
* @returns Promise resolving when all quick picks have been toggled to desired state | ||
*/ | ||
toggleAllQuickPicks(state: boolean): Promise<void>; | ||
/** | ||
* Scroll through the quick picks to find an item by the name or index | ||
@@ -50,0 +58,0 @@ * @param indexOrText index (number) or text (string) of the item to search by |
@@ -109,2 +109,23 @@ "use strict"; | ||
/** | ||
* Select/Deselect all quick picks using the 'select all' checkbox | ||
* If multiple selection is disabled on the input box, no action is performed | ||
* | ||
* @param state true to select all, false to deselect all | ||
* @returns Promise resolving when all quick picks have been toggled to desired state | ||
*/ | ||
toggleAllQuickPicks(state) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const checkboxes = yield this.findElements(Input.locators.Input.quickPickSelectAll); | ||
if (checkboxes.length < 0) { | ||
return; | ||
} | ||
if (!(yield checkboxes[0].isSelected())) { | ||
yield checkboxes[0].click(); | ||
} | ||
if (state === false) { | ||
yield checkboxes[0].click(); | ||
} | ||
}); | ||
} | ||
/** | ||
* Scroll through the quick picks to find an item by the name or index | ||
@@ -111,0 +132,0 @@ * @param indexOrText index (number) or text (string) of the item to search by |
@@ -31,2 +31,3 @@ import { WebDriver } from 'selenium-webdriver'; | ||
export * from './components/editor/TextEditor'; | ||
export * from './components/editor/Editor'; | ||
export * from './components/editor/SettingsEditor'; | ||
@@ -33,0 +34,0 @@ export * from './components/editor/DiffEditor'; |
@@ -10,6 +10,6 @@ "use strict"; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.initPageObjects = void 0; | ||
exports.initPageObjects = exports.NotificationType = exports.Notification = exports.ScmChange = exports.ScmProvider = exports.ScmView = void 0; | ||
const AbstractElement_1 = require("./components/AbstractElement"); | ||
@@ -49,2 +49,3 @@ const loader_1 = require("./locators/loader"); | ||
__exportStar(require("./components/editor/TextEditor"), exports); | ||
__exportStar(require("./components/editor/Editor"), exports); | ||
__exportStar(require("./components/editor/SettingsEditor"), exports); | ||
@@ -51,0 +52,0 @@ __exportStar(require("./components/editor/DiffEditor"), exports); |
@@ -280,2 +280,3 @@ import { By } from "selenium-webdriver"; | ||
quickPickDescription: By; | ||
quickPickSelectAll: By; | ||
titleBar: By; | ||
@@ -282,0 +283,0 @@ title: By; |
{ | ||
"name": "monaco-page-objects", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Page Objects for Monaco Editor", | ||
@@ -32,8 +32,8 @@ "main": "out/index.js", | ||
"devDependencies": { | ||
"@types/fs-extra": "^8.0.1", | ||
"@types/node": "^11.15.3", | ||
"@types/fs-extra": "^9.0.1", | ||
"@types/node": "^14.11.2", | ||
"@types/selenium-webdriver": "^3.0.15", | ||
"rimraf": "^3.0.0", | ||
"typedoc": "^0.15.4", | ||
"typescript": "^3.7.3" | ||
"typedoc": "^0.19.2", | ||
"typescript": "^4.0.3" | ||
}, | ||
@@ -43,5 +43,5 @@ "dependencies": { | ||
"compare-versions": "^3.5.1", | ||
"fs-extra": "^8.1.0", | ||
"fs-extra": "^9.0.1", | ||
"merge-deep": "jrichter1/merge-deep#functions", | ||
"ts-essentials": "^3.0.5" | ||
"ts-essentials": "^7.0.0" | ||
}, | ||
@@ -48,0 +48,0 @@ "peerDependencies": { |
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
280099
6973
+ Addedat-least-node@1.0.0(transitive)
+ Addedfs-extra@9.1.0(transitive)
+ Addedjsonfile@6.1.0(transitive)
+ Addedts-essentials@7.0.3(transitive)
+ Addeduniversalify@2.0.1(transitive)
- Removedfs-extra@8.1.0(transitive)
- Removedjsonfile@4.0.0(transitive)
- Removedts-essentials@3.0.5(transitive)
- Removeduniversalify@0.1.2(transitive)
Updatedfs-extra@^9.0.1
Updatedts-essentials@^7.0.0