Skip to content

Commit c349d21

Browse files
committed
compose_box [nfc]: On Windows, skip a test that fails.
The `attach from camera` test fails on Windows due to the path separator used in the split function of the XFile.name getter in `cross_file` being '\' instead of '/'. This results in the getter returning the entire path on Windows instead of the last word present after the last '/' in the path. Read this excellent explanation by @chrisbobbe for better understanding: https://chat.zulip.org/#narrow/channel/516-mobile-dev-help/topic/failing.20composebox.20test.20while.20running.20check.20script/near/2000301
1 parent eb3e2aa commit c349d21

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/widgets/compose_box_test.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'dart:async';
22
import 'dart:convert';
3+
import 'dart:io';
34

45
import 'package:checks/checks.dart';
56
import 'package:file_picker/file_picker.dart';
@@ -581,7 +582,12 @@ void main() {
581582
});
582583

583584
// TODO test what happens when capturing/uploading fails
584-
});
585+
586+
// This test fails on Windows due to the Platform.pathSeparator.
587+
// used in the split function of the XFile.name getter in cross_file being '\' instead of '/'.
588+
// This results in the getter returning the entire path on Windows instead of the
589+
// last word present after the last '/' in the path.
590+
}, skip: Platform.isWindows);
585591
});
586592

587593
group('error banner', () {

0 commit comments

Comments
 (0)