Fix description in index.html / manifest.json getting double quoted (#131842)
This PR adjusts the quoting of the project description not not apply twice in the index.html / manifest.json of web builds. *List which issues are fixed by this PR. You must list at least one issue.* Fixes https://github.com/flutter/flutter/issues/131834 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
This commit is contained in:
@@ -3384,6 +3384,32 @@ void main() {
|
||||
FeatureFlags: () => TestFeatureFlags(),
|
||||
Logger: () => logger,
|
||||
});
|
||||
|
||||
testUsingContext('Does not double quote description in index.html on web', () async {
|
||||
await _createProject(
|
||||
projectDir,
|
||||
<String>['--no-pub', '--platforms=web'],
|
||||
<String>['pubspec.yaml', 'web/index.html'],
|
||||
);
|
||||
|
||||
final String rawIndexHtml = await projectDir.childDirectory('web').childFile('index.html').readAsString();
|
||||
const String expectedDescription = '<meta name="description" content="A new Flutter project.">';
|
||||
|
||||
expect(rawIndexHtml.contains(expectedDescription), isTrue);
|
||||
});
|
||||
|
||||
testUsingContext('Does not double quote description in manifest.json on web', () async {
|
||||
await _createProject(
|
||||
projectDir,
|
||||
<String>['--no-pub', '--platforms=web'],
|
||||
<String>['pubspec.yaml', 'web/manifest.json'],
|
||||
);
|
||||
|
||||
final String rawManifestJson = await projectDir.childDirectory('web').childFile('manifest.json').readAsString();
|
||||
const String expectedDescription = '"description": "A new Flutter project."';
|
||||
|
||||
expect(rawManifestJson.contains(expectedDescription), isTrue);
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _createProject(
|
||||
|
||||
Reference in New Issue
Block a user