@browserstack/mcp-server 1.2.8 → 1.2.9-beta.1
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/README.md +0 -10
- package/dist/lib/utils.d.ts +38 -16
- package/dist/tools/accessibility.js +2 -3
- package/dist/tools/appautomate-utils/appium-sdk/constants.d.ts +13 -23
- package/dist/tools/appautomate-utils/appium-sdk/formatter.js +0 -1
- package/dist/tools/appautomate-utils/appium-sdk/handler.js +0 -1
- package/dist/tools/appautomate-utils/native-execution/constants.d.ts +11 -21
- package/dist/tools/appautomate.js +0 -2
- package/dist/tools/applive.js +0 -1
- package/dist/tools/automate.js +1 -2
- package/dist/tools/get-failure-logs.js +1 -3
- package/dist/tools/live.js +0 -1
- package/dist/tools/observability.js +0 -1
- package/dist/tools/rca-agent-utils/constants.d.ts +2 -2
- package/dist/tools/sdk-utils/common/schema.d.ts +40 -90
- package/dist/tools/sdk-utils/handler.js +1 -1
- package/dist/tools/testmanagement-utils/TCG-utils/types.d.ts +1 -9
- package/dist/tools/testmanagement-utils/add-test-result.d.ts +2 -24
- package/dist/tools/testmanagement-utils/create-lca-steps.d.ts +4 -72
- package/dist/tools/testmanagement-utils/create-lca-steps.js +0 -1
- package/dist/tools/testmanagement-utils/create-project-folder.d.ts +1 -15
- package/dist/tools/testmanagement-utils/create-testcase.d.ts +5 -55
- package/dist/tools/testmanagement-utils/create-testcase.js +0 -1
- package/dist/tools/testmanagement-utils/create-testrun.d.ts +14 -63
- package/dist/tools/testmanagement-utils/list-testcases.d.ts +1 -13
- package/dist/tools/testmanagement-utils/list-testcases.js +0 -1
- package/dist/tools/testmanagement-utils/list-testruns.d.ts +1 -7
- package/dist/tools/testmanagement-utils/list-testruns.js +0 -1
- package/dist/tools/testmanagement-utils/testcase-from-file.js +0 -1
- package/dist/tools/testmanagement-utils/update-testcase.d.ts +29 -0
- package/dist/tools/testmanagement-utils/update-testcase.js +138 -0
- package/dist/tools/testmanagement-utils/update-testrun.d.ts +10 -23
- package/dist/tools/testmanagement-utils/update-testrun.js +0 -1
- package/dist/tools/testmanagement-utils/upload-file.d.ts +1 -7
- package/dist/tools/testmanagement-utils/upload-file.js +0 -2
- package/dist/tools/testmanagement.d.ts +5 -0
- package/dist/tools/testmanagement.js +24 -10
- package/package.json +24 -24
package/README.md
CHANGED
|
@@ -288,20 +288,10 @@ Select the “Installed” tab. Click the “Configure MCP Servers” button at
|
|
|
288
288
|
}
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
### Installing via Smithery
|
|
292
|
-
|
|
293
|
-
To install BrowserStack Test Platform Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@browserstack/mcp-server):
|
|
294
|
-
|
|
295
|
-
```bash
|
|
296
|
-
npx -y @smithery/cli install @browserstack/mcp-server --client claude
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
|
|
300
291
|
### 💡 List of BrowserStack MCP Tools
|
|
301
292
|
|
|
302
293
|
As of now we support 20 tools.
|
|
303
294
|
|
|
304
|
-
|
|
305
295
|
---
|
|
306
296
|
|
|
307
297
|
## 🧾 Test Management
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -8,71 +8,93 @@ export declare function fetchFromBrowserStackAPI(url: string, config: BrowserSta
|
|
|
8
8
|
export declare function handleMCPError(toolName: string, server: McpServer, config: BrowserStackConfig, error: unknown): {
|
|
9
9
|
[x: string]: unknown;
|
|
10
10
|
content: ({
|
|
11
|
-
[x: string]: unknown;
|
|
12
11
|
type: "text";
|
|
13
12
|
text: string;
|
|
13
|
+
annotations?: {
|
|
14
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
15
|
+
priority?: number | undefined;
|
|
16
|
+
lastModified?: string | undefined;
|
|
17
|
+
} | undefined;
|
|
14
18
|
_meta?: {
|
|
15
19
|
[x: string]: unknown;
|
|
16
20
|
} | undefined;
|
|
17
21
|
} | {
|
|
18
|
-
[x: string]: unknown;
|
|
19
22
|
type: "image";
|
|
20
23
|
data: string;
|
|
21
24
|
mimeType: string;
|
|
25
|
+
annotations?: {
|
|
26
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
27
|
+
priority?: number | undefined;
|
|
28
|
+
lastModified?: string | undefined;
|
|
29
|
+
} | undefined;
|
|
22
30
|
_meta?: {
|
|
23
31
|
[x: string]: unknown;
|
|
24
32
|
} | undefined;
|
|
25
33
|
} | {
|
|
26
|
-
[x: string]: unknown;
|
|
27
34
|
type: "audio";
|
|
28
35
|
data: string;
|
|
29
36
|
mimeType: string;
|
|
37
|
+
annotations?: {
|
|
38
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
39
|
+
priority?: number | undefined;
|
|
40
|
+
lastModified?: string | undefined;
|
|
41
|
+
} | undefined;
|
|
30
42
|
_meta?: {
|
|
31
43
|
[x: string]: unknown;
|
|
32
44
|
} | undefined;
|
|
33
45
|
} | {
|
|
34
|
-
[x: string]: unknown;
|
|
35
|
-
type: "resource_link";
|
|
36
|
-
name: string;
|
|
37
46
|
uri: string;
|
|
47
|
+
name: string;
|
|
48
|
+
type: "resource_link";
|
|
49
|
+
description?: string | undefined;
|
|
50
|
+
mimeType?: string | undefined;
|
|
51
|
+
annotations?: {
|
|
52
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
53
|
+
priority?: number | undefined;
|
|
54
|
+
lastModified?: string | undefined;
|
|
55
|
+
} | undefined;
|
|
38
56
|
_meta?: {
|
|
39
57
|
[x: string]: unknown;
|
|
40
58
|
} | undefined;
|
|
41
|
-
mimeType?: string | undefined;
|
|
42
|
-
title?: string | undefined;
|
|
43
|
-
description?: string | undefined;
|
|
44
59
|
icons?: {
|
|
45
|
-
[x: string]: unknown;
|
|
46
60
|
src: string;
|
|
47
61
|
mimeType?: string | undefined;
|
|
48
62
|
sizes?: string[] | undefined;
|
|
63
|
+
theme?: "light" | "dark" | undefined;
|
|
49
64
|
}[] | undefined;
|
|
65
|
+
title?: string | undefined;
|
|
50
66
|
} | {
|
|
51
|
-
[x: string]: unknown;
|
|
52
67
|
type: "resource";
|
|
53
68
|
resource: {
|
|
54
|
-
[x: string]: unknown;
|
|
55
|
-
text: string;
|
|
56
69
|
uri: string;
|
|
70
|
+
text: string;
|
|
71
|
+
mimeType?: string | undefined;
|
|
57
72
|
_meta?: {
|
|
58
73
|
[x: string]: unknown;
|
|
59
74
|
} | undefined;
|
|
60
|
-
mimeType?: string | undefined;
|
|
61
75
|
} | {
|
|
62
|
-
[x: string]: unknown;
|
|
63
76
|
uri: string;
|
|
64
77
|
blob: string;
|
|
78
|
+
mimeType?: string | undefined;
|
|
65
79
|
_meta?: {
|
|
66
80
|
[x: string]: unknown;
|
|
67
81
|
} | undefined;
|
|
68
|
-
mimeType?: string | undefined;
|
|
69
82
|
};
|
|
83
|
+
annotations?: {
|
|
84
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
85
|
+
priority?: number | undefined;
|
|
86
|
+
lastModified?: string | undefined;
|
|
87
|
+
} | undefined;
|
|
70
88
|
_meta?: {
|
|
71
89
|
[x: string]: unknown;
|
|
72
90
|
} | undefined;
|
|
73
91
|
})[];
|
|
74
92
|
_meta?: {
|
|
75
93
|
[x: string]: unknown;
|
|
94
|
+
progressToken?: string | number | undefined;
|
|
95
|
+
"io.modelcontextprotocol/related-task"?: {
|
|
96
|
+
taskId: string;
|
|
97
|
+
} | undefined;
|
|
76
98
|
} | undefined;
|
|
77
99
|
structuredContent?: {
|
|
78
100
|
[x: string]: unknown;
|
|
@@ -12,16 +12,15 @@ function setupAuth(config) {
|
|
|
12
12
|
const [username, password] = authString.split(":");
|
|
13
13
|
return { username, password };
|
|
14
14
|
}
|
|
15
|
-
function createErrorResponse(message
|
|
15
|
+
function createErrorResponse(message) {
|
|
16
16
|
return {
|
|
17
17
|
content: [
|
|
18
18
|
{
|
|
19
19
|
type: "text",
|
|
20
20
|
text: message,
|
|
21
|
-
isError,
|
|
22
21
|
},
|
|
23
22
|
],
|
|
24
|
-
isError,
|
|
23
|
+
isError: true,
|
|
25
24
|
};
|
|
26
25
|
}
|
|
27
26
|
function createSuccessResponse(messages) {
|
|
@@ -13,36 +13,26 @@ export declare const APP_DEVICE_CONFIGS: {
|
|
|
13
13
|
export declare const STEP_DELIMITER = "---STEP---";
|
|
14
14
|
export declare const DEFAULT_APP_PATH = "bs://sample.app";
|
|
15
15
|
export declare const MobileDeviceSchema: z.ZodObject<{
|
|
16
|
-
platform: z.ZodEnum<
|
|
16
|
+
platform: z.ZodEnum<{
|
|
17
|
+
android: "android";
|
|
18
|
+
ios: "ios";
|
|
19
|
+
}>;
|
|
17
20
|
deviceName: z.ZodString;
|
|
18
21
|
osVersion: z.ZodString;
|
|
19
|
-
},
|
|
20
|
-
platform: "android" | "ios";
|
|
21
|
-
deviceName: string;
|
|
22
|
-
osVersion: string;
|
|
23
|
-
}, {
|
|
24
|
-
platform: "android" | "ios";
|
|
25
|
-
deviceName: string;
|
|
26
|
-
osVersion: string;
|
|
27
|
-
}>;
|
|
22
|
+
}, z.core.$strip>;
|
|
28
23
|
export declare const SETUP_APP_AUTOMATE_DESCRIPTION = "Set up BrowserStack App Automate SDK integration for Appium-based mobile app testing. ONLY for Appium based framework . This tool configures SDK for various languages with appium. For pre-built Espresso or XCUITest test suites, use 'runAppTestsOnBrowserStack' instead.";
|
|
29
24
|
export declare const SETUP_APP_AUTOMATE_SCHEMA: {
|
|
30
|
-
detectedFramework: z.
|
|
31
|
-
detectedTestingFramework: z.
|
|
32
|
-
detectedLanguage: z.
|
|
25
|
+
detectedFramework: z.ZodEnum<typeof AppSDKSupportedFrameworkEnum>;
|
|
26
|
+
detectedTestingFramework: z.ZodEnum<typeof AppSDKSupportedTestingFrameworkEnum>;
|
|
27
|
+
detectedLanguage: z.ZodEnum<typeof AppSDKSupportedLanguageEnum>;
|
|
33
28
|
devices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
34
|
-
platform: z.ZodEnum<
|
|
29
|
+
platform: z.ZodEnum<{
|
|
30
|
+
android: "android";
|
|
31
|
+
ios: "ios";
|
|
32
|
+
}>;
|
|
35
33
|
deviceName: z.ZodString;
|
|
36
34
|
osVersion: z.ZodString;
|
|
37
|
-
},
|
|
38
|
-
platform: "android" | "ios";
|
|
39
|
-
deviceName: string;
|
|
40
|
-
osVersion: string;
|
|
41
|
-
}, {
|
|
42
|
-
platform: "android" | "ios";
|
|
43
|
-
deviceName: string;
|
|
44
|
-
osVersion: string;
|
|
45
|
-
}>, "many">>;
|
|
35
|
+
}, z.core.$strip>>>;
|
|
46
36
|
appPath: z.ZodString;
|
|
47
37
|
project: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
48
38
|
};
|
|
@@ -2,34 +2,24 @@ import { z } from "zod";
|
|
|
2
2
|
import { AppTestPlatform } from "./types.js";
|
|
3
3
|
export declare const RUN_APP_AUTOMATE_DESCRIPTION = "Execute pre-built native mobile test suites (Espresso for Android, XCUITest for iOS) by direct upload to BrowserStack. ONLY for compiled .apk/.ipa test files. This is NOT for SDK integration or Appium tests. For Appium-based testing with SDK setup, use 'setupBrowserStackAppAutomateTests' instead.";
|
|
4
4
|
export declare const MobileDeviceSchema: z.ZodObject<{
|
|
5
|
-
platform: z.ZodEnum<
|
|
5
|
+
platform: z.ZodEnum<{
|
|
6
|
+
android: "android";
|
|
7
|
+
ios: "ios";
|
|
8
|
+
}>;
|
|
6
9
|
deviceName: z.ZodString;
|
|
7
10
|
osVersion: z.ZodString;
|
|
8
|
-
},
|
|
9
|
-
platform: "android" | "ios";
|
|
10
|
-
deviceName: string;
|
|
11
|
-
osVersion: string;
|
|
12
|
-
}, {
|
|
13
|
-
platform: "android" | "ios";
|
|
14
|
-
deviceName: string;
|
|
15
|
-
osVersion: string;
|
|
16
|
-
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
17
12
|
export declare const RUN_APP_AUTOMATE_SCHEMA: {
|
|
18
13
|
appPath: z.ZodString;
|
|
19
14
|
testSuitePath: z.ZodString;
|
|
20
15
|
devices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
21
|
-
platform: z.ZodEnum<
|
|
16
|
+
platform: z.ZodEnum<{
|
|
17
|
+
android: "android";
|
|
18
|
+
ios: "ios";
|
|
19
|
+
}>;
|
|
22
20
|
deviceName: z.ZodString;
|
|
23
21
|
osVersion: z.ZodString;
|
|
24
|
-
},
|
|
25
|
-
platform: "android" | "ios";
|
|
26
|
-
deviceName: string;
|
|
27
|
-
osVersion: string;
|
|
28
|
-
}, {
|
|
29
|
-
platform: "android" | "ios";
|
|
30
|
-
deviceName: string;
|
|
31
|
-
osVersion: string;
|
|
32
|
-
}>, "many">>;
|
|
22
|
+
}, z.core.$strip>>>;
|
|
33
23
|
project: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
34
|
-
detectedAutomationFramework: z.
|
|
24
|
+
detectedAutomationFramework: z.ZodEnum<typeof AppTestPlatform>;
|
|
35
25
|
};
|
|
@@ -81,7 +81,6 @@ async function takeAppScreenshot(args) {
|
|
|
81
81
|
type: "image",
|
|
82
82
|
data: compressed,
|
|
83
83
|
mimeType: "image/png",
|
|
84
|
-
name: `screenshot-${selectedDevice.device}-${Date.now()}`,
|
|
85
84
|
},
|
|
86
85
|
],
|
|
87
86
|
};
|
|
@@ -257,7 +256,6 @@ export default function addAppAutomationTools(server, config) {
|
|
|
257
256
|
{
|
|
258
257
|
type: "text",
|
|
259
258
|
text: `Failed to bootstrap project with BrowserStack App Automate SDK. Error: ${error_message}. Please open an issue on GitHub if the problem persists`,
|
|
260
|
-
isError: true,
|
|
261
259
|
},
|
|
262
260
|
],
|
|
263
261
|
isError: true,
|
package/dist/tools/applive.js
CHANGED
package/dist/tools/automate.js
CHANGED
|
@@ -20,10 +20,9 @@ export async function fetchAutomationScreenshotsTool(args, config) {
|
|
|
20
20
|
}
|
|
21
21
|
const results = screenshots.map((screenshot, index) => ({
|
|
22
22
|
type: "image",
|
|
23
|
-
text: `Screenshot ${index + 1}`,
|
|
24
23
|
data: screenshot.base64,
|
|
25
24
|
mimeType: "image/png",
|
|
26
|
-
|
|
25
|
+
_meta: { url: screenshot.url, index: index + 1 },
|
|
27
26
|
}));
|
|
28
27
|
return {
|
|
29
28
|
content: [
|
|
@@ -41,9 +41,9 @@ export async function getFailureLogs(args, config) {
|
|
|
41
41
|
{
|
|
42
42
|
type: "text",
|
|
43
43
|
text: `No valid log types found for ${args.sessionType} session.\nErrors encountered:\n${errors.join("\n")}`,
|
|
44
|
-
isError: true,
|
|
45
44
|
},
|
|
46
45
|
],
|
|
46
|
+
isError: true,
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
let response;
|
|
@@ -91,7 +91,6 @@ export async function getFailureLogs(args, config) {
|
|
|
91
91
|
results.push({
|
|
92
92
|
type: "text",
|
|
93
93
|
text: `Errors encountered:\n${errors.join("\n")}`,
|
|
94
|
-
isError: true,
|
|
95
94
|
});
|
|
96
95
|
}
|
|
97
96
|
return { content: results };
|
|
@@ -132,7 +131,6 @@ export default function registerGetFailureLogs(server, config) {
|
|
|
132
131
|
{
|
|
133
132
|
type: "text",
|
|
134
133
|
text: `Failed to fetch failure logs: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
135
|
-
isError: true,
|
|
136
134
|
},
|
|
137
135
|
],
|
|
138
136
|
isError: true,
|
package/dist/tools/live.js
CHANGED
|
@@ -52,7 +52,6 @@ export default function addObservabilityTools(server, config) {
|
|
|
52
52
|
{
|
|
53
53
|
type: "text",
|
|
54
54
|
text: `Failed to get failures in the last run. Error: ${error}. Please open an issue on GitHub if this is an issue with BrowserStack`,
|
|
55
|
-
isError: true,
|
|
56
55
|
},
|
|
57
56
|
],
|
|
58
57
|
isError: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { TestStatus } from "./types.js";
|
|
3
3
|
export declare const FETCH_RCA_PARAMS: {
|
|
4
|
-
testId: z.ZodArray<z.ZodNumber
|
|
4
|
+
testId: z.ZodArray<z.ZodNumber>;
|
|
5
5
|
};
|
|
6
6
|
export declare const GET_BUILD_ID_PARAMS: {
|
|
7
7
|
browserStackProjectName: z.ZodString;
|
|
@@ -9,5 +9,5 @@ export declare const GET_BUILD_ID_PARAMS: {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const LIST_TEST_IDS_PARAMS: {
|
|
11
11
|
buildId: z.ZodString;
|
|
12
|
-
status: z.
|
|
12
|
+
status: z.ZodEnum<typeof TestStatus>;
|
|
13
13
|
};
|
|
@@ -15,123 +15,73 @@ export declare const MacOSPlatformEnum: {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const SetUpPercyParamsShape: {
|
|
17
17
|
projectName: z.ZodString;
|
|
18
|
-
detectedLanguage: z.
|
|
19
|
-
detectedBrowserAutomationFramework: z.
|
|
20
|
-
detectedTestingFramework: z.
|
|
21
|
-
integrationType: z.
|
|
22
|
-
folderPaths: z.ZodOptional<z.ZodArray<z.ZodString
|
|
23
|
-
filePaths: z.ZodOptional<z.ZodArray<z.ZodString
|
|
18
|
+
detectedLanguage: z.ZodEnum<typeof SDKSupportedLanguageEnum>;
|
|
19
|
+
detectedBrowserAutomationFramework: z.ZodEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
|
|
20
|
+
detectedTestingFramework: z.ZodEnum<typeof SDKSupportedTestingFrameworkEnum>;
|
|
21
|
+
integrationType: z.ZodEnum<typeof PercyIntegrationTypeEnum>;
|
|
22
|
+
folderPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
+
filePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
24
|
};
|
|
25
25
|
export declare const RunTestsOnBrowserStackParamsShape: {
|
|
26
26
|
projectName: z.ZodString;
|
|
27
|
-
detectedLanguage: z.
|
|
28
|
-
detectedBrowserAutomationFramework: z.
|
|
29
|
-
detectedTestingFramework: z.
|
|
27
|
+
detectedLanguage: z.ZodEnum<typeof SDKSupportedLanguageEnum>;
|
|
28
|
+
detectedBrowserAutomationFramework: z.ZodEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
|
|
29
|
+
detectedTestingFramework: z.ZodEnum<typeof SDKSupportedTestingFrameworkEnum>;
|
|
30
30
|
devices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
31
|
-
platform: z.ZodEnum<
|
|
31
|
+
platform: z.ZodEnum<{
|
|
32
|
+
android: "android";
|
|
33
|
+
windows: "windows";
|
|
34
|
+
macos: "macos";
|
|
35
|
+
ios: "ios";
|
|
36
|
+
}>;
|
|
32
37
|
deviceName: z.ZodOptional<z.ZodString>;
|
|
33
38
|
osVersion: z.ZodString;
|
|
34
39
|
browser: z.ZodOptional<z.ZodString>;
|
|
35
40
|
browserVersion: z.ZodOptional<z.ZodString>;
|
|
36
|
-
},
|
|
37
|
-
platform: "android" | "windows" | "macos" | "ios";
|
|
38
|
-
osVersion: string;
|
|
39
|
-
deviceName?: string | undefined;
|
|
40
|
-
browser?: string | undefined;
|
|
41
|
-
browserVersion?: string | undefined;
|
|
42
|
-
}, {
|
|
43
|
-
platform: "android" | "windows" | "macos" | "ios";
|
|
44
|
-
osVersion: string;
|
|
45
|
-
deviceName?: string | undefined;
|
|
46
|
-
browser?: string | undefined;
|
|
47
|
-
browserVersion?: string | undefined;
|
|
48
|
-
}>, "many">>;
|
|
41
|
+
}, z.core.$strip>>>;
|
|
49
42
|
};
|
|
50
43
|
export declare const SetUpPercySchema: z.ZodObject<{
|
|
51
44
|
projectName: z.ZodString;
|
|
52
|
-
detectedLanguage: z.
|
|
53
|
-
detectedBrowserAutomationFramework: z.
|
|
54
|
-
detectedTestingFramework: z.
|
|
55
|
-
integrationType: z.
|
|
56
|
-
folderPaths: z.ZodOptional<z.ZodArray<z.ZodString
|
|
57
|
-
filePaths: z.ZodOptional<z.ZodArray<z.ZodString
|
|
58
|
-
},
|
|
59
|
-
projectName: string;
|
|
60
|
-
detectedLanguage: SDKSupportedLanguageEnum;
|
|
61
|
-
detectedBrowserAutomationFramework: SDKSupportedBrowserAutomationFrameworkEnum;
|
|
62
|
-
detectedTestingFramework: SDKSupportedTestingFrameworkEnum;
|
|
63
|
-
integrationType: PercyIntegrationTypeEnum;
|
|
64
|
-
folderPaths?: string[] | undefined;
|
|
65
|
-
filePaths?: string[] | undefined;
|
|
66
|
-
}, {
|
|
67
|
-
projectName: string;
|
|
68
|
-
detectedLanguage: SDKSupportedLanguageEnum;
|
|
69
|
-
detectedBrowserAutomationFramework: SDKSupportedBrowserAutomationFrameworkEnum;
|
|
70
|
-
detectedTestingFramework: SDKSupportedTestingFrameworkEnum;
|
|
71
|
-
integrationType: PercyIntegrationTypeEnum;
|
|
72
|
-
folderPaths?: string[] | undefined;
|
|
73
|
-
filePaths?: string[] | undefined;
|
|
74
|
-
}>;
|
|
45
|
+
detectedLanguage: z.ZodEnum<typeof SDKSupportedLanguageEnum>;
|
|
46
|
+
detectedBrowserAutomationFramework: z.ZodEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
|
|
47
|
+
detectedTestingFramework: z.ZodEnum<typeof SDKSupportedTestingFrameworkEnum>;
|
|
48
|
+
integrationType: z.ZodEnum<typeof PercyIntegrationTypeEnum>;
|
|
49
|
+
folderPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
|
+
filePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
+
}, z.core.$strip>;
|
|
75
52
|
export declare const RunTestsOnBrowserStackSchema: z.ZodObject<{
|
|
76
53
|
projectName: z.ZodString;
|
|
77
|
-
detectedLanguage: z.
|
|
78
|
-
detectedBrowserAutomationFramework: z.
|
|
79
|
-
detectedTestingFramework: z.
|
|
54
|
+
detectedLanguage: z.ZodEnum<typeof SDKSupportedLanguageEnum>;
|
|
55
|
+
detectedBrowserAutomationFramework: z.ZodEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
|
|
56
|
+
detectedTestingFramework: z.ZodEnum<typeof SDKSupportedTestingFrameworkEnum>;
|
|
80
57
|
devices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
81
|
-
platform: z.ZodEnum<
|
|
58
|
+
platform: z.ZodEnum<{
|
|
59
|
+
android: "android";
|
|
60
|
+
windows: "windows";
|
|
61
|
+
macos: "macos";
|
|
62
|
+
ios: "ios";
|
|
63
|
+
}>;
|
|
82
64
|
deviceName: z.ZodOptional<z.ZodString>;
|
|
83
65
|
osVersion: z.ZodString;
|
|
84
66
|
browser: z.ZodOptional<z.ZodString>;
|
|
85
67
|
browserVersion: z.ZodOptional<z.ZodString>;
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
osVersion: string;
|
|
89
|
-
deviceName?: string | undefined;
|
|
90
|
-
browser?: string | undefined;
|
|
91
|
-
browserVersion?: string | undefined;
|
|
92
|
-
}, {
|
|
93
|
-
platform: "android" | "windows" | "macos" | "ios";
|
|
94
|
-
osVersion: string;
|
|
95
|
-
deviceName?: string | undefined;
|
|
96
|
-
browser?: string | undefined;
|
|
97
|
-
browserVersion?: string | undefined;
|
|
98
|
-
}>, "many">>;
|
|
99
|
-
}, "strip", z.ZodTypeAny, {
|
|
100
|
-
projectName: string;
|
|
101
|
-
detectedLanguage: SDKSupportedLanguageEnum;
|
|
102
|
-
detectedBrowserAutomationFramework: SDKSupportedBrowserAutomationFrameworkEnum;
|
|
103
|
-
detectedTestingFramework: SDKSupportedTestingFrameworkEnum;
|
|
104
|
-
devices: {
|
|
105
|
-
platform: "android" | "windows" | "macos" | "ios";
|
|
106
|
-
osVersion: string;
|
|
107
|
-
deviceName?: string | undefined;
|
|
108
|
-
browser?: string | undefined;
|
|
109
|
-
browserVersion?: string | undefined;
|
|
110
|
-
}[];
|
|
111
|
-
}, {
|
|
112
|
-
projectName: string;
|
|
113
|
-
detectedLanguage: SDKSupportedLanguageEnum;
|
|
114
|
-
detectedBrowserAutomationFramework: SDKSupportedBrowserAutomationFrameworkEnum;
|
|
115
|
-
detectedTestingFramework: SDKSupportedTestingFrameworkEnum;
|
|
116
|
-
devices?: {
|
|
117
|
-
platform: "android" | "windows" | "macos" | "ios";
|
|
118
|
-
osVersion: string;
|
|
119
|
-
deviceName?: string | undefined;
|
|
120
|
-
browser?: string | undefined;
|
|
121
|
-
browserVersion?: string | undefined;
|
|
122
|
-
}[] | undefined;
|
|
123
|
-
}>;
|
|
68
|
+
}, z.core.$strip>>>;
|
|
69
|
+
}, z.core.$strip>;
|
|
124
70
|
export type SetUpPercyInput = z.infer<typeof SetUpPercySchema>;
|
|
125
71
|
export type RunTestsOnBrowserStackInput = z.infer<typeof RunTestsOnBrowserStackSchema>;
|
|
126
72
|
export declare const RunPercyScanParamsShape: {
|
|
127
73
|
projectName: z.ZodString;
|
|
128
74
|
percyRunCommand: z.ZodOptional<z.ZodString>;
|
|
129
|
-
integrationType: z.
|
|
75
|
+
integrationType: z.ZodEnum<typeof PercyIntegrationTypeEnum>;
|
|
130
76
|
};
|
|
131
77
|
export declare const FetchPercyChangesParamsShape: {
|
|
132
78
|
project_name: z.ZodString;
|
|
133
79
|
};
|
|
134
80
|
export declare const ManagePercyBuildApprovalParamsShape: {
|
|
135
81
|
buildId: z.ZodString;
|
|
136
|
-
action: z.ZodEnum<
|
|
82
|
+
action: z.ZodEnum<{
|
|
83
|
+
approve: "approve";
|
|
84
|
+
unapprove: "unapprove";
|
|
85
|
+
reject: "reject";
|
|
86
|
+
}>;
|
|
137
87
|
};
|
|
@@ -143,7 +143,7 @@ export async function simulatePercyChangeHandler(rawInput, config) {
|
|
|
143
143
|
}
|
|
144
144
|
if (Array.isArray(percyInstruction.content)) {
|
|
145
145
|
percyInstruction.content = percyInstruction.content.map((item) => {
|
|
146
|
-
if (typeof item.text === "string") {
|
|
146
|
+
if (item.type === "text" && typeof item.text === "string") {
|
|
147
147
|
const updatedText = item.text
|
|
148
148
|
.replace(PERCY_REPLACE_REGEX, PERCY_SIMULATE_INSTRUCTION)
|
|
149
149
|
.replace(PERCY_VERIFICATION_REGEX, "");
|
|
@@ -3,15 +3,7 @@ export declare const CreateTestCasesFromFileSchema: z.ZodObject<{
|
|
|
3
3
|
documentId: z.ZodString;
|
|
4
4
|
folderId: z.ZodString;
|
|
5
5
|
projectReferenceId: z.ZodString;
|
|
6
|
-
},
|
|
7
|
-
documentId: string;
|
|
8
|
-
folderId: string;
|
|
9
|
-
projectReferenceId: string;
|
|
10
|
-
}, {
|
|
11
|
-
documentId: string;
|
|
12
|
-
folderId: string;
|
|
13
|
-
projectReferenceId: string;
|
|
14
|
-
}>;
|
|
6
|
+
}, z.core.$strip>;
|
|
15
7
|
export type CreateTestCasesFromFileArgs = z.infer<typeof CreateTestCasesFromFileSchema>;
|
|
16
8
|
export interface DefaultFieldMaps {
|
|
17
9
|
priority: Record<string, number>;
|
|
@@ -10,31 +10,9 @@ export declare const AddTestResultSchema: z.ZodObject<{
|
|
|
10
10
|
test_result: z.ZodObject<{
|
|
11
11
|
status: z.ZodString;
|
|
12
12
|
description: z.ZodOptional<z.ZodString>;
|
|
13
|
-
},
|
|
14
|
-
status: string;
|
|
15
|
-
description?: string | undefined;
|
|
16
|
-
}, {
|
|
17
|
-
status: string;
|
|
18
|
-
description?: string | undefined;
|
|
19
|
-
}>;
|
|
13
|
+
}, z.core.$strip>;
|
|
20
14
|
test_case_id: z.ZodString;
|
|
21
|
-
},
|
|
22
|
-
project_identifier: string;
|
|
23
|
-
test_run_id: string;
|
|
24
|
-
test_result: {
|
|
25
|
-
status: string;
|
|
26
|
-
description?: string | undefined;
|
|
27
|
-
};
|
|
28
|
-
test_case_id: string;
|
|
29
|
-
}, {
|
|
30
|
-
project_identifier: string;
|
|
31
|
-
test_run_id: string;
|
|
32
|
-
test_result: {
|
|
33
|
-
status: string;
|
|
34
|
-
description?: string | undefined;
|
|
35
|
-
};
|
|
36
|
-
test_case_id: string;
|
|
37
|
-
}>;
|
|
15
|
+
}, z.core.$strip>;
|
|
38
16
|
export type AddTestResultArgs = z.infer<typeof AddTestResultSchema>;
|
|
39
17
|
/**
|
|
40
18
|
* Adds a test result to a specific test run via BrowserStack Test Management API.
|