Skip to content

test(ObjectSummary): properly find virtualized tree element #1863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Jan 21, 2025

Closes #1861

Because of some changes in our tests or ydb docker, some of the tables, that we used in tests, occurred in the bottom virtualized part of the SchemaTree. Previously our tests wasn't able to locate such elements.

I added getTreeItem method to ObjectSummary test class, this method can locate object not only in the visible part of SchemaTree.

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
262 260 0 2 0

😟 No changes in tests. 😕

Bundle Size: ✅

Current: 80.05 MB | Main: 80.05 MB
Diff: 0.00 KB (0.00%)

✅ Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@@ -181,8 +195,49 @@ export class ObjectSummary {
return true;
}

async getTreeItem(text: string) {
Copy link
Member Author

Choose a reason for hiding this comment

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

It can locate elements both in visible and in virtualized part of the tree (first 2000px only)

const itemLocator = this.treeRows.filter({hasText: text}).first();

// Default timeout is too big for such case
const timeout = 500;
Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't use default timeouts here because they are too big for such case. In this method we assume, that the tree is present and already loaded with isTreeVisible and isTreeLoaded. We spend little time to check elements, since in the worst scenario there will be 10 loops - with default timeout (VISIBILITY_TIMEOUT) it may be more than 100 seconds for one function call (in my version max is about 7 seconds)

@artemmufazalov artemmufazalov added this pull request to the merge queue Jan 21, 2025
Merged via the queue into main with commit df5e07b Jan 21, 2025
7 checks passed
@artemmufazalov artemmufazalov deleted the 1861-fix-e2e-tests branch January 21, 2025 17:25
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.

Fix broken e2e tests
3 participants