Skip to content

Commit 68bb83c

Browse files
committed
fix: tests
1 parent 11115e6 commit 68bb83c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

tests/suites/tenant/diagnostics/Diagnostics.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,12 @@ export class Diagnostics {
338338
return (await statusElement.textContent())?.trim() || '';
339339
}
340340

341+
async hasHealthcheckStatusClass(className: string) {
342+
const statusElement = this.healthcheckCard.locator('.ydb-healthcheck-preview__icon');
343+
const classList = await statusElement.evaluate((el) => Array.from(el.classList));
344+
return classList.includes(className);
345+
}
346+
341347
async selectTopShardsMode(mode: TopShardsMode): Promise<void> {
342348
const option = this.tableRadioButton.locator(`.g-radio-button__option:has-text("${mode}")`);
343349
await option.evaluate((el) => (el as HTMLElement).click());

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ test.describe('Diagnostics Info tab', async () => {
5252
await diagnostics.clickTab(DiagnosticsTab.Info);
5353

5454
const status = await diagnostics.getHealthcheckStatus();
55-
expect(status).toBe('GOOD');
55+
expect(status).toBeTruthy();
56+
57+
const isGood = await diagnostics.hasHealthcheckStatusClass(
58+
'ydb-healthcheck-preview__icon_good',
59+
);
60+
expect(isGood).toBe(true);
5661
});
5762
});

0 commit comments

Comments
 (0)