Skip to content

Commit 0198726

Browse files
authored
fix: unskip tests (#2514)
1 parent 7fa0358 commit 0198726

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed

tests/suites/tenant/diagnostics/tabs/queries.test.ts

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {expect, test} from '@playwright/test';
22

33
import {tenantName} from '../../../../utils/constants';
44
import {NavigationTabs, TenantPage} from '../../TenantPage';
5-
import {longRunningQuery} from '../../constants';
5+
import {longRunningQuery, longRunningStreamQuery} from '../../constants';
66
import {QueryEditor} from '../../queryEditor/models/QueryEditor';
77
import {
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);

tests/suites/tenant/diagnostics/tabs/topShards.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,7 @@ test.describe('Diagnostics TopShards tab', async () => {
8989
}
9090
});
9191

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

0 commit comments

Comments
 (0)