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

Commit d9380d2

Browse files
committed
fix native tests
1 parent 4fa2182 commit d9380d2

File tree

3 files changed

+138
-145
lines changed

3 files changed

+138
-145
lines changed

packages/file_selector/file_selector_macos/example/lib/home_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class HomePage extends StatelessWidget {
5858
const SizedBox(height: 10),
5959
ElevatedButton(
6060
style: style,
61-
child: const Text('Open a get multi directories dialog'),
61+
child: const Text('Open a get directories dialog'),
6262
onPressed: () =>
6363
Navigator.pushNamed(context, '/multi-directories'),
6464
),

packages/file_selector/file_selector_macos/example/macos/RunnerTests/RunnerTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@ class exampleTests: XCTestCase {
241241
viewProvider: TestViewProvider(),
242242
panelController: panelController)
243243

244-
let returnPath = "/foo/bar"
245-
panelController.openURLs = [URL(fileURLWithPath: returnPath)]
244+
let returnPaths = ["/foo/bar"]
245+
panelController.openURLs = returnPaths.map({ path in URL(fileURLWithPath: path) })
246246

247247
let called = XCTestExpectation()
248248
let call = FlutterMethodCall(methodName: "getDirectoryPath", arguments: [:])
249249
plugin.handle(call) { result in
250-
XCTAssertEqual(result as! String?, returnPath)
250+
XCTAssertEqual(result as! [String]?, returnPaths)
251251
called.fulfill()
252252
}
253253

@@ -285,7 +285,7 @@ class exampleTests: XCTestCase {
285285
viewProvider: TestViewProvider(),
286286
panelController: panelController)
287287

288-
let returnPaths = ["/foo/bar", "/foo/test"]
288+
let returnPaths = ["/foo/bar", "/foo/test"]
289289
panelController.openURLs = returnPaths.map({ path in URL(fileURLWithPath: path) })
290290

291291
let called = XCTestExpectation()

0 commit comments

Comments
 (0)