Repository navigation
Add core project and editor UI tests for IntelliJ IDEA 2026.2 - #9211
Draft
cj-radcliff wants to merge 1 commit into
Draft
cj-radcliff wants to merge 1 commit into
cj-radcliff wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds a suite of UI integration tests for the Flutter IntelliJ plugin, covering widget extraction, project creation, running pub get, widget testing, and live templates, along with updated documentation. The feedback points out a violation of the Kotlin style guide in PubGetUITest.kt where the double-bang (!!) operator is used, and suggests replacing it with checkNotNull for better safety and error context.
| println("pubspec.lock: $PACKAGE $version") | ||
| check(version.startsWith(MAJOR_VERSION)) { "Expected $PACKAGE $CONSTRAINT to resolve to a 1.x version, got $version" } | ||
|
|
||
| val lockEntry = lockEntry()!! |
Contributor
There was a problem hiding this comment.
[MUST-FIX] Avoid using the double-bang !! operator as per the Kotlin style guide. Use checkNotNull or an Elvis operator with an explicit error message instead to ensure null safety and provide better error context.
Suggested change
| val lockEntry = lockEntry()!! | |
| val lockEntry = checkNotNull(lockEntry()) { "pubspec.lock entry for $PACKAGE not found" } |
References
- Null Safety: NEVER use the double-bang
!!operator. Use?.,?:, orif (x != null). (link)
cj-radcliff
force-pushed
the
ui-test-harness-iu262
branch
from
November 5, 2026 05:55
7374c97 to
c9fe3be
Compare
cj-radcliff
force-pushed
the
ui-tests-core-iu262
branch
from
November 5, 2026 05:56
b614ed7 to
9e9fe6d
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
(Stacked on #9209 /
ui-test-harness-iu262)Adds five core IDE Starter UI tests against IntelliJ IDEA 2026.2.3 covering project creation,
pubspec.yamldependency fetching, widget test execution, refactoring, and live templates:NewProjectIU262UITest:Fluttergenerator) on IntelliJ IDEA 2026.2.3, verifies the generated project opens and finishes indexing, and cleans up the project directory afterwards.PubGetUITest:http: ^1.2.0topubspec.yaml, invokes Flutter Pub Get (flutter.pub.get), and verifiespubspec.lock(direct mainhosted dependency),.dart_tool/package_config.json, and the downloaded package in the pub cache (lib/http.dart).RunWidgetTestUITest:test/widget_test.dart, places the caret ontestWidgets, invokesRunClassfrom the editor, and verifies the IDE test runner reports the widget test passed.ExtractWidgetUITest:lib/main.dart, places the caret onText('You have pushed...'), invokes Extract Flutter Widget... (Flutter.ExtractWidget), entersCounterLabel, and verifiesclass CounterLabel extends StatelessWidgetis extracted cleanly.StatelessWidgetLiveTemplateUITest:lib/greeting.dart, typesstless+Tab+Greeting, and verifies the live template expands intoclass Greeting extends StatelessWidgetwithconst Greeting({super.key});.testSrc/integration/README.md:RunWidgetTestUITest.Verification
compileIntegrationKotlincompiles cleanly../gradlew --no-daemon integration --tests io.flutter.integrationTest.<TestClass>).Review the contribution guidelines below:
AUTHORSfile.CHANGELOG.mdif appropriate.