Skip to content

Add verification that files are opened in the editor after clicking in project tree#23754

Merged
dmytro-ndp merged 1 commit intoeclipse-che:mainfrom
SkorikSergey:add-file-open-verification-in-editor
Feb 27, 2026
Merged

Add verification that files are opened in the editor after clicking in project tree#23754
dmytro-ndp merged 1 commit intoeclipse-che:mainfrom
SkorikSergey:add-file-open-verification-in-editor

Conversation

@SkorikSergey
Copy link
Contributor

What does this PR do?

When clicking on a file in the Project Explorer to open it, sometimes the file doesn't actually open in the Editor - especially after closing the Trust Author dialog. Tests would proceed without verifying the file was opened, leading to failures in subsequent steps that depend on the file being open.

Solution
Added openFileAndVerify() method to ProjectAndFileTests.ts that:

  • Opens a file using projectSection.openItem()
  • Verifies the file appears in the editor tabs using EditorView.getOpenEditorTitles()
  • Retries up to 2 times if the file doesn't open on the first attempt
  • Throws a descriptive error if all attempts fail

Benefits

  • Ensures file is actually opened before proceeding with test actions
  • Provides retry mechanism for flaky file opening after dialogs
  • Reusable method available for other tests that need to open files

Screenshot/screencast of this PR

What issues does this PR fix or reference?

https://issues.redhat.com/browse/CRW-10220

How to test this PR?

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@SkorikSergey SkorikSergey marked this pull request as ready for review February 26, 2026 14:01
@artaleks9
Copy link
Contributor

IMHO, PR looks good, can be merged.
Just to clarify: was there a launch the E2E test with these changes ?

@SkorikSergey
Copy link
Contributor Author

IMHO, PR looks good, can be merged. Just to clarify: was there a launch the E2E test with these changes ?

@artaleks9 thank you for review. I tested these changes several times on DS 3.26.0 from my laptop.

Copy link
Contributor

@dmytro-ndp dmytro-ndp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional-tests pipeline run didn't show regression.

ExtensionActivationTest test has passed.

Well done, @SkorikSergey

@dmytro-ndp dmytro-ndp merged commit 460bbeb into eclipse-che:main Feb 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants