Some checks are pending
Go Benchmark / Performance Regression Check (push) Waiting to run
Cerberus Integration / Cerberus Security Stack Integration (push) Waiting to run
Upload Coverage to Codecov / Backend Codecov Upload (push) Waiting to run
Upload Coverage to Codecov / Frontend Codecov Upload (push) Waiting to run
CodeQL - Analyze / CodeQL analysis (go) (push) Waiting to run
CodeQL - Analyze / CodeQL analysis (javascript-typescript) (push) Waiting to run
CrowdSec Integration / CrowdSec Bouncer Integration (push) Waiting to run
Docker Build, Publish & Test / build-and-push (push) Waiting to run
Docker Build, Publish & Test / Security Scan PR Image (push) Blocked by required conditions
Quality Checks / Auth Route Protection Contract (push) Waiting to run
Quality Checks / Codecov Trigger/Comment Parity Guard (push) Waiting to run
Quality Checks / Backend (Go) (push) Waiting to run
Quality Checks / Frontend (React) (push) Waiting to run
Rate Limit integration / Rate Limiting Integration (push) Waiting to run
Security Scan (PR) / Trivy Binary Scan (push) Waiting to run
Supply Chain Verification (PR) / Verify Supply Chain (push) Waiting to run
WAF integration / Coraza WAF Integration (push) Waiting to run
41 lines
1.7 KiB
TypeScript
Executable File
41 lines
1.7 KiB
TypeScript
Executable File
|
|
import { test, expect, loginUser } from '../fixtures/auth-fixtures'; // Use the fixture that provides adminUser
|
|
import { waitForLoadingComplete } from '../utils/wait-helpers';
|
|
|
|
test('Determine what is keeping the loader active', async ({ page, adminUser }) => {
|
|
test.setTimeout(60000);
|
|
console.log('Logging in...');
|
|
await loginUser(page, adminUser);
|
|
console.log('Logged in. Waiting for dashboard loader...');
|
|
await waitForLoadingComplete(page);
|
|
|
|
console.log('Navigating to /certificates...');
|
|
await page.goto('/certificates');
|
|
|
|
const loaderSelector = '[role="progressbar"], [aria-busy="true"], .loading-spinner, .loading, .spinner, [data-loading="true"], .animate-pulse';
|
|
|
|
console.log('Polling for loaders...');
|
|
// Poll for 15 seconds printing what we see
|
|
let start = Date.now();
|
|
while (Date.now() - start < 15000) {
|
|
const loaders = page.locator(loaderSelector);
|
|
const count = await loaders.count();
|
|
if (count > 0) {
|
|
console.log(`[${Date.now() - start}ms] Found ${count} loaders`);
|
|
if (count < 5) { // Only log details if count is small to avoid spamming 35 items
|
|
for(let i=0; i<count; i++) {
|
|
const html = await loaders.nth(i).evaluate(el => el.outerHTML).catch(() => 'detached');
|
|
console.log(`Loader ${i}: ${html}`);
|
|
}
|
|
} else {
|
|
console.log(`(Too many to list individually, count=${count})`);
|
|
const firstHtml = await loaders.first().evaluate(el => el.outerHTML).catch(() => 'detached');
|
|
console.log(`First loader: ${firstHtml}`);
|
|
}
|
|
} else {
|
|
console.log(`[${Date.now() - start}ms] 0 loaders found.`);
|
|
}
|
|
await page.waitForTimeout(500);
|
|
}
|
|
});
|