mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-11-17 02:48:49 +00:00
fix: image tests (#6928)
This commit is contained in:
parent
3b56887267
commit
e0885e2567
@ -24,13 +24,6 @@ import 'package:run_with_network_images/run_with_network_images.dart';
|
|||||||
import '../../shared/mock/mock_file_picker.dart';
|
import '../../shared/mock/mock_file_picker.dart';
|
||||||
import '../../shared/util.dart';
|
import '../../shared/util.dart';
|
||||||
|
|
||||||
const _testImageUrls = [
|
|
||||||
'https://images.unsplash.com/photo-1469474968028-56623f02e42e?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&dl=david-marcu-78A265wPiO4-unsplash.jpg&w=640',
|
|
||||||
'https://www.easygifanimator.net/images/samples/eglite.gif',
|
|
||||||
'https://people.math.sc.edu/Burkardt/data/bmp/snail.bmp',
|
|
||||||
'https://file-examples.com/storage/fe9566cb7d67345489a5a97/2017/10/file_example_JPG_100kB.jpg',
|
|
||||||
];
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||||
TestWidgetsFlutterBinding.ensureInitialized();
|
TestWidgetsFlutterBinding.ensureInitialized();
|
||||||
@ -138,11 +131,33 @@ void main() {
|
|||||||
file.deleteSync();
|
file.deleteSync();
|
||||||
});
|
});
|
||||||
|
|
||||||
for (final url in _testImageUrls) {
|
testWidgets('insert a gif image from network', (tester) async {
|
||||||
testWidgets('insert an image from network: $url', (tester) async {
|
await testEmbedImage(
|
||||||
await testEmbedImage(tester, url);
|
tester,
|
||||||
|
'https://www.easygifanimator.net/images/samples/sparkles.gif',
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
testWidgets('insert a jpg image from network', (tester) async {
|
||||||
|
await testEmbedImage(
|
||||||
|
tester,
|
||||||
|
'https://file-examples.com/storage/fe9566cb7d67345489a5a97/2017/10/file_example_JPG_100kB.jpg',
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
testWidgets('insert a bmp image from network', (tester) async {
|
||||||
|
await testEmbedImage(
|
||||||
|
tester,
|
||||||
|
'https://people.math.sc.edu/Burkardt/data/bmp/snail.bmp',
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
testWidgets('insert a jpg image from network', (tester) async {
|
||||||
|
await testEmbedImage(
|
||||||
|
tester,
|
||||||
|
'https://images.unsplash.com/photo-1469474968028-56623f02e42e?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&dl=david-marcu-78A265wPiO4-unsplash.jpg&w=640',
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
testWidgets('insert an image from unsplash', (tester) async {
|
testWidgets('insert an image from unsplash', (tester) async {
|
||||||
await runWithNetworkImages(() async {
|
await runWithNetworkImages(() async {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user