@@ -7,46 +7,33 @@ export function generateBrowserStackYMLInstructions(config: {
77 projectName : string ;
88} ) : string {
99 const enablePercy = config . enablePercy || false ;
10- const projectName = config . projectName ;
10+ const projectName = config . projectName || "BrowserStack Automate Build" ;
1111
1212 // Generate platform configurations using the utility function
1313 const platformConfigs = generatePlatformConfigs ( config ) ;
1414
15- // Determine build name and step title
16- const buildName =
17- config . validatedEnvironments && config . validatedEnvironments . length > 0
18- ? `${ projectName } -Build`
19- : "Sample-Build" ;
20-
2115 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` ;
2519
2620 let ymlContent = `
2721# ======================
2822# BrowserStack Reporting
2923# ======================
24+
25+ # TODO: Replace these sample values with your actual project details
3026projectName: ${ projectName }
3127buildName: ${ buildName }
3228
3329# =======================================
3430# Platforms (Browsers / Devices to test)
3531# =======================================` ;
3632
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 += `
4434# 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 || [ ] }
4735platforms:
4836${ platformConfigs } `;
49- }
5037
5138 ymlContent += `
5239
@@ -55,6 +42,7 @@ ${platformConfigs}`;
5542# =======================
5643# The number of parallel threads to be used for each platform set.
5744# 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.
5846parallelsPerPlatform: 1
5947
6048# =================
0 commit comments