buildBonesUITestConfig method

String buildBonesUITestConfig(
  1. bool includeDartTestConfig,
  2. File dartTestConfigFile
)

Builds the bonesUiTestConfigFile content.

  • If includeDartTestConfig is true should include the dartTestConfigFile.
  • A detected date test configuration file.

Implementation

String buildBonesUITestConfig(
    bool includeDartTestConfig, File dartTestConfigFile) {
  String config = '''
##
## AUTO GENERATED:
##   $bonesUiTestCliTitle
##   ${DateTime.now()}
##

timeout: 60s
''';

  if (includeDartTestConfig) {
    config += '\ninclude: ${dartTestConfigFile.path}\n';
  } else {
    config += '\nplatforms: [chrome]\n';
  }

  config += '\ncustom_html_template_path: ${bonesUITestTemplateFile.path}\n';
  return config;
}