test: update project view tests for dashboard integration

- Modified tests to navigate directly to the dashboard instead of the welcome view, ensuring a smoother project selection process.
- Updated project name verification to check against the sidebar button instead of multiple elements.
- Added logic to expand the sidebar if collapsed, improving visibility for project names during tests.
- Adjusted test assertions to reflect changes in the UI structure, including the introduction of the dashboard view.
This commit is contained in:
webdevcody
2026-01-12 21:23:33 -05:00
parent 0c68fcc8c8
commit c796adbae8
8 changed files with 104 additions and 49 deletions

View File

@@ -123,8 +123,17 @@ test.describe('Feature Manual Review Flow', () => {
await waitForNetworkIdle(page);
await expect(page.locator('[data-testid="board-view"]')).toBeVisible({ timeout: 10000 });
// Verify we're on the correct project
await expect(page.getByText(projectName).first()).toBeVisible({ timeout: 10000 });
// Expand sidebar if collapsed to see project name
const expandSidebarButton = page.locator('button:has-text("Expand sidebar")');
if (await expandSidebarButton.isVisible()) {
await expandSidebarButton.click();
await page.waitForTimeout(300);
}
// Verify we're on the correct project (project name appears in sidebar button)
await expect(page.getByRole('button', { name: new RegExp(projectName) })).toBeVisible({
timeout: 10000,
});
// Create the feature via HTTP API (writes to disk)
const feature = {