Rename environment monkey-test to test
Because we will add Appium test in the future.
This commit is contained in:
parent
37f1a3a437
commit
282805fe8f
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Sanmill-monkey" type="FlutterRunConfigurationType" factoryName="Flutter">
|
||||
<option name="additionalArgs" value="--dart-define monkey_test=true" />
|
||||
<option name="filePath" value="$PROJECT_DIR$/src/ui/flutter_app/lib/main.dart" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
|
@ -0,0 +1,7 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Sanmill-test" type="FlutterRunConfigurationType" factoryName="Flutter">
|
||||
<option name="additionalArgs" value="--dart-define test=true" />
|
||||
<option name="filePath" value="$PROJECT_DIR$/src/ui/flutter_app/lib/main.dart" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
|
@ -30,14 +30,14 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "Sanmill-monkey",
|
||||
"name": "Sanmill-test",
|
||||
"type": "dart",
|
||||
"request": "launch",
|
||||
"cwd": "src/ui/flutter_app",
|
||||
"program": "lib/main.dart",
|
||||
"args": [
|
||||
"--dart-define",
|
||||
"monkey_test=true"
|
||||
"test=true"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"cSpell.words": [
|
||||
"ALIGNAS",
|
||||
"appbundle",
|
||||
"Appium",
|
||||
"APSTUDIO",
|
||||
"ARGB",
|
||||
"autobuild",
|
||||
|
|
|
@ -73,7 +73,7 @@ Run `./flutter-init.sh` , copy `src/ui/flutter_app/android/key.properties.exampl
|
|||
|
||||
We use compile-time environment configs to enable specific parts of the code:
|
||||
|
||||
* `monkey_test` to prepare the app for monkey tests. (References to external sites are going to be disabled.)
|
||||
* `test` to prepare the app for Monkey and Appium testing. (References to external sites are going to be disabled.)
|
||||
* `dev_mode` to show the developer mode without needing to enable it first.
|
||||
* `catcher` to control the use of catcher. (This is on by default and needs to be disabled when required.)
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ part 'package:sanmill/services/init_system_ui.dart';
|
|||
Future<void> main() async {
|
||||
debugPrint('Environment [catcher]: ${EnvironmentConfig.catcher}');
|
||||
debugPrint('Environment [dev_mode]: ${EnvironmentConfig.devMode}');
|
||||
debugPrint('Environment [monkey_test]: ${EnvironmentConfig.monkeyTest}');
|
||||
debugPrint('Environment [test]: ${EnvironmentConfig.test}');
|
||||
|
||||
await LocalDatabaseService.initStorage();
|
||||
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
class EnvironmentConfig {
|
||||
const EnvironmentConfig._();
|
||||
|
||||
/// gets weather we build for a monkey test
|
||||
static const monkeyTest = bool.fromEnvironment('monkey_test');
|
||||
/// Gets whether we build for Monkey/Appium testing
|
||||
static const test = bool.fromEnvironment('test');
|
||||
|
||||
/// gets weather we build for devMode
|
||||
/// Gets whether we build for devMode
|
||||
static const devMode = bool.fromEnvironment('dev_mode');
|
||||
|
||||
/// gets weather we want catcher to be enabled
|
||||
/// Gets whether we want catcher to be enabled
|
||||
/// defaults to true
|
||||
static const catcher = bool.fromEnvironment('catcher', defaultValue: true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue