| 1 | import { WebView } from "vscode-extension-tester"; |
| 2 | |
| 3 | import { ApplySelectors } from "../selectors/Apply.selectors"; |
| 4 | import { TestUtils } from "../TestUtils"; |
| 5 | |
| 6 | export class ApplyActions { |
| 7 | static async performAction( |
| 8 | view: WebView, |
| 9 | action: "apply" | "accept" | "reject" | "create", |
| 10 | ) { |
| 11 | let applyButton = await TestUtils.waitForSuccess( |
| 12 | async () => await ApplySelectors.getCodeblockToolbarAction(view, action), |
| 13 | ); |
| 14 | applyButton.click(); |
| 15 | } |
| 16 | } |