mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 08:13:37 +00:00
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:
@@ -152,7 +152,8 @@ export async function navigateToSetup(page: Page): Promise<void> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigate to the welcome view (clear project selection)
|
||||
* Navigate to the welcome/dashboard view (clear project selection)
|
||||
* Note: The app redirects from / to /dashboard when no project is selected
|
||||
*/
|
||||
export async function navigateToWelcome(page: Page): Promise<void> {
|
||||
// Authenticate before navigating
|
||||
@@ -167,7 +168,11 @@ export async function navigateToWelcome(page: Page): Promise<void> {
|
||||
// Handle login redirect if needed
|
||||
await handleLoginScreenIfPresent(page);
|
||||
|
||||
await waitForElement(page, 'welcome-view', { timeout: 10000 });
|
||||
// Wait for either welcome-view or dashboard-view (app redirects to /dashboard when no project)
|
||||
await page
|
||||
.locator('[data-testid="welcome-view"], [data-testid="dashboard-view"]')
|
||||
.first()
|
||||
.waitFor({ state: 'visible', timeout: 10000 });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user