flutter / flutter/flutter-intellij

Create test action

Open
#6,891 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2k
Forks
356
Avg merge
1d 11h
Merged PRs (30d)
27

Description

We can "Go to test" if it was already created, but cannot when it's not.
In Android projects we can create test if it was not already created.

## Steps to Reproduce

How it works in Android projects

https://github.com/flutter/flutter-intellij/assets/44437712/85bb4df6-49c8-416d-8ecd-2bd09c30c130

Possible solution – create folder structures one by one

https://github.com/flutter/flutter-intellij/assets/44437712/7d10e62f-2057-416d-89c8-6b261e295987

Another possible solution – copy file path delete lib part and add _test prefix

https://github.com/flutter/flutter-intellij/assets/44437712/b15c2092-88d4-417f-9830-12c8362faeab

Current possible solutions require some additional actions, it would be great if we could create tests right away as same as in Android projects

## Version info

[!] Flutter (Channel stable, 3.13.1, on macOS 13.4 22F66 darwin-arm64, locale en-RU)
• Flutter version 3.13.1 on channel stable at /Users/andrey/fvm/versions/3.13.1
! Warning: `flutter` on your path resolves to /Users/andrey/fvm/versions/stable/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/andrey/fvm/versions/3.13.1. Consider adding /Users/andrey/fvm/versions/3.13.1/bin to the front of your path.
! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/2.18.5/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/andrey/fvm/versions/3.13.1. Consider adding /Users/andrey/fvm/versions/3.13.1/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision e1e47221e8 (13 days ago), 2023-08-22 21:43:18 -0700
• Engine revision b20183e040
• Dart version 3.1.0
• DevTools version 2.25.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 34.0.0)
• Android SDK at /Users/andrey/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/andrey/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E300c
• CocoaPods version 1.12.0

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

[✓] Android Studio (version 2022.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• android-studio-dir = /Applications/Android Studio.app
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Community Edition (version 2023.2.1)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 75.1.4
• Dart plugin version 232.9559.10

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

[✓] Connected device (3 available)
• iPhone 14 (mobile) • F15C570E-1B20-44CC-AAD0-A53AE465E382 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.4 22F66 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 116.0.5845.140

[✓] Network resources
• All expected network resources are available.

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing IntelliJ "Go to test" action in the flutter-intellij repository and compare its behavior with Android projects. Trace how the action resolves an existing test, then determine the project and file information needed when no test exists. Done means the action can create the expected test structure and file for a Dart source file.

Written by the indexing model from the issue text.

Assessment

Tech stack
flutter, java
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.