test: Migrate Cypress test for the log view (#19108)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Suguru Inoue
2025-09-03 14:21:28 +02:00
committed by GitHub
parent 6bd4edf1ec
commit f7479bb2e5
17 changed files with 428 additions and 247 deletions

View File

@@ -42,7 +42,7 @@ export async function setupTestRequirements(
// 3. Setup API intercepts
if (requirements.intercepts) {
for (const [name, config] of Object.entries(requirements.intercepts)) {
for (const config of Object.values(requirements.intercepts)) {
await page.route(config.url, async (route) => {
await route.fulfill({
status: config.status ?? 200,
@@ -56,7 +56,12 @@ export async function setupTestRequirements(
// 4. Setup workflows
if (requirements.workflow) {
for (const [name, workflowData] of Object.entries(requirements.workflow)) {
const entries =
typeof requirements.workflow === 'string'
? [[requirements.workflow, requirements.workflow]]
: Object.entries(requirements.workflow);
for (const [name, workflowData] of entries) {
try {
// Import workflow using the n8n page object
await n8n.goHome();