File size: 1,038 Bytes
71174bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import type { TestCmdList } from "./TestCmdList";

export enum TestCommand {
    Click = "click",
    Text = "text",
    Wait = "wait",
    WaitUntilRegex = "waitUntilRegex",
    WaitUntilNotRegex = "waitUntilNotRegex",
    Upload = "upload",
    AddTests = "addTests", // TODO: Not a class yet
    CheckBox = "checkBox", // TODO: Not a class yet
    TourNote = "tourNote",
}

export interface ITestCommand {
    selector?: string;
    cmd: TestCommand;
    data?: any;
}

export interface ITest {
    name?: string;
    // Run before the popup opens (and before menu clicking).
    beforePluginOpens?: () => TestCmdList;
    // Populate the user arguments. Do not include the command to click the
    // plugin action button.
    pluginOpen?: () => TestCmdList;
    // Clicks the popup button to close the plugin. Set to [] explicitly for
    // those rare plugins that have no popups.
    closePlugin?: () => TestCmdList;
    // Run after the plugin popup is closed, and the job is running.
    afterPluginCloses?: () => TestCmdList;
}