Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[path_provider] Fix integration tests on macOS #5773

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/path_provider/path_provider/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Fixes integration test permission issue on recent versions of macOS.

## 2.0.10

* Removes unnecessary imports.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@ void main() {
expect(result, throwsA(isInstanceOf<UnsupportedError>()));
} else {
final Directory? result = await getDownloadsDirectory();
_verifySampleFile(result, 'downloads');
if (Platform.isMacOS) {
// On recent versions of macOS, actually using the downloads directory
// requires a user prompt, so will fail on CI. Instead, just check that
// it returned a path with the expected directory name.
expect(result?.path, endsWith('Downloads'));
} else {
_verifySampleFile(result, 'downloads');
}
}
});
}
Expand Down