Fix explorer address list regression and live link checks

This commit is contained in:
defiQUG
2026-03-28 13:44:47 -07:00
parent a2555b4149
commit 0ea1c3b176
2 changed files with 24 additions and 12 deletions

View File

@@ -50,6 +50,7 @@ test.describe('Explorer Frontend - Nav and Detail Links', () => {
test('Address breadcrumb home link returns to root', async ({ page }) => {
await page.goto(`${EXPLORER_URL}/address/${ADDRESS_TEST}`, { waitUntil: 'networkidle', timeout: 20000 })
await page.waitForSelector('#addressDetailBreadcrumb', { state: 'attached', timeout: 15000 })
const homeLink = page.locator('#addressDetailBreadcrumb a[href="/"]').first()
await expect(homeLink).toBeVisible({ timeout: 8000 })
await homeLink.click()
@@ -58,28 +59,29 @@ test.describe('Explorer Frontend - Nav and Detail Links', () => {
test('Blocks list opens block detail view', async ({ page }) => {
await page.goto(`${EXPLORER_URL}/blocks`, { waitUntil: 'networkidle', timeout: 20000 })
const blockLink = page.locator('[onclick*="showBlockDetail"]').first()
await expect(blockLink).toBeVisible({ timeout: 8000 })
await blockLink.click()
await expect(page.locator('#blockDetailView.active')).toBeVisible({ timeout: 8000 })
const blockRow = page.locator('#blocksList tbody tr').first()
await expect(blockRow).toBeVisible({ timeout: 8000 })
await blockRow.click()
await expect(page).toHaveURL(/\/block\/\d+/, { timeout: 8000 })
await expect(page.locator('#blockDetailBreadcrumb')).toBeVisible({ timeout: 8000 })
})
test('Transactions list opens transaction detail view', async ({ page }) => {
await page.goto(`${EXPLORER_URL}/transactions`, { waitUntil: 'networkidle', timeout: 20000 })
const transactionLink = page.locator('[onclick*="showTransactionDetail"]').first()
await expect(transactionLink).toBeVisible({ timeout: 8000 })
await transactionLink.click()
await expect(page.locator('#transactionDetailView.active')).toBeVisible({ timeout: 8000 })
const transactionRow = page.locator('#allTransactions tbody tr').first()
await expect(transactionRow).toBeVisible({ timeout: 8000 })
await transactionRow.click()
await expect(page).toHaveURL(/\/tx\/0x[a-f0-9]+/i, { timeout: 8000 })
await expect(page.locator('#transactionDetailBreadcrumb')).toBeVisible({ timeout: 8000 })
})
test('Addresses list opens address detail view', async ({ page }) => {
await page.goto(`${EXPLORER_URL}/addresses`, { waitUntil: 'networkidle', timeout: 20000 })
const addressLink = page.locator('[onclick*="showAddressDetail"]').first()
await expect(addressLink).toBeVisible({ timeout: 8000 })
await addressLink.click()
await expect(page.locator('#addressDetailView.active')).toBeVisible({ timeout: 8000 })
const addressRow = page.locator('#addressesList tbody tr').first()
await expect(addressRow).toBeVisible({ timeout: 8000 })
await expect(addressRow).not.toContainText('N/A')
await addressRow.click()
await expect(page).toHaveURL(/\/address\/0x[a-f0-9]+/i, { timeout: 8000 })
await expect(page.locator('#addressDetailBreadcrumb')).toBeVisible({ timeout: 8000 })
})
})