test: clean up code

This commit is contained in:
tomasz-io 2024-12-06 17:25:10 -08:00
parent af5d5fadb0
commit ec121409f8
4 changed files with 2 additions and 6 deletions

View file

@ -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();

View file

@ -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) => {

View file

@ -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}")]`),

View file

@ -54,7 +54,6 @@ describe("GUI Test", () => {
await TestUtils.waitForElement(
() => GUISelectors.getThreadMessageByText(view, "I'm fine"),
5000,
);
}).timeout(600000000);
});