import { delay } from "../helper" ; import { AbstractPageObject } from "./abstract-po" ; import { By , WebElement } from "vscode-extension-tester" ; export class PatchGeneratePageObject extends AbstractPageObject { async fillRepositoryLogPage ( data ) { } async applyFilterInput ( filter ) { await this . beginWebView ( ) ; await this . setValue ( "FilterInput" , `${ filter }\t` ) ; await delay ( ) ; const result = await this . getValue ( "SelectL" ) ; await this . endWebView ( ) ; return result ; } async selectLeftOption ( ... elements ) { await this . beginWebView ( ) ; const selectLeft = await this . findElement ( "SelectL" ) ; const options = await selectLeft . findElements ( By . css ( "option" ) ) ; options . filter ( async ( option ) => { const text = await option . getText ( ) ; if ( elements . includes ( text ) ) { await option . click ( ) ; } } ) ; const button = await this . findElement ( "loadRight" ) ; button . click ( ) ; await this . endWebView ( ) ; } }