Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2d0340e
fix: improve cloud sync tests to handle asynchronous loading and incr…
bobqiu-kong Aug 25, 2026
862bfff
fix: add slow test marker to improve stability of cloud sync tests
bobqiu-kong Aug 25, 2026
8386374
fix: enhance cloud sync tests by adding robust menu item click handling
bobqiu-kong Aug 26, 2026
e09c0da
fix: improve Git Sync dropdown interaction by increasing retry attemp…
bobqiu-kong Aug 26, 2026
7c66b9f
fix: resolve tooltip interference by moving mouse off sidebar before …
bobqiu-kong Aug 26, 2026
cc8a08e
fix: adjust cloud sync test command to improve reliability by removin…
bobqiu-kong Aug 26, 2026
41904cb
fix: update cloud sync test command to remove unnecessary flag for im…
bobqiu-kong Aug 26, 2026
cc3899b
fix: extend timeout for request row visibility to improve reliability…
bobqiu-kong Aug 26, 2026
f5cd2ef
fix: increase timeout for request row visibility to enhance reliabili…
bobqiu-kong Aug 26, 2026
0795946
fix: enhance fetchUnsyncedWorkspace to verify visibility with retries…
bobqiu-kong Aug 26, 2026
359245f
fix: update cloud sync test command to allow one max failure for impr…
bobqiu-kong Aug 26, 2026
e602e02
fix: improve cloud sync test reliability by refining workspace fetchi…
bobqiu-kong Aug 26, 2026
8c029fa
fix: improve cloud sync test reliability by changing strategy to use …
bobqiu-kong Aug 26, 2026
a0a1f2b
Merge branch 'develop' into fix/fix-flaky-cloud-sync-tests
bobqiu-kong Aug 26, 2026
6977104
Merge branch 'develop' into fix/fix-flaky-cloud-sync-tests
bobqiu-kong Aug 26, 2026
c2e5d3b
fix: enhance cloud sync test reliability by enabling fail-fast and ad…
bobqiu-kong Aug 26, 2026
43565db
fix: adjust visibility wait timeout and retry attempts for improved t…
bobqiu-kong Aug 26, 2026
ba34ea8
fix: improve cloud sync test strategy by adjusting fail-fast behavior…
bobqiu-kong Aug 26, 2026
2b15a3f
Merge branch 'develop' into fix/fix-flaky-cloud-sync-tests
bobqiu-kong Aug 26, 2026
8191118
fix: enhance cloud sync test reliability by increasing retry attempts…
bobqiu-kong Aug 27, 2026
74da8ca
fix: improve cloud sync test strategy by disabling fail-fast and upda…
bobqiu-kong Aug 27, 2026
a481174
Merge branch 'develop' into fix/fix-flaky-cloud-sync-tests
bobqiu-kong Aug 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,10 @@ export class NavigationSidebar {
return this.unsyncedWorkspaceRow(workspaceName).getByRole('button', { name: 'Fetch unsynced workspace' });
}

async fetchUnsyncedWorkspace(name: string): Promise<void> {
async fetchUnsyncedWorkspace(name: string, verifyVisible?: Locator): Promise<void> {
const unsyncedWorkspaceButton = this.unsyncedWorkspaceButton(name);
await unsyncedWorkspaceButton.click();
await this.page.mouse.move(0, 0);
await expect.soft(this.unsyncedWorkspaceRow(name)).toBeHidden({ timeout: 5000 });
await expect.soft(this.workspaceRow(name)).toBeVisible();
// The sidebar list is still settling right after the unsynced row disappears
Expand All @@ -329,6 +330,20 @@ export class NavigationSidebar {
}
}
}
if (!verifyVisible) {
return;
}
for (let attempt = 0; attempt <= 10; attempt++) {
try {
await verifyVisible.waitFor({ state: 'visible', timeout: 1000 });
return;
} catch {
if (attempt === 10) {
throw new Error(`Workspace "${name}" was selected but its content did not render after 10 attempts`);
}
await this.workspaceRow(name).click();
}
}
}

// ===========================================================================
Expand Down
25 changes: 20 additions & 5 deletions packages/insomnia-smoke-test/tests/smoke/cloud-sync.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
import { expect } from '@playwright/test';
import { expect, type Page } from '@playwright/test';

import playwrightConfig from '../../playwright.config';
import { test } from '../../playwright/test';

// @ts-expect-error playwrightConfig.webServer.url must exists
const devServerUrl = playwrightConfig?.webServer?.url || 'http://127.0.0.1:4010';

async function clickGitSyncMenuItem(page: Page, menuItemText: string): Promise<void> {
const gitSyncButton = page.getByLabel('Git Sync');
const menuItem = page.getByText(menuItemText);
for (let attempt = 1; attempt <= 10; attempt++) {
await gitSyncButton.click();
try {
await menuItem.click({ timeout: 1000 });
return;
} catch {
if (attempt === 10) {
throw new Error(`Could not click "${menuItemText}" in the Git Sync dropdown after 10 attempts`);
}
}
}
}

test.describe('Cloud Sync', () => {
test.beforeAll(async () => {
await fetch(`${devServerUrl}/__test-config/cloud-sync`, {
Expand All @@ -24,8 +40,8 @@ test.describe('Cloud Sync', () => {
});

test('Discard, branch and commit actions', async ({ page, insomnia }) => {
// Sync My Collection R1
await insomnia.navigationSidebar.fetchUnsyncedWorkspace('My Collection R1');
test.slow();
await insomnia.navigationSidebar.fetchUnsyncedWorkspace('My Collection R1', insomnia.navigationSidebar.requestRow('New Request'));
await insomnia.navigationSidebar.clickRequestOrFolder('New Request');
// Send request and check body
await page.getByRole('button', { name: 'Send' }).click();
Expand Down Expand Up @@ -77,8 +93,7 @@ test.describe('Cloud Sync', () => {
// focused, so back out first.
await insomnia.navigationSidebar.backToAllProjects();
await insomnia.navigationSidebar.fetchUnsyncedWorkspace('My MCP Client');
await page.getByLabel('Git Sync').click();
await page.getByText('Branches').click();
await clickGitSyncMenuItem(page, 'Branches');

const branchModal = page.getByRole('dialog');
const localBranchDiv = branchModal.getByLabel('Branches list', { exact: true });
Expand Down
Loading