-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
66 lines (61 loc) · 1.93 KB
/
types.ts
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import {
RegionIn,
ScrollOption,
SelectorIn,
} from './graphql/__generated__/graphql';
import { SelectiveRegionOptions } from './common/selective-region';
import { SauceRegion } from './common/regions';
export type FullPageScreenshotOptions<T> =
| boolean
| {
/**
* Delay in ms after scrolling and before taking screenshots.
* A slight delay can be helpful if the page is using lazy loading when scrolling
*/
delayAfterScrollMs?: number;
/**
* Disable CSS animations and the input caret in the app.
*/
disableCSSAnimation?: boolean;
/**
* Hide elements on the page after first scroll by css selectors.
*/
hideAfterFirstScroll?: string[];
/**
* Hide all scrollbars in the app.
*/
hideScrollBars?: boolean;
/**
* Limit the number of screenshots taken for scrolling and stitching.
*/
scrollLimit?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
/**
* Element used for scrolling (available only in native apps)
*/
scrollElement?: T | Promise<T>;
/**
* Selector of an element that we should crop the screenshot to. Available only on native apps.
*/
nativeClipSelector?: SelectorIn;
/**
* Change scroll behaviour before and after taking full page screenshot. Available only on native apps.
*/
scrollOption?: ScrollOption;
};
export type Ignorable<T> = T | T[] | Promise<T> | Promise<T[]> | RegionIn;
export type RegionType<T> = { element: T } & SelectiveRegionOptions;
export type ElementMeta = { id: string; name?: string };
export interface VisualEnvOpts {
user: string | undefined;
key: string | undefined;
region: SauceRegion | undefined;
/**
* The build ID for the current run.
*/
buildId: string | null;
buildName: string;
project: string | null;
branch: string | null;
defaultBranch: string | null;
customId: string | null;
}