Skip to content

⌘-click on link in test output doesn't go to location in file. #4089

@gspencergoog

Description

@gspencergoog

Description

When I run a test and it fails I get output that includes the absolute path to the file and the line number and character of the failure, and while VSCode detects the file:/// URI as a link, and I can ⌘-click on it, it either fails and gives me an error dialog that says something like "Unable to open 'menu_bar_test.dart:205:7'" because it doesn't know about a file with a filename that ends in ":205:7" (unsurprisingly), or (if I click on the other link in the output that is only the filename followed by "line 205", it doesn't go anywhere (because it's already got that file open).

This issue also appears to happen on Linux, so I don't think it's macOS specific.

To Reproduce

Steps to reproduce the behavior:

  1. Run a failing test.
  2. In the "inline" failed test result at the test location in the file, ⌘-click on either link for the file location where the test failure occurred.
  3. See the failure dialog appear, or that the cursor doesn't move.

Expected behavior

I expected the cursor to jump to the referenced test file location where the error occurred.

Screenshots

Here's what the error output from the test looks like:

Screen Shot 2022-08-04 at 11 18 49 AM

flutter doctor -v
[!] Flutter (Channel menu_bar_iv, 3.1.0-0.0.pre.2094, on macOS 12.5 21G72 darwin-arm, locale en)
    • Flutter version 3.1.0-0.0.pre.2094 on channel menu_bar_iv at /Users/gspencer/code/flutter
    ! Upstream repository git@github.com:gspencergoog/flutter.git is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to git@github.com:gspencergoog/flutter.git to dismiss this error.
    • Framework revision 1f76314471 (21 minutes ago), 2022-08-04 11:06:24 -0700
    • Engine revision 51296a62d9
    • Dart version 2.19.0 (build 2.19.0-58.0.dev)
    • DevTools version 2.16.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to
      perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/gspencer/Library/Android/sdk
• Platform android-33, build-tools 33.0.0
• ANDROID_HOME = /Users/gspencer/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 13F100
• CocoaPods version 1.11.3

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] VS Code (version 1.69.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.46.0

  • Target device (if the issue relates to Flutter debugging): macOS desktop

Metadata

Metadata

Assignees

No one assigned

    Labels

    in flutterRelates to running Flutter appsin testingRelates to test execution of Dart/Flutter tests for end usersis enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions