Commit Graph
31 Commits
Author SHA1 Message Date
1grzyb1 f7f4e361b0 Keep Rider running for all sticky lines scroll tests
The starter stops the IDE after 10 minutes, and the two sticky lines
tests take about 16 minutes together. The driver connection dropped in
the middle of the second one.

The starter also stops the IDE when any test container finishes, so with
a parameterized test it was gone before @AfterAll. Use two plain tests.
2026-11-19 11:02:59 +01:00
1grzyb1 77e20f40a8 Start a trial in the JetBrains Client of Rider split mode tests
Without RIDER_LICENSE_KEY the client doesn't request a trial by itself,
unlike the monolith. It shows the activation dialog, and the split mode
tests time out after 10 minutes with initializationError.
2026-11-19 11:02:59 +01:00
1grzyb1 e3139dc049 VIM-4374 Push ReSharper navigation to a declaration onto the tag stack in Rider
In Rider, Ctrl+Click and the hotkeys run backend actions through one composite action without an ID, and ReSharper
picks which of them to run, so the action listener never saw Go to Declaration and nothing went onto the tag stack.
When Go to Declaration did show up, e.g. for <C-]>, the backend ran it a second time for the same jump, which pushed
the position twice.

For actions that navigate on the backend, the listener now only marks a tag jump as expected. A composite action
counts as one when the keymap binds its shortcut to a tag action. The position goes onto the stack when ReSharper's
navigation command (NavigationHost.SendNavigation) starts, while the caret is still where the jump starts from. That
pushes once per navigation, and only when one happens. In split mode the JetBrains Client has no Rider modules and
sees Go to Declaration itself, so it keeps pushing before the action.
2026-11-16 09:49:40 +01:00
1grzyb1 dc8ce895d1 VIM-4374 Push IDE navigation to a declaration onto the tag stack
Only <C-]> pushed onto the tag stack, so Ctrl+Click and the other ways to run Go to Declaration left nothing for <C-T>
to return to: it reported an empty stack or went back to an older <C-]>. The tag stack is now filled by the IDE action
listener for Go to Declaration, Go to Type Declaration and Go to Implementation, however they are invoked: mouse,
shortcut, <Action> mapping, :action, <C-]> and gd.

:tag without an argument redoes a jump that is already on the stack by running Go to Declaration again. It passes
TAG_STACK_PLACE as the action place, which travels with the event even when the action runs asynchronously, so the
listener can skip it. The place goes through a new VimActionExecutor overload to keep the published API compatible.

Rider's ReSharper navigation still isn't covered: the IDE hides the real action behind a composite there.
2026-11-16 09:49:40 +01:00
1grzyb1 fb72b1fa39 VIM-4369 Stay in Insert mode when Esc is handed to the IDE and closes the lookup
With `sethandler <Esc> i:ide`, Escape in Insert mode is meant to only close the completion popup. The workaround for
the Rider summary popup exited Insert mode anyway, because it reacts to any Escape that cancels the lookup. It now
leaves the mode alone when the IDE owns Escape in the current mode.
2026-11-10 10:51:41 +01:00
1grzyb1 2f3270d01f VIM-4369 Exit Insert mode with Esc in Rider split mode when the summary popup is shown
Rider shows a summary popup (the type or the overloads of the selected item) next to the completion popup. In the
JetBrains Client this popup consumes Escape: it lets Escape through only for an autopopup completion, and the client
can't tell that a completion is an autopopup one, because the completion runs on the backend. Escape then closed both
popups and the editor stayed in Insert mode.

The monolithic Rider already has a workaround for the same popup: it remembers whether the last key was Escape and
exits Insert mode when that key cancelled the lookup. It wasn't installed in the client, where isRider() is false, so
it is now installed in any JetBrains Client. The client of IntelliJ never shows this popup, Escape reaches IdeaVim there,
which leaves Insert mode before the lookup is closed, so the listener does nothing.

When the backend sends a summary depends on the state of the project, so the Rider test shows the popup itself, the
way the client does when it receives one.
2026-11-10 10:51:41 +01:00
1grzyb1 6650aef408 VIM-4370 Undo one IdeaVim command at a time in Rider split mode
Rider has no speculative undo, so the undo stack is on the backend. The
backend applies the frontend's changes as undo-transparent patches,
merges all of them into one undo step, and undoes all transparent steps
on top of the stack at once. So one `u` undid every change IdeaVim made
since the backend's own last command, e.g. both deletions after `x x`.

Before each command that follows a change, the frontend now asks the
backend to end the undo step. If the step has only the frontend's
changes, the backend merges a no-op non-transparent action into it first,
so it's undone on its own.

