Unverified Commit a4b9ef2e authored by Christopher Fujino's avatar Christopher Fujino Committed by GitHub

Fix more tests for ANSI terminals (#29699)

* have tests that log error messages use a FakePlatform that does not support Ansi color, to fix tests started from color terminals
* add the override to the other tests too, in case someone copy & pastes them in the future for a test involving an error message
parent 377f4451
......@@ -131,18 +131,18 @@ void main() {
});
group('ApkManifestData', () {
test('Parses manifest with an Activity that has enabled set to true, action set to android.intent.action.MAIN and category set to android.intent.category.LAUNCHER', () {
testUsingContext('Parses manifest with an Activity that has enabled set to true, action set to android.intent.action.MAIN and category set to android.intent.category.LAUNCHER', () {
final ApkManifestData data = ApkManifestData.parseFromXmlDump(_aaptDataWithExplicitEnabledAndMainLauncherActivity);
expect(data, isNotNull);
expect(data.packageName, 'io.flutter.examples.hello_world');
expect(data.launchableActivityName, 'io.flutter.examples.hello_world.MainActivity2');
});
test('Parses manifest with an Activity that has no value for its enabled field, action set to android.intent.action.MAIN and category set to android.intent.category.LAUNCHER', () {
}, overrides: noColorTerminalOverride);
testUsingContext('Parses manifest with an Activity that has no value for its enabled field, action set to android.intent.action.MAIN and category set to android.intent.category.LAUNCHER', () {
final ApkManifestData data = ApkManifestData.parseFromXmlDump(_aaptDataWithDefaultEnabledAndMainLauncherActivity);
expect(data, isNotNull);
expect(data.packageName, 'io.flutter.examples.hello_world');
expect(data.launchableActivityName, 'io.flutter.examples.hello_world.MainActivity2');
});
}, overrides: noColorTerminalOverride);
testUsingContext('Error when parsing manifest with no Activity that has enabled set to true nor has no value for its enabled field', () {
final ApkManifestData data = ApkManifestData.parseFromXmlDump(_aaptDataWithNoEnabledActivity);
expect(data, isNull);
......@@ -156,14 +156,14 @@ void main() {
final BufferLogger logger = context[Logger];
expect(
logger.errorText, 'Error running io.flutter.examples.hello_world. Default activity not found\n');
});
}, overrides: noColorTerminalOverride);
testUsingContext('Error when parsing manifest with no Activity that has category set to android.intent.category.LAUNCHER', () {
final ApkManifestData data = ApkManifestData.parseFromXmlDump(_aaptDataWithNoLauncherActivity);
expect(data, isNull);
final BufferLogger logger = context[Logger];
expect(
logger.errorText, 'Error running io.flutter.examples.hello_world. Default activity not found\n');
});
}, overrides: noColorTerminalOverride);
});
group('PrebuiltIOSApp', () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment