@@ -7,46 +7,33 @@ export function generateBrowserStackYMLInstructions(config: {
7
7
projectName : string ;
8
8
} ) : string {
9
9
const enablePercy = config . enablePercy || false ;
10
- const projectName = config . projectName ;
10
+ const projectName = config . projectName || "BrowserStack Automate Build" ;
11
11
12
12
// Generate platform configurations using the utility function
13
13
const platformConfigs = generatePlatformConfigs ( config ) ;
14
14
15
- // Determine build name and step title
16
- const buildName =
17
- config . validatedEnvironments && config . validatedEnvironments . length > 0
18
- ? `${ projectName } -Build`
19
- : "Sample-Build" ;
20
-
21
15
const stepTitle =
22
- config . validatedEnvironments && config . validatedEnvironments . length > 0
23
- ? "Create a browserstack.yml file in the project root with your validated device configurations:"
24
- : "Create a browserstack.yml file in the project root. The file should be in the following format:" ;
16
+ "Create a browserstack.yml file in the project root with your validated device configurations:" ;
17
+
18
+ const buildName = ` ${ projectName } -Build` ;
25
19
26
20
let ymlContent = `
27
21
# ======================
28
22
# BrowserStack Reporting
29
23
# ======================
24
+
25
+ # TODO: Replace these sample values with your actual project details
30
26
projectName: ${ projectName }
31
27
buildName: ${ buildName }
32
28
33
29
# =======================================
34
30
# Platforms (Browsers / Devices to test)
35
31
# =======================================` ;
36
32
37
- if ( config . validatedEnvironments && config . validatedEnvironments . length > 0 ) {
38
- ymlContent += `
39
- # Auto-generated from validated device configurations
40
- platforms:
41
- ${ platformConfigs } `;
42
- } else {
43
- ymlContent += `
33
+ ymlContent += `
44
34
# Platforms object contains all the browser / device combinations you want to test on.
45
- # Generate this on the basis of the following platforms requested by the user:
46
- # Requested platforms: ${ config . platforms || [ ] }
47
35
platforms:
48
36
${ platformConfigs } `;
49
- }
50
37
51
38
ymlContent += `
52
39
@@ -55,6 +42,7 @@ ${platformConfigs}`;
55
42
# =======================
56
43
# The number of parallel threads to be used for each platform set.
57
44
# BrowserStack's SDK runner will select the best strategy based on the configured value
45
+ # The number of parallel threads to be used for each platform set.
58
46
parallelsPerPlatform: 1
59
47
60
48
# =================
0 commit comments