It relies on how the platform merges undo steps, so it's a workaround
until RIDER-145069 is fixed.
2026-11-09 10:59:04 +01:00
1grzyb1 aae9c205db VIM-4370 Run Rider UI tests in split mode
A test class can now run Rider as a backend with a JetBrains Client, with
IdeaVim in both, to cover bugs that only show up there. Split mode needs
the 2026.2 Starter, since the 2026.1 one can't connect to a Rider 2026.2
backend, and that Starter needs Java 25. Only Linux: Rider for macOS has
no remote development backend.
2026-11-09 10:59:04 +01:00
1grzyb1 91ff73906e VIM-4372 Test moving sideways with sticky lines at every scrolloff
A scrolloff of around half the window switches to centring once the sticky lines panel takes the window below twice the scrolloff, which is where the panel measured at the old position made h and l scroll. The unit test runs a real panel in a main editor over the scrolloffs around that point and over nested C# blocks, and the Rider test also covers a scrolloff of 20.

The setup of a main editor with a sticky lines panel moves to StickyLinesTestCase, to be shared with other tests.
2026-11-06 10:51:59 +01:00
1grzyb1 e4df45e4a1 VIM-4372 Measure the sticky lines panel at the position we scroll to
With 'scrolloff' and sticky lines, moving left and right scrolled the
editor back and forth by a line. With smooth scrolling on, the editor
scrolls with an animation that runs after the key is handled, but the
sticky lines panel only follows the editor as it scrolls. So right after
we scrolled, the panel still had the height of where we scrolled from.
Centring the caret line then found the new position perfectly centred
under the old panel and kept it, and on the next key the same happened in
the other direction.

The panel height is now worked out for the position we scroll to, with
the platform code the panel itself uses. It is internal API, used without
a fallback, so that a change in the platform breaks the build instead of
the scrolling.

It also happens in IntelliJ, it depends on where scopes start and end
near the top of the window. Unit tests don't scroll with animation, as the
editor isn't showing, so the test is a Rider UI test.
2026-11-05 12:01:42 +01:00
1grzyb1 fc7140c247 VIM-2524 Indent the line emptied by cc in Rider
The indent was only worked out where the language has a formatter. Rider has
no formatter for C# on the frontend (formatting lives in the ReSharper
backend), so cc and S left the line with its old indent.

