@@ -2,7 +2,7 @@ import {expect, test} from '@playwright/test';
2
2
3
3
import { tenantName } from '../../../../utils/constants' ;
4
4
import { NavigationTabs , TenantPage } from '../../TenantPage' ;
5
- import { longRunningQuery } from '../../constants' ;
5
+ import { longRunningQuery , longRunningStreamQuery } from '../../constants' ;
6
6
import { QueryEditor } from '../../queryEditor/models/QueryEditor' ;
7
7
import {
8
8
Diagnostics ,
@@ -97,18 +97,37 @@ test.describe('Diagnostics Queries tab', async () => {
97
97
] ) ;
98
98
} ) ;
99
99
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
102
102
const pageQueryParams = {
103
103
schema : tenantName ,
104
104
database : tenantName ,
105
- tenantPage : 'diagnostics' ,
106
- diagnosticsTab : 'topQueries' ,
105
+ tenantPage : 'query' ,
107
106
} ;
108
107
const tenantPage = new TenantPage ( page ) ;
109
108
await tenantPage . goto ( pageQueryParams ) ;
110
109
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
+
111
125
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 ) ;
112
131
113
132
// Verify table has data
114
133
await expect ( diagnostics . table . isVisible ( ) ) . resolves . toBe ( true ) ;
0 commit comments