test: fix E2E download test for empty config protection
Some checks failed
CI / build-and-test (push) Failing after 24m44s
Some checks failed
CI / build-and-test (push) Failing after 24m44s
This commit is contained in:
@@ -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")')
|
||||
|
||||
Reference in New Issue
Block a user