Skip to content

Commit 48eecc9

Browse files
CopilotRaubzeug
andcommitted
fix: correct linter errors and formatting issues
Co-authored-by: Raubzeug <[email protected]>
1 parent f07b7c3 commit 48eecc9

File tree

3 files changed

+68
-54
lines changed

3 files changed

+68
-54
lines changed

src/store/reducers/node/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const prepareNodeData = (data: TEvSystemStateResponse): PreparedNode => {
99
}
1010

1111
const nodeData = data.SystemStateInfo[0];
12-
12+
1313
const preparedSystemState = prepareNodeSystemState(nodeData);
1414

1515
// Include Threads from the top-level response for the tab filtering logic

tests/suites/nodes/NodePage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ export class NodePage extends PageModel {
3939
const tabs = await this.tabs.locator('.g-tabs__item').allTextContents();
4040
return tabs;
4141
}
42-
}
42+
}

tests/suites/nodes/nodes.test.ts

Lines changed: 66 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {expect, test} from '@playwright/test';
22

33
import {backend} from '../../utils/constants';
4-
import {NodesPage} from '../nodes/NodesPage';
54
import {NodePage} from '../nodes/NodePage';
5+
import {NodesPage} from '../nodes/NodesPage';
66
import {ClusterNodesTable} from '../paginatedTable/paginatedTable';
77

