mirror of
https://github.com/flutter/samples.git
synced 2025-11-09 06:18:49 +00:00
add visual samples index tests to CI (#597)
This commit is contained in:
@@ -57,6 +57,15 @@ jobs:
|
|||||||
script: "./tool/travis_flutter_script.sh"
|
script: "./tool/travis_flutter_script.sh"
|
||||||
env: FLUTTER_VERSION=beta
|
env: FLUTTER_VERSION=beta
|
||||||
|
|
||||||
|
- name: Visual samples index tests
|
||||||
|
os: linux
|
||||||
|
dist: trusty
|
||||||
|
env: FLUTTER_VERSION=stable
|
||||||
|
script:
|
||||||
|
- cd web/samples_index
|
||||||
|
- ../../flutter/bin/dart pub get
|
||||||
|
- ../../flutter/bin/dart test
|
||||||
|
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- env: FLUTTER_VERSION=beta
|
- env: FLUTTER_VERSION=beta
|
||||||
|
|
||||||
|
|||||||
@@ -41,19 +41,6 @@ void main() {
|
|||||||
expect(sample.date, DateTime.parse('2019-12-15T02:59:43.1Z'));
|
expect(sample.date, DateTime.parse('2019-12-15T02:59:43.1Z'));
|
||||||
expect(sample.channel, 'stable');
|
expect(sample.channel, 'stable');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('bad yaml', () async {
|
|
||||||
var file = File('test/yaml/bad.yaml');
|
|
||||||
var contents = await file.readAsString();
|
|
||||||
expect(contents, isNotEmpty);
|
|
||||||
|
|
||||||
expect(
|
|
||||||
() => checkedYamlDecode(contents, (m) => Index.fromJson(m),
|
|
||||||
sourceUrl: file.uri),
|
|
||||||
throwsA(predicate((e) =>
|
|
||||||
e is ParsedYamlException &&
|
|
||||||
e.message.endsWith('Unsupported value for "name".'))));
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
group('searching', () {
|
group('searching', () {
|
||||||
|
|||||||
Reference in New Issue
Block a user