fix(m2-m3): data-testid on new-client+add-client btns; fix client subscriptions API response shape; update E2E specs
This commit is contained in:
@@ -38,7 +38,12 @@ test.describe('Dashboard', () => {
|
||||
});
|
||||
|
||||
test('New Client button navigates to clients', async ({ page }) => {
|
||||
await page.click('button:has-text("+ New Client")');
|
||||
// Wait for dashboard to fully render before interacting
|
||||
await expect(page.locator('h1:has-text("Dashboard")')).toBeVisible();
|
||||
// Use data-testid if available (post-deploy), fall back to text selector
|
||||
const btn = page.locator('[data-testid="new-client-btn"], button:has-text("+ New Client")').first();
|
||||
await expect(btn).toBeVisible({ timeout: 10000 });
|
||||
await btn.click();
|
||||
await expect(page).toHaveURL(/\/clients/);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user