fix(tests): iteration 19

This commit is contained in:
Mohamed Boudra
2026-03-13 13:43:34 +07:00
parent 99bac0fd27
commit 70191ceaa8
2 changed files with 22 additions and 6 deletions
+8 -3
View File
@@ -18,7 +18,10 @@ test.describe.configure({ timeout: 180000 });
async function openWorkspaceAgentTab(page: Page, agentId: string) { async function openWorkspaceAgentTab(page: Page, agentId: string) {
const tab = page.getByTestId(`workspace-tab-agent_${agentId}`).first(); const tab = page.getByTestId(`workspace-tab-agent_${agentId}`).first();
await expect(tab).toBeVisible({ timeout: 30000 }); await expect(tab).toBeVisible({ timeout: 30000 });
await tab.click(); const trigger = tab.getByRole("button").first();
const clickableTarget = (await trigger.count()) > 0 ? trigger : tab;
await clickableTarget.scrollIntoViewIfNeeded();
await clickableTarget.click({ timeout: 5000 });
} }
function buildWorkspaceDraftUrl(workspaceUrl: string) { function buildWorkspaceDraftUrl(workspaceUrl: string) {
@@ -120,8 +123,10 @@ test("sticky mode stays pinned through composer growth and viewport resize, but
await expectNearBottom(page); await expectNearBottom(page);
await expect(page.getByTestId("scroll-to-bottom-button")).toHaveCount(0); await expect(page.getByTestId("scroll-to-bottom-button")).toHaveCount(0);
await page.setViewportSize({ width: 820, height: 760 }); await page.setViewportSize({ width: 1040, height: 760 });
await openWorkspaceAgentTab(page, agent.id); await expect(page.getByTestId(`workspace-tab-agent_${agent.id}`).first()).toBeVisible({
timeout: 30000,
});
await waitForAgentReady(page, agent.expectedTailText); await waitForAgentReady(page, agent.expectedTailText);
await expectNearBottom(page); await expectNearBottom(page);
+14 -3
View File
@@ -3,9 +3,20 @@ import { defineConfig } from "vitest/config";
export default defineConfig({ export default defineConfig({
resolve: { resolve: {
alias: { alias: [
"@server": path.resolve(__dirname, "./src"), {
}, find: /^@getpaseo\/relay\/e2ee$/,
replacement: path.resolve(__dirname, "../relay/src/e2ee.ts"),
},
{
find: /^@getpaseo\/relay$/,
replacement: path.resolve(__dirname, "../relay/src/index.ts"),
},
{
find: "@server",
replacement: path.resolve(__dirname, "./src"),
},
],
}, },
test: { test: {
testTimeout: 30000, testTimeout: 30000,