Skip to content

Commit 7f10d47

Browse files
eprifticlaude
andcommitted
fix: E2E create project test — click + button then fill form
The "New Project" button is a + icon (btn-new class), not a text button. The test now clicks the + to reveal the form, fills the name input, then clicks the Create button. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7af2eb2 commit 7f10d47

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

‎tests/e2e/e2e.spec.mjs‎

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,18 @@ test.describe.serial('PredomicsApp E2E', () => {
112112
await page.waitForTimeout(2000)
113113
await dismissOverlays(page)
114114

115-
// Click create project button
116-
const createBtn = page.locator('button:has-text("New Project"), button:has-text("Create")')
117-
await createBtn.click()
115+
// Click the "+" button to reveal the create form
116+
const newBtn = page.locator('button.btn-new, button[title="New project"]')
117+
await newBtn.click()
118118
await page.waitForTimeout(500)
119119

120-
// Fill project form
120+
// Fill project name
121121
const nameInput = page.locator('input[placeholder*="name" i], input[name="name"]')
122-
if (await nameInput.isVisible()) {
123-
await nameInput.fill('E2E Test Project')
124-
}
122+
await nameInput.fill('E2E Test Project')
125123

126-
const submitBtn = page.locator('.modal button:has-text("Create"), .modal button[type="submit"]')
127-
if (await submitBtn.isVisible()) {
128-
await submitBtn.click()
129-
}
124+
// Click "Create" button in the form
125+
const submitBtn = page.locator('button:has-text("Create")')
126+
await submitBtn.click()
130127
await page.waitForTimeout(3000)
131128

132129
// Extract project ID from URL or API

0 commit comments

Comments
 (0)