@haibun/web-playwright 3.1.3 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/BrowserFactory.d.ts +11 -11
- package/build/BrowserFactory.d.ts.map +1 -1
- package/build/BrowserFactory.js +41 -48
- package/build/BrowserFactory.js.map +1 -1
- package/build/PlaywrightEvents.d.ts +2 -2
- package/build/PlaywrightEvents.d.ts.map +1 -1
- package/build/PlaywrightEvents.js +44 -26
- package/build/PlaywrightEvents.js.map +1 -1
- package/build/cycles.d.ts.map +1 -1
- package/build/cycles.js +83 -38
- package/build/cycles.js.map +1 -1
- package/build/domains.d.ts +6 -0
- package/build/domains.d.ts.map +1 -1
- package/build/domains.js +37 -1
- package/build/domains.js.map +1 -1
- package/build/interactionSteps.d.ts +45 -52
- package/build/interactionSteps.d.ts.map +1 -1
- package/build/interactionSteps.js +45 -53
- package/build/interactionSteps.js.map +1 -1
- package/build/jsonExtractSteps.d.ts +4 -0
- package/build/jsonExtractSteps.d.ts.map +1 -0
- package/build/jsonExtractSteps.js +53 -0
- package/build/jsonExtractSteps.js.map +1 -0
- package/build/monitor/MonitorHandler.d.ts +2 -7
- package/build/monitor/MonitorHandler.d.ts.map +1 -1
- package/build/monitor/MonitorHandler.js +11 -35
- package/build/monitor/MonitorHandler.js.map +1 -1
- package/build/monitor/artifactDisplays/ResolvedFeaturesArtifactDisplay.d.ts.map +1 -1
- package/build/monitor/artifactDisplays/ResolvedFeaturesArtifactDisplay.js +8 -117
- package/build/monitor/artifactDisplays/ResolvedFeaturesArtifactDisplay.js.map +1 -1
- package/build/monitor/artifactDisplays/VideoArtifactDisplay.js +1 -1
- package/build/monitor/artifactDisplays/VideoArtifactDisplay.js.map +1 -1
- package/build/monitor/controls.d.ts.map +1 -1
- package/build/monitor/controls.js +209 -247
- package/build/monitor/controls.js.map +1 -1
- package/build/monitor/graph/generateMermaidGraph.d.ts +2 -9
- package/build/monitor/graph/generateMermaidGraph.d.ts.map +1 -1
- package/build/monitor/graph/generateMermaidGraph.js +54 -249
- package/build/monitor/graph/generateMermaidGraph.js.map +1 -1
- package/build/monitor/graph/graphUtils.d.ts.map +1 -1
- package/build/monitor/graph/graphUtils.js +11 -21
- package/build/monitor/graph/graphUtils.js.map +1 -1
- package/build/monitor/graph/mermaidGraphLinks.d.ts.map +1 -1
- package/build/monitor/graph/mermaidGraphLinks.js +5 -0
- package/build/monitor/graph/mermaidGraphLinks.js.map +1 -1
- package/build/monitor/messages.d.ts +1 -1
- package/build/monitor/messages.d.ts.map +1 -1
- package/build/monitor/messages.js +32 -200
- package/build/monitor/messages.js.map +1 -1
- package/build/monitor/monitor.d.ts +1 -2
- package/build/monitor/monitor.d.ts.map +1 -1
- package/build/monitor/monitor.js +11 -541
- package/build/monitor/monitor.js.map +1 -1
- package/build/rest-playwright.d.ts +25 -22
- package/build/rest-playwright.d.ts.map +1 -1
- package/build/rest-playwright.js +16 -17
- package/build/rest-playwright.js.map +1 -1
- package/build/twin-page.d.ts +1 -1
- package/build/twin-page.d.ts.map +1 -1
- package/build/twin-page.js +4 -8
- package/build/twin-page.js.map +1 -1
- package/build/web-playwright.d.ts +19 -37
- package/build/web-playwright.d.ts.map +1 -1
- package/build/web-playwright.js +94 -82
- package/build/web-playwright.js.map +1 -1
- package/package.json +16 -11
- package/web/monitor.html +0 -3715
package/build/cycles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cycles.js","sourceRoot":"","sources":["../src/cycles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"cycles.js","sourceRoot":"","sources":["../src/cycles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;A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AQ,KAAK,CAAC,GAAG,CAAC,UAAU,QAAQ;gBACxC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;gBACrB,IAAI,EAAE,UAAU;gBAChB,YAAY,EAAE,OAAO;gBACrB,IAAI,EAAE,cAAc,EAAE,yDAAyD;gBAC/E,QAAQ,EAAE,YAAY;gBACtB,WAAW,EAAE,IAAI;aACjB,CAAC,CAAC;YACH,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACrD,CAAC;QACD,4CAA4C;QAC5C,IAAI,EAAE,CAAC,UAAU,EAAE,CAAC;YACnB,MAAM,EAAE,CAAC,EAAE,EAAE,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;QAC9C,CAAC;QACD,MAAM,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC;QACrB,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC;QAClB,EAAE,CAAC,UAAU,GAAG,KAAK,CAAC;IACvB,CAAC;AACF,CAAC"}
|
package/build/domains.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { TDomainDefinition } from "@haibun/core/lib/defs.js";
|
|
2
2
|
export declare const DOMAIN_PAGE_LOCATOR = "page-locator";
|
|
3
|
+
export declare const DOMAIN_PAGE_TEST_ID = "page-test-id";
|
|
4
|
+
export declare const DOMAIN_PAGE_LABEL = "page-label";
|
|
5
|
+
export declare const DOMAIN_PAGE_PLACEHOLDER = "page-placeholder";
|
|
6
|
+
export declare const DOMAIN_PAGE_ROLE = "page-role";
|
|
7
|
+
export declare const DOMAIN_PAGE_TITLE = "page-title";
|
|
8
|
+
export declare const DOMAIN_PAGE_ALT_TEXT = "page-alt-text";
|
|
3
9
|
export declare const WebPlaywrightDomains: TDomainDefinition[];
|
|
4
10
|
//# sourceMappingURL=domains.d.ts.map
|
package/build/domains.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../src/domains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../src/domains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAC9C,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAC1D,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAC5C,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAC9C,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AAIpD,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,EAyCnD,CAAA"}
|
package/build/domains.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DOMAIN_STRING } from "@haibun/core/lib/domain-types.js";
|
|
3
3
|
export const DOMAIN_PAGE_LOCATOR = 'page-locator';
|
|
4
|
+
export const DOMAIN_PAGE_TEST_ID = 'page-test-id';
|
|
5
|
+
export const DOMAIN_PAGE_LABEL = 'page-label';
|
|
6
|
+
export const DOMAIN_PAGE_PLACEHOLDER = 'page-placeholder';
|
|
7
|
+
export const DOMAIN_PAGE_ROLE = 'page-role';
|
|
8
|
+
export const DOMAIN_PAGE_TITLE = 'page-title';
|
|
9
|
+
export const DOMAIN_PAGE_ALT_TEXT = 'page-alt-text';
|
|
4
10
|
const locatorSchema = z.string().min(1, 'locator cannot be empty');
|
|
5
11
|
export const WebPlaywrightDomains = [
|
|
6
12
|
{
|
|
@@ -12,6 +18,36 @@ export const WebPlaywrightDomains = [
|
|
|
12
18
|
selectors: [DOMAIN_PAGE_LOCATOR, DOMAIN_STRING],
|
|
13
19
|
schema: locatorSchema,
|
|
14
20
|
description: 'Locator that also satisfies string semantics.',
|
|
15
|
-
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
selectors: [DOMAIN_PAGE_TEST_ID],
|
|
24
|
+
schema: locatorSchema,
|
|
25
|
+
description: 'Playwright getByTestId selector (data-testid attribute)',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
selectors: [DOMAIN_PAGE_LABEL],
|
|
29
|
+
schema: locatorSchema,
|
|
30
|
+
description: 'Playwright getByLabel selector (label text)',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
selectors: [DOMAIN_PAGE_PLACEHOLDER],
|
|
34
|
+
schema: locatorSchema,
|
|
35
|
+
description: 'Playwright getByPlaceholder selector (placeholder text)',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
selectors: [DOMAIN_PAGE_ROLE],
|
|
39
|
+
schema: locatorSchema,
|
|
40
|
+
description: 'Playwright getByRole selector (ARIA role)',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
selectors: [DOMAIN_PAGE_TITLE],
|
|
44
|
+
schema: locatorSchema,
|
|
45
|
+
description: 'Playwright getByTitle selector (title attribute)',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
selectors: [DOMAIN_PAGE_ALT_TEXT],
|
|
49
|
+
schema: locatorSchema,
|
|
50
|
+
description: 'Playwright getByAltText selector (alt attribute)',
|
|
51
|
+
},
|
|
16
52
|
];
|
|
17
53
|
//# sourceMappingURL=domains.js.map
|
package/build/domains.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domains.js","sourceRoot":"","sources":["../src/domains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEjE,MAAM,CAAC,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,EAAE,CAAC,gBAAgB,CAAC;QAC7B,MAAM,EAAE,aAAa;QACrB,WAAW,EAAE,2CAA2C;KACxD;IACD;QACC,SAAS,EAAE,CAAC,iBAAiB,CAAC;QAC9B,MAAM,EAAE,aAAa;QACrB,WAAW,EAAE,kDAAkD;KAC/D;IACD;QACC,SAAS,EAAE,CAAC,oBAAoB,CAAC;QACjC,MAAM,EAAE,aAAa;QACrB,WAAW,EAAE,kDAAkD;KAC/D;CACD,CAAA"}
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TFeatureStep } from '@haibun/core/lib/defs.js';
|
|
2
|
+
import { TActionResult } from '@haibun/core/schema/protocol.js';
|
|
2
3
|
import { WebPlaywright } from "./web-playwright.js";
|
|
3
4
|
export declare const interactionSteps: (wp: WebPlaywright) => {
|
|
4
5
|
readonly press: {
|
|
5
6
|
readonly gwta: "press {key}";
|
|
6
7
|
readonly action: ({ key }: {
|
|
7
8
|
key: string;
|
|
8
|
-
}) => Promise<import("@haibun/core/
|
|
9
|
+
}) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
9
10
|
};
|
|
10
11
|
readonly type: {
|
|
11
12
|
readonly gwta: "type {text}";
|
|
12
13
|
readonly action: ({ text }: {
|
|
13
14
|
text: string;
|
|
14
|
-
}) => Promise<import("@haibun/core/
|
|
15
|
+
}) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
15
16
|
};
|
|
16
17
|
readonly inputVariable: {
|
|
17
18
|
readonly gwta: "input {what} for {field: string | page-locator}";
|
|
18
19
|
readonly action: ({ what, field }: {
|
|
19
20
|
what: string;
|
|
20
21
|
field: string;
|
|
21
|
-
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/
|
|
22
|
+
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
22
23
|
};
|
|
23
24
|
readonly selectionOption: {
|
|
24
25
|
readonly gwta: "select {option} for {field: string | page-locator}";
|
|
25
26
|
readonly action: ({ option, field }: {
|
|
26
27
|
option: string;
|
|
27
28
|
field: string;
|
|
28
|
-
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/
|
|
29
|
+
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
29
30
|
};
|
|
30
31
|
readonly dialogIs: {
|
|
31
32
|
readonly gwta: "dialog {what} {type} says {value}";
|
|
@@ -33,92 +34,80 @@ export declare const interactionSteps: (wp: WebPlaywright) => {
|
|
|
33
34
|
what: string;
|
|
34
35
|
type: string;
|
|
35
36
|
value: string;
|
|
36
|
-
}) => import("@haibun/core/
|
|
37
|
+
}) => import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult;
|
|
37
38
|
};
|
|
38
39
|
readonly dialogIsUnset: {
|
|
39
40
|
readonly gwta: "dialog {what} {type} not set";
|
|
40
41
|
readonly action: ({ what, type }: {
|
|
41
42
|
what: string;
|
|
42
43
|
type: string;
|
|
43
|
-
}) => import("@haibun/core/
|
|
44
|
+
}) => import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult;
|
|
44
45
|
};
|
|
45
46
|
readonly shouldSeeTestId: {
|
|
46
47
|
readonly gwta: "has test id {testId}";
|
|
47
48
|
readonly action: ({ testId }: {
|
|
48
49
|
testId: string;
|
|
49
|
-
}) => Promise<import("@haibun/core/
|
|
50
|
+
}) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
50
51
|
};
|
|
51
52
|
readonly seeText: {
|
|
52
53
|
readonly gwta: "see {text}";
|
|
53
54
|
readonly action: ({ text }: {
|
|
54
55
|
text: string;
|
|
55
|
-
}) => Promise<import("@haibun/core/
|
|
56
|
+
}) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
56
57
|
};
|
|
57
58
|
readonly waitFor: {
|
|
58
59
|
readonly gwta: "wait for {target: string | page-locator}";
|
|
59
60
|
readonly action: ({ target }: {
|
|
60
61
|
target: string;
|
|
61
|
-
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/
|
|
62
|
+
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
62
63
|
};
|
|
63
64
|
readonly onNewTab: {
|
|
64
65
|
readonly gwta: "on a new tab";
|
|
65
|
-
readonly action: () => import("@haibun/core/
|
|
66
|
+
readonly action: () => import("@haibun/core/schema/protocol.js").TOKActionResult;
|
|
66
67
|
};
|
|
67
68
|
readonly currentTabIs: {
|
|
68
69
|
readonly gwta: "current tab is {tab}";
|
|
69
70
|
readonly action: ({ tab }: {
|
|
70
71
|
tab: string;
|
|
71
|
-
}) => Promise<import("@haibun/core/
|
|
72
|
+
}) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
72
73
|
};
|
|
73
74
|
readonly onTabX: {
|
|
74
75
|
readonly gwta: "on tab {tab}";
|
|
75
76
|
readonly action: ({ tab }: {
|
|
76
77
|
tab: string;
|
|
77
|
-
}) => import("@haibun/core/
|
|
78
|
+
}) => import("@haibun/core/schema/protocol.js").TOKActionResult;
|
|
78
79
|
};
|
|
79
80
|
readonly beOnPage: {
|
|
80
81
|
readonly gwta: "be on the {name} webpage";
|
|
81
82
|
readonly action: ({ name }: {
|
|
82
83
|
name: string;
|
|
83
|
-
}) => Promise<import("@haibun/core/
|
|
84
|
+
}) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
84
85
|
};
|
|
85
86
|
readonly extensionContext: {
|
|
86
87
|
readonly expose: false;
|
|
87
88
|
readonly gwta: "open extension popup for tab {tab}";
|
|
88
89
|
readonly action: ({ tab }: {
|
|
89
90
|
tab: string;
|
|
90
|
-
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/
|
|
91
|
+
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
91
92
|
};
|
|
92
93
|
readonly cookieIs: {
|
|
93
94
|
readonly gwta: "cookie {name} is {value}";
|
|
94
95
|
readonly action: ({ name, value }: {
|
|
95
96
|
name: string;
|
|
96
97
|
value: string;
|
|
97
|
-
}) => Promise<import("@haibun/core/
|
|
98
|
+
}) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
98
99
|
};
|
|
99
100
|
readonly URIQueryParameterIs: {
|
|
100
101
|
readonly gwta: "URI query parameter {what} is {value}";
|
|
101
102
|
readonly action: ({ value }: {
|
|
102
103
|
value: string;
|
|
103
|
-
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/
|
|
104
|
-
};
|
|
105
|
-
readonly URIStartsWith: {
|
|
106
|
-
readonly gwta: "URI starts with {start}";
|
|
107
|
-
readonly action: ({ start }: {
|
|
108
|
-
start: string;
|
|
109
|
-
}) => Promise<import("@haibun/core/lib/defs.js").TOKActionResult | import("@haibun/core/lib/defs.js").TNotOKActionResult>;
|
|
110
|
-
};
|
|
111
|
-
readonly URIMatches: {
|
|
112
|
-
readonly gwta: "URI(case insensitively)? matches {what}";
|
|
113
|
-
readonly action: ({ what }: {
|
|
114
|
-
what: string;
|
|
115
|
-
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/lib/defs.js").TOKActionResult | import("@haibun/core/lib/defs.js").TNotOKActionResult>;
|
|
104
|
+
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
116
105
|
};
|
|
117
106
|
readonly click: {
|
|
118
107
|
readonly gwta: "click( invisible)? {target: string | page-locator}( with force)?";
|
|
119
108
|
readonly action: ({ target }: {
|
|
120
109
|
target: string;
|
|
121
|
-
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/
|
|
110
|
+
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
122
111
|
};
|
|
123
112
|
readonly inElement: {
|
|
124
113
|
readonly gwta: "in {container: string | page-locator}, {what: statement}";
|
|
@@ -134,116 +123,120 @@ export declare const interactionSteps: (wp: WebPlaywright) => {
|
|
|
134
123
|
readonly action: ({ target }: {
|
|
135
124
|
target: string;
|
|
136
125
|
method: string;
|
|
137
|
-
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/
|
|
126
|
+
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
138
127
|
};
|
|
139
128
|
readonly gotoPage: {
|
|
140
|
-
readonly gwta: "go to the {
|
|
129
|
+
readonly gwta: "go to the {name} webpage";
|
|
141
130
|
readonly action: ({ name }: {
|
|
142
131
|
name: string;
|
|
143
|
-
}) => Promise<import("@haibun/core/
|
|
132
|
+
}) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
133
|
+
};
|
|
134
|
+
readonly pageHasSettled: {
|
|
135
|
+
readonly gwta: "page has settled";
|
|
136
|
+
readonly action: () => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
144
137
|
};
|
|
145
138
|
readonly reloadPage: {
|
|
146
139
|
readonly gwta: "reload page";
|
|
147
|
-
readonly action: () => Promise<import("@haibun/core/
|
|
140
|
+
readonly action: () => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
148
141
|
};
|
|
149
142
|
readonly goBack: {
|
|
150
143
|
readonly gwta: "go back";
|
|
151
|
-
readonly action: () => Promise<import("@haibun/core/
|
|
144
|
+
readonly action: () => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
152
145
|
};
|
|
153
146
|
readonly blur: {
|
|
154
147
|
readonly gwta: "blur {what: string | page-locator}";
|
|
155
148
|
readonly action: ({ what }: {
|
|
156
149
|
what: string;
|
|
157
|
-
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/
|
|
150
|
+
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
158
151
|
};
|
|
159
152
|
readonly usingBrowserVar: {
|
|
160
153
|
readonly gwta: "using {browser} browser";
|
|
161
154
|
readonly action: ({ browser }: {
|
|
162
155
|
browser: string;
|
|
163
|
-
}) => import("@haibun/core/
|
|
156
|
+
}) => import("@haibun/core/schema/protocol.js").TOKActionResult;
|
|
164
157
|
};
|
|
165
158
|
readonly uploadFile: {
|
|
166
159
|
readonly gwta: "upload file {file} using {selector: string | page-locator}";
|
|
167
160
|
readonly action: ({ file, selector }: {
|
|
168
161
|
file: string;
|
|
169
162
|
selector: string;
|
|
170
|
-
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/
|
|
163
|
+
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
171
164
|
};
|
|
172
165
|
readonly waitForFileChooser: {
|
|
173
166
|
readonly gwta: "upload file {file} with {selector: string | page-locator}";
|
|
174
167
|
readonly action: ({ file, selector }: {
|
|
175
168
|
file: string;
|
|
176
169
|
selector: string;
|
|
177
|
-
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/
|
|
170
|
+
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
178
171
|
};
|
|
179
172
|
readonly expectDownload: {
|
|
180
173
|
readonly gwta: "expect a download";
|
|
181
|
-
readonly action: () => import("@haibun/core/
|
|
174
|
+
readonly action: () => import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult;
|
|
182
175
|
};
|
|
183
176
|
readonly receiveDownload: {
|
|
184
177
|
readonly gwta: "receive download as {file}";
|
|
185
178
|
readonly action: ({ file }: {
|
|
186
179
|
file: string;
|
|
187
|
-
}) => Promise<import("@haibun/core/
|
|
180
|
+
}) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
188
181
|
};
|
|
189
182
|
readonly waitForDownload: {
|
|
190
183
|
readonly gwta: "save download to {file}";
|
|
191
184
|
readonly action: ({ file }: {
|
|
192
185
|
file: string;
|
|
193
|
-
}) => Promise<import("@haibun/core/
|
|
186
|
+
}) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
194
187
|
};
|
|
195
188
|
readonly captureDialog: {
|
|
196
189
|
readonly gwta: "accept next dialog to {where}";
|
|
197
190
|
readonly action: ({ where }: {
|
|
198
191
|
where: string;
|
|
199
|
-
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/
|
|
192
|
+
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
200
193
|
};
|
|
201
194
|
readonly canvasIsEmpty: {
|
|
202
195
|
readonly gwta: "canvas {what} is empty";
|
|
203
196
|
readonly action: ({ what }: {
|
|
204
197
|
what: string;
|
|
205
|
-
}) => Promise<import("@haibun/core/
|
|
198
|
+
}) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
206
199
|
};
|
|
207
200
|
readonly takeScreenshotOf: {
|
|
208
201
|
readonly gwta: "take a screenshot of {what: string | page-locator} to {where}";
|
|
209
202
|
readonly action: ({ what, where }: {
|
|
210
203
|
what: string;
|
|
211
204
|
where: string;
|
|
212
|
-
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/
|
|
205
|
+
}, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult | import("@haibun/core/schema/protocol.js").TNotOKActionResult>;
|
|
213
206
|
};
|
|
214
207
|
readonly takeScreenshot: {
|
|
215
208
|
readonly gwta: "take a screenshot";
|
|
216
|
-
readonly action: (_args: import("@haibun/core/
|
|
209
|
+
readonly action: (_args: import("@haibun/core/schema/protocol.js").TStepArgs, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
217
210
|
};
|
|
218
211
|
readonly getPageContents: {
|
|
219
212
|
readonly gwta: "get page contents";
|
|
220
|
-
readonly action: () => Promise<import("@haibun/core/
|
|
213
|
+
readonly action: () => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
221
214
|
};
|
|
222
215
|
readonly takeAccessibilitySnapshot: {
|
|
223
216
|
readonly gwta: "take an accessibility snapshot";
|
|
224
|
-
readonly action: () => Promise<import("@haibun/core/
|
|
217
|
+
readonly action: () => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
225
218
|
};
|
|
226
219
|
readonly saveURIQueryParameter: {
|
|
227
220
|
readonly gwta: "save URI query parameter {what} to {where}";
|
|
228
221
|
readonly handlesUndefined: ["what", "where"];
|
|
229
|
-
readonly action: (
|
|
222
|
+
readonly action: (_args: Record<string, unknown>, featureStep: TFeatureStep) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
230
223
|
};
|
|
231
224
|
readonly resizeWindow: {
|
|
232
225
|
readonly gwta: "resize window to {width}x{height}";
|
|
233
226
|
readonly action: ({ width, height }: {
|
|
234
227
|
width: string;
|
|
235
228
|
height: string;
|
|
236
|
-
}) => Promise<import("@haibun/core/
|
|
229
|
+
}) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
237
230
|
};
|
|
238
231
|
readonly resizeAvailable: {
|
|
239
232
|
readonly gwta: "resize window to largest dimensions";
|
|
240
|
-
readonly action: () => Promise<import("@haibun/core/
|
|
233
|
+
readonly action: () => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
241
234
|
};
|
|
242
235
|
readonly usingTimeout: {
|
|
243
236
|
readonly gwta: "using timeout of {timeout}ms";
|
|
244
237
|
readonly action: ({ timeout }: {
|
|
245
238
|
timeout: string;
|
|
246
|
-
}) => Promise<import("@haibun/core/
|
|
239
|
+
}) => Promise<import("@haibun/core/schema/protocol.js").TOKActionResult>;
|
|
247
240
|
};
|
|
248
241
|
};
|
|
249
242
|
//# sourceMappingURL=interactionSteps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactionSteps.d.ts","sourceRoot":"","sources":["../src/interactionSteps.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"interactionSteps.d.ts","sourceRoot":"","sources":["../src/interactionSteps.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAc,aAAa,EAAe,MAAM,iCAAiC,CAAC;AAIzF,OAAO,EAAY,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAY9D,eAAO,MAAM,gBAAgB,GAAI,IAAI,aAAa;;;mCAIxB;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE;;;;oCAOd;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE;;;;2CAOT;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,eAAe,YAAY;;;;6CAOxD;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,eAAe,YAAY;;;;iDAO9D;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE;;;;0CAOpD;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE;;;;sCAO5B;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;oCAOpB;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE;;;;sCAId;YAAE,MA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,eAAe,YAAY;;;;mGAkBvD,YAAY;;;;;;;;;;;;;iCA4CzB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;6CAWX;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;uCAqBvC;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE;;CASd,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { OK, Origin } from
|
|
1
|
+
import { OK, Origin } from '@haibun/core/schema/protocol.js';
|
|
2
2
|
import { DOMAIN_STATEMENT, DOMAIN_STRING } from "@haibun/core/lib/domain-types.js";
|
|
3
3
|
import { actionNotOK, sleep, getStepTerm } from "@haibun/core/lib/util/index.js";
|
|
4
4
|
import { DOMAIN_PAGE_LOCATOR } from "./domains.js";
|
|
5
5
|
import { WEB_PAGE, WebPlaywright } from "./web-playwright.js";
|
|
6
6
|
import { BROWSERS } from "./BrowserFactory.js";
|
|
7
|
-
import { EExecutionMessageType } from "@haibun/core/lib/interfaces/logger.js";
|
|
8
7
|
import { actionOK } from "@haibun/core/lib/util/index.js";
|
|
9
8
|
import { pathToFileURL } from 'node:url';
|
|
10
9
|
import { provenanceFromFeatureStep } from "@haibun/core/steps/variables-stepper.js";
|
|
11
10
|
import { FlowRunner } from "@haibun/core/lib/core/flow-runner.js";
|
|
11
|
+
import { JsonArtifact } from '@haibun/core/schema/protocol.js';
|
|
12
12
|
const DOMAIN_STRING_OR_PAGE_LOCATOR = `${DOMAIN_STRING} | ${DOMAIN_PAGE_LOCATOR}`;
|
|
13
13
|
export const interactionSteps = (wp) => ({
|
|
14
14
|
// INPUT
|
|
@@ -154,7 +154,7 @@ export const interactionSteps = (wp) => ({
|
|
|
154
154
|
URIQueryParameterIs: {
|
|
155
155
|
gwta: 'URI query parameter {what} is {value}',
|
|
156
156
|
action: async ({ value }, featureStep) => {
|
|
157
|
-
const term = getStepTerm(featureStep, 'what');
|
|
157
|
+
const term = getStepTerm(featureStep, 'what') ?? '';
|
|
158
158
|
const uri = await wp.withPage(async (page) => await page.url());
|
|
159
159
|
const found = new URL(uri).searchParams.get(term);
|
|
160
160
|
if (found === value) {
|
|
@@ -163,22 +163,6 @@ export const interactionSteps = (wp) => ({
|
|
|
163
163
|
return actionNotOK(`URI query ${term} contains "${found}", not "${value}"`);
|
|
164
164
|
},
|
|
165
165
|
},
|
|
166
|
-
URIStartsWith: {
|
|
167
|
-
gwta: 'URI starts with {start}',
|
|
168
|
-
action: async ({ start }) => {
|
|
169
|
-
const uri = await wp.withPage(async (page) => await page.url());
|
|
170
|
-
return uri.startsWith(start) ? OK : actionNotOK(`current URI ${uri} does not start with ${start}`);
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
URIMatches: {
|
|
174
|
-
gwta: 'URI(case insensitively)? matches {what}',
|
|
175
|
-
action: async ({ what }, featureStep) => {
|
|
176
|
-
const modifier = featureStep.in.match(/ case insensitively /) ? 'i' : '';
|
|
177
|
-
const uri = await wp.withPage(async (page) => await page.url());
|
|
178
|
-
const matcher = new RegExp(what, modifier);
|
|
179
|
-
return uri.match(matcher) ? OK : actionNotOK(`current URI ${uri} does not match ${what}`);
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
166
|
// CLICK
|
|
183
167
|
click: {
|
|
184
168
|
gwta: `click( invisible)? {target: ${DOMAIN_STRING_OR_PAGE_LOCATOR}}( with force)?`,
|
|
@@ -200,7 +184,7 @@ export const interactionSteps = (wp) => ({
|
|
|
200
184
|
const result = await runner.runSteps(what);
|
|
201
185
|
wp.inContainer = undefined;
|
|
202
186
|
if (result.kind === 'ok') {
|
|
203
|
-
return result.
|
|
187
|
+
return result.topics;
|
|
204
188
|
}
|
|
205
189
|
else {
|
|
206
190
|
return actionNotOK(result.message);
|
|
@@ -213,7 +197,7 @@ export const interactionSteps = (wp) => ({
|
|
|
213
197
|
gwta: `click {target: ${DOMAIN_STRING_OR_PAGE_LOCATOR}} by {method}`,
|
|
214
198
|
handlesUndefined: ['method'],
|
|
215
199
|
action: async ({ target }, featureStep) => {
|
|
216
|
-
const method = getStepTerm(featureStep, 'method');
|
|
200
|
+
const method = getStepTerm(featureStep, 'method') ?? '';
|
|
217
201
|
let withModifier = {};
|
|
218
202
|
const bys = {
|
|
219
203
|
'alt text': (page) => page.getByAltText(target),
|
|
@@ -243,16 +227,24 @@ export const interactionSteps = (wp) => ({
|
|
|
243
227
|
},
|
|
244
228
|
// NAVIGATION
|
|
245
229
|
gotoPage: {
|
|
246
|
-
gwta: `go to the {
|
|
230
|
+
gwta: `go to the {name} ${WEB_PAGE}`,
|
|
247
231
|
action: async ({ name }) => {
|
|
248
232
|
const response = await wp.withPage(async (page) => {
|
|
249
|
-
|
|
233
|
+
const res = await page.goto(name);
|
|
234
|
+
await wp.waitForLoaded(page);
|
|
235
|
+
return res;
|
|
250
236
|
});
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
237
|
+
const topics = { ...(response?.allHeaders() || {}), summary: response?.statusText() };
|
|
238
|
+
return response?.ok() ? OK : actionNotOK(`response not ok`, { topics });
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
pageHasSettled: {
|
|
242
|
+
gwta: 'page has settled',
|
|
243
|
+
action: async () => {
|
|
244
|
+
await wp.withPage(async (page) => {
|
|
245
|
+
await wp.waitForLoaded(page);
|
|
246
|
+
});
|
|
247
|
+
return OK;
|
|
256
248
|
},
|
|
257
249
|
},
|
|
258
250
|
reloadPage: {
|
|
@@ -365,7 +357,6 @@ export const interactionSteps = (wp) => ({
|
|
|
365
357
|
type: dialog.type(),
|
|
366
358
|
};
|
|
367
359
|
await dialog.accept();
|
|
368
|
-
console.log('DEBUG: captureDialog handler triggered', { where, res });
|
|
369
360
|
if (!where) {
|
|
370
361
|
console.error('Error: captureDialog called with empty "where" argument');
|
|
371
362
|
return;
|
|
@@ -412,7 +403,7 @@ export const interactionSteps = (wp) => ({
|
|
|
412
403
|
throw Error(`no single ${what} from ${locator} `);
|
|
413
404
|
}
|
|
414
405
|
await locator.screenshot({ path: where });
|
|
415
|
-
wp.getWorld().
|
|
406
|
+
wp.getWorld().eventLogger.info(`screenshot of ${what} saved to ${pathToFileURL(where)} `);
|
|
416
407
|
});
|
|
417
408
|
return OK;
|
|
418
409
|
}
|
|
@@ -425,8 +416,8 @@ export const interactionSteps = (wp) => ({
|
|
|
425
416
|
gwta: 'take a screenshot',
|
|
426
417
|
action: async (_args, featureStep) => {
|
|
427
418
|
// Create a minimal step result for artifact tracking
|
|
428
|
-
const stepResult = featureStep ? { seqPath: featureStep.seqPath, path: featureStep.path, in: featureStep.in } : undefined;
|
|
429
|
-
await wp.captureScreenshotAndLog(
|
|
419
|
+
const stepResult = featureStep ? { seqPath: featureStep.seqPath, path: featureStep.source.path, in: featureStep.in } : undefined;
|
|
420
|
+
await wp.captureScreenshotAndLog('action', { step: stepResult });
|
|
430
421
|
return OK;
|
|
431
422
|
},
|
|
432
423
|
},
|
|
@@ -434,39 +425,40 @@ export const interactionSteps = (wp) => ({
|
|
|
434
425
|
gwta: 'get page contents',
|
|
435
426
|
action: async () => {
|
|
436
427
|
const contents = await wp.withPage(async (page) => await page.content());
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
artifact: {
|
|
440
|
-
artifactType: 'html',
|
|
441
|
-
html: contents || ''
|
|
442
|
-
}
|
|
443
|
-
};
|
|
444
|
-
return actionOK(messageContext);
|
|
428
|
+
// Use topics to return content
|
|
429
|
+
return actionOK({ topics: { html: contents || '' } });
|
|
445
430
|
},
|
|
446
431
|
},
|
|
447
432
|
takeAccessibilitySnapshot: {
|
|
448
433
|
gwta: 'take an accessibility snapshot',
|
|
449
434
|
action: async () => {
|
|
450
435
|
const snapshot = await wp.captureAccessibilitySnapshot();
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
436
|
+
// Emit JsonArtifact
|
|
437
|
+
if (wp.getWorld().eventLogger) {
|
|
438
|
+
const artifactEvent = JsonArtifact.parse({
|
|
439
|
+
id: `a11y-snapshot-${Date.now()}`,
|
|
440
|
+
timestamp: Date.now(),
|
|
441
|
+
kind: 'artifact',
|
|
442
|
+
artifactType: 'json',
|
|
443
|
+
json: snapshot || {},
|
|
444
|
+
mimetype: 'application/json'
|
|
445
|
+
});
|
|
446
|
+
// We don't have featureStep here?
|
|
447
|
+
// The action has featureStep in signature if we added it.
|
|
448
|
+
// But we can use emit() directly or ignore featureStep association if not critical.
|
|
449
|
+
// Better: add featureStep to action signature. But typings?
|
|
450
|
+
wp.getWorld().eventLogger.emit(artifactEvent);
|
|
451
|
+
}
|
|
452
|
+
wp.getWorld().eventLogger.info('Accessibility snapshot captured');
|
|
461
453
|
return OK;
|
|
462
454
|
},
|
|
463
455
|
},
|
|
464
456
|
saveURIQueryParameter: {
|
|
465
457
|
gwta: 'save URI query parameter {what} to {where}',
|
|
466
458
|
handlesUndefined: ['what', 'where'],
|
|
467
|
-
action: async (
|
|
468
|
-
const what = getStepTerm(featureStep, 'what');
|
|
469
|
-
const where = getStepTerm(featureStep, 'where');
|
|
459
|
+
action: async (_args, featureStep) => {
|
|
460
|
+
const what = getStepTerm(featureStep, 'what') ?? '';
|
|
461
|
+
const where = getStepTerm(featureStep, 'where') ?? '';
|
|
470
462
|
const uri = await wp.withPage(async (page) => await page.url());
|
|
471
463
|
const found = new URL(uri).searchParams.get(what);
|
|
472
464
|
wp.getWorld().shared.set({ term: where, value: found, domain: 'string', origin: Origin.var }, provenanceFromFeatureStep(featureStep));
|