Skip to content

fix: unskip tests #2514

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
Jun 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions tests/suites/tenant/diagnostics/tabs/queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {expect, test} from '@playwright/test';

import {tenantName} from '../../../../utils/constants';
import {NavigationTabs, TenantPage} from '../../TenantPage';
import {longRunningQuery} from '../../constants';
import {longRunningQuery, longRunningStreamQuery} from '../../constants';
import {QueryEditor} from '../../queryEditor/models/QueryEditor';
import {
Diagnostics,
Expand Down Expand Up @@ -97,18 +97,37 @@ test.describe('Diagnostics Queries tab', async () => {
]);
});

// TODO: https://github.com/ydb-platform/ydb-embedded-ui/issues/2459
test.skip('Query tab first row has values for all columns in Top mode', async ({page}) => {
test('Query tab first row has values for all columns in Top mode', async ({page}) => {
// First, run some CPU-intensive queries to generate data
const pageQueryParams = {
schema: tenantName,
database: tenantName,
tenantPage: 'diagnostics',
diagnosticsTab: 'topQueries',
tenantPage: 'query',
};
const tenantPage = new TenantPage(page);
await tenantPage.goto(pageQueryParams);

const queryEditor = new QueryEditor(page);

// Run CPU-intensive stream query
await queryEditor.setQuery(longRunningStreamQuery);
await queryEditor.clickRunButton();

// Wait for the query to complete
await expect(queryEditor.waitForStatus('Completed')).resolves.toBe(true);

// Give some time for the queries to be recorded in the system
await page.waitForTimeout(2000);
Comment on lines +119 to +120
Copy link
Preview

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

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

Relying on a fixed waitForTimeout can make the test flaky. Consider waiting for a specific network response or UI element to ensure data is ready before proceeding.

Suggested change
// Give some time for the queries to be recorded in the system
await page.waitForTimeout(2000);
// Wait for the queries to be recorded in the system
await expect(async () => {
const diagnostics = new Diagnostics(page);
await diagnostics.clickTab(DiagnosticsTab.Queries);
const rowCount = await diagnostics.table.getRowCount();
return rowCount > 0;
}).toBeTruthy();

Copilot uses AI. Check for mistakes.


// Now navigate to diagnostics to check Top queries
await tenantPage.selectNavigationTab(NavigationTabs.Diagnostics);

const diagnostics = new Diagnostics(page);
await diagnostics.clickTab(DiagnosticsTab.Queries);

// Ensure we're in Top mode (should be default)
const radioOption = await diagnostics.getSelectedTableMode();
expect(radioOption?.trim()).toBe(QueriesSwitch.Top);

// Verify table has data
await expect(diagnostics.table.isVisible()).resolves.toBe(true);
Expand Down
5 changes: 1 addition & 4 deletions tests/suites/tenant/diagnostics/tabs/topShards.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ test.describe('Diagnostics TopShards tab', async () => {
}
});

// TODO: https://github.com/ydb-platform/ydb-embedded-ui/issues/2459
test.skip('TopShards tab first row has values for all columns in History mode', async ({
page,
}) => {
test('TopShards tab first row has values for all columns in History mode', async ({page}) => {
// Setup mock for TopShards tab in History mode
await setupTopShardsHistoryMock(page);

Expand Down
Loading