Merge branch 'v0.11.0rc' into claude/issue-469-20260113-1744

This commit is contained in:
webdevcody
2026-01-13 14:59:14 -05:00
78 changed files with 2645 additions and 1369 deletions

View File

@@ -33,27 +33,29 @@ test.describe('Project Creation', () => {
const projectName = `test-project-${Date.now()}`;
await setupWelcomeView(page, { workspaceDir: TEST_TEMP_DIR });
await authenticateForTests(page);
// Intercept settings API to ensure it doesn't return a currentProjectId
// This prevents settings hydration from restoring a project
// Intercept settings API BEFORE authenticateForTests (which navigates to the page)
// This prevents settings hydration from restoring a project and disables auto-open
await page.route('**/api/settings/global', async (route) => {
const response = await route.fetch();
const json = await response.json();
// Remove currentProjectId to prevent restoring a project
// Remove currentProjectId and clear projects to prevent auto-open
if (json.settings) {
json.settings.currentProjectId = null;
json.settings.projects = [];
}
await route.fulfill({ response, json });
});
// Navigate to root
await page.goto('/');
await authenticateForTests(page);
// Navigate directly to dashboard to avoid auto-open logic
await page.goto('/dashboard');
await page.waitForLoadState('load');
await handleLoginScreenIfPresent(page);
// Wait for welcome view to be visible
await expect(page.locator('[data-testid="welcome-view"]')).toBeVisible({ timeout: 15000 });
// Wait for dashboard view
await expect(page.locator('[data-testid="dashboard-view"]')).toBeVisible({ timeout: 15000 });
await page.locator('[data-testid="create-new-project"]').click();
await page.locator('[data-testid="quick-setup-option"]').click();
@@ -67,10 +69,18 @@ test.describe('Project Creation', () => {
await expect(page.locator('[data-testid="board-view"]')).toBeVisible({ timeout: 15000 });
// 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);
}
// Wait for project to be set as current and visible on the page
// The project name appears in multiple places: project-selector, board header paragraph, etc.
// Check any element containing the project name
await expect(page.getByText(projectName).first()).toBeVisible({ timeout: 15000 });
// The project name appears in the sidebar project selector button
await expect(page.getByRole('button', { name: new RegExp(projectName) })).toBeVisible({
timeout: 15000,
});
// Project was created successfully if we're on board view with project name visible
// Note: The actual project directory is created in the server's default workspace,

View File

@@ -113,12 +113,13 @@ test.describe('Open Project', () => {
// Now navigate to the app
await authenticateForTests(page);
await page.goto('/');
// Navigate directly to dashboard to avoid auto-open which would bypass the project selection
await page.goto('/dashboard');
await page.waitForLoadState('load');
await handleLoginScreenIfPresent(page);
// Wait for welcome view to be visible
await expect(page.locator('[data-testid="welcome-view"]')).toBeVisible({ timeout: 15000 });
// Wait for dashboard view
await expect(page.locator('[data-testid="dashboard-view"]')).toBeVisible({ timeout: 15000 });
// Verify we see the "Recent Projects" section
await expect(page.getByText('Recent Projects')).toBeVisible({ timeout: 5000 });
@@ -135,7 +136,7 @@ test.describe('Open Project', () => {
if (!isOurProjectVisible) {
// Our project isn't visible - use the first available recent project card instead
// This tests the "open recent project" flow even if our specific project didn't get injected
const firstProjectCard = page.locator('[data-testid^="recent-project-"]').first();
const firstProjectCard = page.locator('[data-testid^="project-card-"]').first();
await expect(firstProjectCard).toBeVisible({ timeout: 5000 });
// Get the project name from the card to verify later
targetProjectName = (await firstProjectCard.locator('p').first().textContent()) || '';
@@ -147,10 +148,19 @@ test.describe('Open Project', () => {
// Wait for the board view to appear (project was opened)
await expect(page.locator('[data-testid="board-view"]')).toBeVisible({ timeout: 15000 });
// 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);
}
// Wait for a project to be set as current and visible on the page
// The project name appears in multiple places: project-selector, board header paragraph, etc.
// The project name appears in the sidebar project selector button
if (targetProjectName) {
await expect(page.getByText(targetProjectName).first()).toBeVisible({ timeout: 15000 });
await expect(page.getByRole('button', { name: new RegExp(targetProjectName) })).toBeVisible({
timeout: 15000,
});
}
// Only verify filesystem if we opened our specific test project