feat: add task.spec.ts (task + issue comment flow), keep milestone data

- task.spec.ts: login → create project → create milestone → create task
  → create issue → add comment → verify → logout (no cleanup)
- milestone.spec.ts: remove cleanup step, keep project/milestone for inspection
This commit is contained in:
zhi
2026-03-16 07:26:38 +00:00
parent 5e3678ee67
commit b46e242cb7
2 changed files with 172 additions and 24 deletions

View File

@@ -135,30 +135,7 @@ test.describe('Milestone Editor', () => {
expect(hasMilestone).toBe(true);
console.log('✅ Milestone verified in UI');
// Step 6: Cleanup — delete the project we created
console.log('🧹 Cleaning up — deleting project...');
await page.click('a:has-text("📁 Projects")');
await page.waitForLoadState('networkidle');
await page.waitForSelector(`.project-card:has-text("${projectName}")`, { timeout: 10000 });
await page.click(`.project-card:has-text("${projectName}")`);
await page.waitForLoadState('networkidle');
await page.waitForTimeout(1000);
const deleteBtn = page.locator('button:has-text("Delete")');
if (await deleteBtn.isVisible().catch(() => false)) {
page.on('dialog', async dialog => {
const match = dialog.message().match(/Type the project name "(.*)" to confirm/);
if (match) {
await dialog.accept(match[1]);
} else {
await dialog.accept();
}
});
await deleteBtn.click();
await page.waitForTimeout(2000);
console.log('✅ Project cleaned up');
}
// Note: intentionally NOT deleting the project/milestone — leave for inspection
console.log('🎉 All milestone tests passed!');
});
});