fix/test-jenkins-fixed-asset-boton

This commit is contained in:
2026-05-27 10:08:41 -06:00
parent d0cba78f83
commit adb0b5e4d7

View File

@@ -52,11 +52,22 @@ setup('autenticacion', async ({ page }) => {
throw e
}
if (/\/app-launcher/.test(page.url())) {
await page.getByRole('button', { name: /^anexo76-dev/i }).click()
// Nuevo botón de Fixed Assets en el launcher de Workspace.
// Intentar primero el botón de Fixed Asset y, si no existe (compatibilidad),
// caer al botón legacy de anexo76-dev.
const fixedAssetButton = page.getByRole('button', {
name: /fixed asset|activo fijo/i
})
if (await fixedAssetButton.isVisible().catch(() => false)) {
await fixedAssetButton.click()
} else {
await page.getByRole('button', { name: /^anexo76-dev/i }).click()
}
}
// ── 4. Esperar redirect SSO con active_system=fixed_asset ────────────────
await expect(page).toHaveURL(/active_system=fixed_asset/, { timeout: 30_000 })
// ── 4. Esperar redirect SSO con active_system=fixed_asset y luego /dashboard ──
await page.waitForURL(/\/auth\/sso\?.*active_system=fixed_asset/, { timeout: 30_000 })
await page.waitForURL(/\/dashboard/, { timeout: 30_000 })
// ── 5. ExchangeRateGuard abre un dialog modal en cada carga del dashboard
// si no existe un tipo de cambio para hoy. El guard espera a que