-
Notifications
You must be signed in to change notification settings - Fork 308
compose: Skip failing test for windows. #1195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compose: Skip failing test for windows. #1195
Conversation
b1193df
to
9048683
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Small comment below.
Also a commit message nit: let's make this the summary line:
compose_box [nfc]: On Windows, skip a test that fails
c349d21
to
2494769
Compare
Thank you for the review @chrisbobbe . Here is the change summary:
|
2494769
to
576429c
Compare
Thanks! Marking for Greg's review; it's possible he'll want to tweak the explanation in the code comment, but the choice to skip this test on Windows seems fine to me. |
Thanks for the review @chrisbobbe as well as your simple explanation of why it fails on Windows. |
Skips the test that fails because of the platform specific path separator being '\' instead of '/ on Windows. 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 [greg: rewrote comment]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to you both!
it's possible he'll want to tweak the explanation in the code comment
Indeed. :-) In fact I also went and filed an upstream issue for the underlying bug in [XFile.name]:
Merging, after those adjustments:
// TODO test what happens when capturing/uploading fails
-
- // This test fails on Windows due to the Platform.pathSeparator.
- // 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.
- }, skip: Platform.isWindows);
+ },
+ // This test fails on Windows because [XFile.name] splits on
+ // [Platform.pathSeparator], corresponding to the actual host platform
+ // the test is running on, instead of the path separator for the
+ // target platform the test is simulating.
+ // TODO(upstream): unskip after fix to https://github.com/flutter/flutter/issues/161073
+ skip: Platform.isWindows);
});
test/widgets/compose_box_test.dart
Outdated
// last word present after the last '/' in the path. | ||
}, skip: Platform.isWindows); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this puts the comment inside the test body function, which is potentially confusing about what the comment is referring to; instead, put it after the },
so it's clearly attached to the skip:
argument
576429c
to
c02d947
Compare
The
attach from camera
test fails onWindows due to the 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