fix(app): use Pipelines as the installed display name
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
test('installed Android, iOS and web display names are Pipelines', () {
|
||||
final android = File(
|
||||
'android/app/src/main/AndroidManifest.xml',
|
||||
).readAsStringSync();
|
||||
expect(android, contains('android:label="Pipelines"'));
|
||||
final ios = File('ios/Runner/Info.plist').readAsStringSync();
|
||||
for (final key in ['CFBundleDisplayName', 'CFBundleName']) {
|
||||
expect(
|
||||
RegExp('<key>$key</key>\\s*<string>Pipelines</string>').hasMatch(ios),
|
||||
isTrue,
|
||||
);
|
||||
}
|
||||
final web =
|
||||
jsonDecode(File('web/manifest.json').readAsStringSync())
|
||||
as Map<String, dynamic>;
|
||||
expect(web['name'], 'Pipelines');
|
||||
expect(web['short_name'], 'Pipelines');
|
||||
final html = File('web/index.html').readAsStringSync();
|
||||
expect(html, contains('<title>Pipelines</title>'));
|
||||
expect(
|
||||
html,
|
||||
contains('name="apple-mobile-web-app-title" content="Pipelines"'),
|
||||
);
|
||||
// Display branding must not change the installed Android app's identity.
|
||||
expect(
|
||||
File('android/app/build.gradle.kts').readAsStringSync(),
|
||||
contains('applicationId = "net.awan.pipelines.next"'),
|
||||
);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user