test: clean up code
This commit is contained in:
parent
af5d5fadb0
commit
ec121409f8
4 changed files with 2 additions and 6 deletions
|
|
@ -3,7 +3,7 @@ import { WebElement } from "vscode-extension-tester";
|
|||
export class TestUtils {
|
||||
public static async waitForElement(
|
||||
locatorFn: () => Promise<WebElement>,
|
||||
timeout: number = 1500,
|
||||
timeout: number = 5000,
|
||||
interval: number = 500,
|
||||
): Promise<any> {
|
||||
const startTime = Date.now();
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import {
|
|||
Workbench,
|
||||
} from "vscode-extension-tester";
|
||||
import { GUISelectors } from "../selectors/GUI.selectors";
|
||||
import { TestUtils } from "../TestUtils";
|
||||
|
||||
export class GUIActions {
|
||||
public static switchToReactIframe = async (driver: WebDriver) => {
|
||||
|
|
|
|||
|
|
@ -26,10 +26,6 @@ export class GUISelectors {
|
|||
return SelectorUtils.getElementByDataTestId(view, "model-select-button");
|
||||
}
|
||||
|
||||
public static getListbox(view: WebView) {
|
||||
const listbox = view.findWebElement(By.css('[role="listbox"]'));
|
||||
}
|
||||
|
||||
public static getModelDropdownOption(view: WebView, option: string) {
|
||||
return view.findWebElement(
|
||||
By.xpath(`//*[@role="listbox"]//*[contains(text(), "${option}")]`),
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ describe("GUI Test", () => {
|
|||
|
||||
await TestUtils.waitForElement(
|
||||
() => GUISelectors.getThreadMessageByText(view, "I'm fine"),
|
||||
5000,
|
||||
);
|
||||
}).timeout(600000000);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue