From 9c94aa1df56163835bf3f7a3bda7770c15e6ae6f Mon Sep 17 00:00:00 2001 From: sokol Date: Fri, 20 Feb 2026 11:57:56 +0300 Subject: [PATCH] test: fix E2E download test for empty config protection --- e2e/environment.spec.ts | 13 +++++++++++++ test-results/.last-run.json | 13 ++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/e2e/environment.spec.ts b/e2e/environment.spec.ts index f42f2c7..a8b1885 100644 --- a/e2e/environment.spec.ts +++ b/e2e/environment.spec.ts @@ -179,6 +179,19 @@ test.describe('Environment Management', () => { await page.goto('/'); await page.click('button:has-text("New Config")'); await page.waitForTimeout(500); + + // Add a parameter to make the config non-empty (Download button requires non-empty config) + await page.click('button[title="Add parameter"]'); + await page.waitForTimeout(300); + const nameInput = page.locator('input[placeholder="Parameter name"]').last(); + const valueInput = page.locator('input[placeholder="Parameter value"]').last(); + const addButton = page.locator('button[title="Add parameter"]').last(); + await nameInput.fill('host'); + await valueInput.fill('localhost'); + await addButton.click(); + await page.waitForTimeout(500); + + // Now download should work const [download] = await Promise.all([ page.waitForEvent('download'), page.click('button:has-text("Download")') diff --git a/test-results/.last-run.json b/test-results/.last-run.json index 9d69b49..cbcc1fb 100644 --- a/test-results/.last-run.json +++ b/test-results/.last-run.json @@ -1,13 +1,4 @@ { - "status": "failed", - "failedTests": [ - "2a84b67ca6571daf27b7-7e9801b0b833c50af541", - "2a84b67ca6571daf27b7-17ce5649ea02e0d09692", - "2a84b67ca6571daf27b7-46f1d47e52a9de8bb54e", - "2a84b67ca6571daf27b7-5ac3b387f0f8104531f1", - "2a84b67ca6571daf27b7-61b44892e9e54397b980", - "2a84b67ca6571daf27b7-e38411b679b6dd8a5f2c", - "2a84b67ca6571daf27b7-ca92b197b6f7ecc9f092", - "2a84b67ca6571daf27b7-0c2a356d8582be760d5f" - ] + "status": "passed", + "failedTests": [] } \ No newline at end of file