Rider's frontend has a LineIndentProvider that works out the C# indent, but
also a dummy one answering DO_NOT_ADJUST, and CodeStyle.getLineIndent only
asks the first provider of a language. Ask all of them and take the first
indent, and fall back to the formatter only if none of them answers.
2026-11-03 10:04:35 +01:00
1grzyb1 b9d71811dc VIM-3968 Run Rider backend actions with the asynchronous update
Rider gets the state of a backend action (e.g. MoveElementRight or ReformatCode for C#) from the backend only for a real hotkey: when the last shortcut seen by the key dispatcher belongs to the action, it wraps the action into a composite that asks the backend. The synchronous tryToExecute goes through the same hotkey update but never gets there. After `:action` the last shortcut is Enter, so the action isn't wrapped, and after an `<Action>` mapping it is wrapped, but tryToExecuteNow updates the original action instead of the wrapped one. Either way only the frontend answers, it reports the action as disabled, and tryToExecute rejects it. The asynchronous tryToExecute updates the action the way a menu does, with an asynchronous request to the backend, so it gets the real state without blocking the EDT. The action then runs later, so executeAction can't tell whether it succeeded, but the backend's changes arrive later anyway.

The new Rider tests also cover the action cases fixed earlier (VIM-3376, VIM-3826, VIM-3861, VIM-3881) that had no Rider test. ReformatCode from a mapping no longer freezes Rider, so its disabled test is replaced by RiderReformatCodeTest, which runs in its own Rider in case it does again.
2026-10-29 10:02:09 +01:00
1grzyb1andClaude Opus 5.5 f4e6a1727c VIM-4228 Fix Rider tests compilation on 2025.3
The driver SDK's SelectionModel has no getSelectedText(Boolean) in 2025.3,
which broke the compilation of the ui-rd-tests module in the 2025.3 and
nvim jobs. Call it through our own remote interface instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:48:22 +02:00
1grzyb1 a00e382bdf VIM-4228 Refactor rider tests to use RemoteRobot 2026-10-14 16:28:42 +02:00
1grzyb1 5d6622b77e Use only jbr cache repository 2026-05-13 09:48:47 +00:00
1grzyb1 2b4a4eeff4 Add jbr cache repo per module 2026-05-13 08:45:11 +00:00
Alex PlateandClaude Opus 4.5 3627d62175 Disable build cache for PyCharm and Rider UI tests
Same fix as ui-ij-tests - ensures tests actually run instead of
using cached results.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 15:03:36 +02:00
claude[bot]andClaude Sonnet 4.5 52eed09a69 Fix Rider UI test by handling .NET SDK installation step
The RiderUiTest was failing because it didn't handle the .NET SDK
installation dialog that appears when creating a new Rider project
in a fresh environment.

Root cause:
- When the "New Solution" dialog opens, Rider detects that no .NET SDK
  is installed and shows an "Install" button
- The "Create" button remains disabled until the SDK is installed
- The test was trying to click the disabled "Create" button, which
  failed silently, leaving the dialog open
- The test then timed out waiting for the main IDE frame to appear

Changes:
1. Added SDK installation handling in startNewProject():
   - Detects and clicks the "Install" button if present
   - Waits 10 seconds for SDK installation to complete
   - Waits additional 2 seconds before clicking Create

2. Made license frame handling optional:
   - Wrapped manageLicensesFrame in try-catch
   - Prevents failure if license is already activated

3. Increased timeouts for project creation:
   - Extended IDE frame lookup timeout from 10s to 60s
   - Added 5-second wait after clicking Create button
   - These changes accommodate the time needed for project creation

Test results:
- Test now passes successfully (100% pass rate)
- Duration: ~1 minute (previously timed out at ~20 seconds)
- All test assertions pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 23:22:00 +02:00
claude[bot]andClaude Sonnet 4.5 904bf50cd8 Fix UI test by disambiguating activation code text field selector
The test was failing because both the "Activation code" radio button
and the text input field share the same accessiblename attribute.
The XPath selector "//div[@accessiblename='Activation code']" was
matching both elements, causing the test to fail when trying to set
text on the first match (the radio button, which is not a JTextComponent).

Solution: Add a classhierarchy filter to the XPath to ensure we only
match the text input field component (JTextComponent), not the radio button.

This fix makes the selector more specific and prevents the ambiguity
that was causing the test failure.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 22:54:03 +02:00
claude[bot]andClaude Sonnet 4.5 52a6275a9d Fix UI test by using accessible name instead of obfuscated class
The UI test was failing because it relied on an obfuscated class name 'W'
to locate the activation code text field. The class name changed to 'Y' in
a recent version of JetBrains Rider, causing the test to fail with
NoSuchElementException.

This change uses the stable 'accessiblename' attribute instead, which:
- Is more stable across UI updates
- Is semantically meaningful and self-documenting
- Follows accessibility best practices

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 18:41:58 +02:00
Alex PlateandClaude Sonnet 4.5 77fbe1ae2b Replace Gradle video recorder with CI-level screen recording
Extended macOS CI screen recording to all UI test workflows:
- Added FFmpeg screen recording to PyCharm, Rider, and Octopus tests
- Removed Linux UI tests workflow (runUiTestsLinux.yml)

Removed video-recorder-junit5 library from codebase:
- Removed dependency from all UI test modules
- Removed video recorder system properties from Gradle configs
- Removed @Video annotations and imports from all test files
- Removed "Move video" steps from all workflows

Updated Claude AI analysis prompts:
- Changed from dual video sources to single CI recording
- Added helpful ffmpeg commands for video analysis:
  * Extract frames at specific times
  * Create thumbnail grids
  * Get video duration
  * Extract last N seconds

This simplifies the video recording setup by relying solely on
CI-level screen capture, which provides complete coverage of the
entire test run.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 11:21:46 +02:00
Alex PlateandClaude Sonnet 4.5 a4995affa9 Switch UI test video recorder from Monte to FFmpeg
The Monte recorder uses tscc (Camtasia) codec by default, which has
significant decoding limitations. When attempting to use Claude Code
and ffmpeg to analyze test failure videos, ffmpeg was unable to
properly extract frames beyond the first 7 seconds, even though the
full 27-second video was recorded.

The FFmpeg recorder produces standard video formats that can be fully
decoded and analyzed, enabling proper AI-assisted test failure analysis.

Configuration added to all UI test projects:
- tests/ui-ij-tests
- tests/ui-py-tests
- tests/ui-rd-tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 00:18:28 +02:00
Alex PlateandClaude Sonnet 4.5 5c0d9569d9 Fix(VIM-4109): Configure test source sets for Gradle 9+ compatibility
After upgrading to Gradle 9.2.1, custom Test tasks no longer
automatically inherit test source set configuration. This caused
UI test tasks to show NO-SOURCE and not execute any tests.

The fix explicitly configures testClassesDirs and classpath for
all three UI test modules:
- tests/ui-ij-tests
- tests/ui-py-tests
- tests/ui-rd-tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 18:51:08 +02:00
Alex Plate e991aa922c Try to increase timeout for UI tests for Rider 2025-06-24 17:24:56 +03:00
Alex Plate afa70e20e1 Correct the rider test 2025-05-09 15:27:43 +02:00
Alex Plate 6f3cf43bae Make a few tests for Rider
This should cover VIM-3826 issues
2025-03-27 17:34:24 +02:00
Alex Plate 9beca20037 Click Activate during testing 2025-03-27 15:17:14 +02:00
Alex Plate b882d60416 Trying to make Rider UI tests alive 2025-03-27 15:05:38 +02:00
Alex Plate 186feed8af Try to use trial for Rider tests 2025-03-14 16:13:51 +02:00
Alex Plate 2b1b4fc71e Create UI test for Rider 2025-03-14 16:01:03 +02:00
Alex Plate 3f22c6f9e4 Create UI tests for Rider 2025-03-14 13:50:52 +02:00