@@ -2,7 +2,7 @@ import {expect, test} from '@playwright/test';
22
33import { tenantName } from '../../../../utils/constants' ;
44import { NavigationTabs , TenantPage } from '../../TenantPage' ;
5- import { longRunningQuery } from '../../constants' ;
5+ import { longRunningQuery , longRunningStreamQuery } from '../../constants' ;
66import { QueryEditor } from '../../queryEditor/models/QueryEditor' ;
77import {
88 Diagnostics ,
@@ -97,18 +97,37 @@ test.describe('Diagnostics Queries tab', async () => {
9797 ] ) ;
9898 } ) ;
9999
100- // TODO: https://github.com/ydb-platform/ydb-embedded-ui/issues/2459
101- test . skip ( 'Query tab first row has values for all columns in Top mode' , async ( { page } ) => {
100+ test ( 'Query tab first row has values for all columns in Top mode' , async ( { page } ) => {
101+ // First, run some CPU-intensive queries to generate data
102102 const pageQueryParams = {
103103 schema : tenantName ,
104104 database : tenantName ,
105- tenantPage : 'diagnostics' ,
106- diagnosticsTab : 'topQueries' ,
105+ tenantPage : 'query' ,
107106 } ;
108107 const tenantPage = new TenantPage ( page ) ;
109108 await tenantPage . goto ( pageQueryParams ) ;
110109
110+ const queryEditor = new QueryEditor ( page ) ;
111+
112+ // Run CPU-intensive stream query
113+ await queryEditor . setQuery ( longRunningStreamQuery ) ;
114+ await queryEditor . clickRunButton ( ) ;
115+
116+ // Wait for the query to complete
117+ await expect ( queryEditor . waitForStatus ( 'Completed' ) ) . resolves . toBe ( true ) ;
118+
119+ // Give some time for the queries to be recorded in the system
120+ await page . waitForTimeout ( 2000 ) ;
121+
122+ // Now navigate to diagnostics to check Top queries
123+ await tenantPage . selectNavigationTab ( NavigationTabs . Diagnostics ) ;
124+
111125 const diagnostics = new Diagnostics ( page ) ;
126+ await diagnostics . clickTab ( DiagnosticsTab . Queries ) ;
127+
128+ // Ensure we're in Top mode (should be default)
129+ const radioOption = await diagnostics . getSelectedTableMode ( ) ;
130+ expect ( radioOption ?. trim ( ) ) . toBe ( QueriesSwitch . Top ) ;
112131
113132 // Verify table has data
114133 await expect ( diagnostics . table . isVisible ( ) ) . resolves . toBe ( true ) ;
0 commit comments