test: fix E2E download test for empty config protection
Some checks failed
CI / build-and-test (push) Failing after 24m44s

This commit is contained in:
sokol
2026-02-20 11:57:56 +03:00
parent e4b44c7b5e
commit 9c94aa1df5
2 changed files with 15 additions and 11 deletions

View File

@@ -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")')