88
test.describe('Test Nodes page', async () => {
@@ -201,42 +201,46 @@ test.describe('Test Node Page Threads Tab', async () => {
201201
await page.route(`${backend}/viewer/json/sysinfo?*`, async (route) => {
202202
await route.fulfill({
203203
json: {
204-
SystemStateInfo: [{
205-
Host: 'localhost',
206-
NodeId: 1,
207-
SystemState: 1, // Green
208-
Version: 'test-version',
209-
}],
204+
SystemStateInfo: [
205+
{
206+
Host: 'localhost',
207+
NodeId: 1,
208+
SystemState: 1, // Green
209+
Version: 'test-version',
210+
},
211+
],
210212
// No Threads property
211-
}
213+
},
212214
});
213215
});
214216

215217
const nodesPage = new NodesPage(page);
216218
await nodesPage.goto();
217-
219+
218220
// Get first node ID to navigate to
219221
const paginatedTable = new ClusterNodesTable(page);
220222
await paginatedTable.waitForTableToLoad();
221223
await paginatedTable.waitForTableData();
222-
224+
223225
// Click on first node to navigate to node page
224-
const firstRowLink = page.locator('.ydb-paginated-table__table tbody tr:first-child a').first();
226+
const firstRowLink = page
227+
.locator('.ydb-paginated-table__table tbody tr:first-child a')
228+
.first();
225229
await firstRowLink.click();
226-
230+
227231
// Wait for navigation to complete
228232
await page.waitForURL(/\/node\/\d+/);
229-
233+
230234
const nodeId = await page.url().match(/\/node\/(\d+)/)?.[1];
231235
expect(nodeId).toBeDefined();
232-
236+
233237
const nodePage = new NodePage(page, nodeId!);
234238
await nodePage.waitForNodePageLoad();
235-
239+
236240
// Verify threads tab is not visible
237241
const isThreadsTabVisible = await nodePage.isThreadsTabVisible();
238242
expect(isThreadsTabVisible).toBe(false);
239-
243+
240244
// Verify other tabs are still visible
241245
const tabNames = await nodePage.getAllTabNames();
242246
expect(tabNames).toContain('Tablets');
@@ -248,49 +252,55 @@ test.describe('Test Node Page Threads Tab', async () => {
248252
await page.route(`${backend}/viewer/json/sysinfo?*`, async (route) => {
249253
await route.fulfill({
250254
json: {
251-
SystemStateInfo: [{
252-
Host: 'localhost',
253-
NodeId: 1,
254-
SystemState: 1, // Green
255-
Version: 'test-version',
256-
}],
257-
Threads: [{
258-
Name: 'TestPool',
259-
Threads: 4
260-
}]
261-
}
255+
SystemStateInfo: [
256+
{
257+
Host: 'localhost',
258+
NodeId: 1,
259+
SystemState: 1, // Green
260+
Version: 'test-version',
261+
},
262+
],
263+
Threads: [
264+
{
265+
Name: 'TestPool',
266+
Threads: 4,
267+
},
268+
],
269+
},
262270
});
263271
});
264272

265273
const nodesPage = new NodesPage(page);
266274
await nodesPage.goto();
267-
275+
268276
// Get first node ID to navigate to
269277
const paginatedTable = new ClusterNodesTable(page);
270278
await paginatedTable.waitForTableToLoad();
271279
await paginatedTable.waitForTableData();
272-
280+
273281
// Click on first node to navigate to node page
274-
const firstRowLink = page.locator('.ydb-paginated-table__table tbody tr:first-child a').first();
282+
const firstRowLink = page
283+
.locator('.ydb-paginated-table__table tbody tr:first-child a')
284+
.first();
275285
await firstRowLink.click();
276-
286+
277287
// Wait for navigation to complete
278288
await page.waitForURL(/\/node\/\d+/);
279-
289+
280290
const nodeId = await page.url().match(/\/node\/(\d+)/)?.[1];
281291
expect(nodeId).toBeDefined();
282-
292+
283293
const nodePage = new NodePage(page, nodeId!);
284294
await nodePage.waitForNodePageLoad();
285-
295+
286296
// Verify threads tab is visible
287297
const isThreadsTabVisible = await nodePage.isThreadsTabVisible();
288298
expect(isThreadsTabVisible).toBe(true);
289-
299+
290300
// Verify can click on threads tab
291301
await nodePage.clickThreadsTab();
292302
await page.waitForURL(/\/node\/\d+\/threads/);
293-
303+
294304
// Verify other tabs are also visible
295305
const tabNames = await nodePage.getAllTabNames();
296306
expect(tabNames).toContain('Tablets');
@@ -302,42 +312,46 @@ test.describe('Test Node Page Threads Tab', async () => {
302312
await page.route(`${backend}/viewer/json/sysinfo?*`, async (route) => {
303313
await route.fulfill({
304314
json: {
305-
SystemStateInfo: [{
306-
Host: 'localhost',
307-
NodeId: 1,
308-
SystemState: 1, // Green
309-
Version: 'test-version',
310-
}],
311-
Threads: [] // Empty array
312-
}
315+
SystemStateInfo: [
316+
{
317+
Host: 'localhost',
318+
NodeId: 1,
319+
SystemState: 1, // Green
320+
Version: 'test-version',
321+
},
322+
],
323+
Threads: [], // Empty array
324+
},
313325
});
314326
});
315327

316328
const nodesPage = new NodesPage(page);
317329
await nodesPage.goto();
318-
330+
319331
// Get first node ID to navigate to
320332
const paginatedTable = new ClusterNodesTable(page);
321333
await paginatedTable.waitForTableToLoad();
322334
await paginatedTable.waitForTableData();
323-
335+
324336
// Click on first node to navigate to node page
325-
const firstRowLink = page.locator('.ydb-paginated-table__table tbody tr:first-child a').first();
337+
const firstRowLink = page
338+
.locator('.ydb-paginated-table__table tbody tr:first-child a')
339+
.first();
326340
await firstRowLink.click();
327-
341+
328342
// Wait for navigation to complete
329343
await page.waitForURL(/\/node\/\d+/);
330-
344+
331345
const nodeId = await page.url().match(/\/node\/(\d+)/)?.[1];
332346
expect(nodeId).toBeDefined();
333-
347+
334348
const nodePage = new NodePage(page, nodeId!);
335349
await nodePage.waitForNodePageLoad();
336-
350+
337351
// Verify threads tab is not visible
338352
const isThreadsTabVisible = await nodePage.isThreadsTabVisible();
339353
expect(isThreadsTabVisible).toBe(false);
340-
354+
341355
// Verify other tabs are still visible
342356
const tabNames = await nodePage.getAllTabNames();
343357
expect(tabNames).toContain('Tablets');

0 commit comments

Comments
 (0)