feat(portal): add loading refresh status

This commit is contained in:
igor04091968
2026-06-04 19:35:31 +03:00
parent a672941cc7
commit dfecc637b5
5 changed files with 406 additions and 32 deletions
+12
View File
@@ -104,6 +104,18 @@ async function main() {
try {
await page.goto(url, { waitUntil: "domcontentloaded", timeout });
await page.waitForSelector(".tab", { timeout });
await page.waitForFunction(
() => document.querySelector("#loadingStateText")?.textContent === "READY",
null,
{ timeout },
);
checks.push({
name: "loading_refresh_status_ready",
ok:
(await page.locator("#loadingStatus").count()) === 1
&& (await page.locator("#loadingStageText").innerText({ timeout })).includes("Данные загружены")
&& !(await page.locator("body").innerText({ timeout })).includes("Данные загружаются"),
});
for (const item of expectedTabs) {
await page.click(`button[data-tab="${item.tab}"]`, { timeout });
await page.waitForFunction(