fix(insomnia-test): address PR review comments

- bind mock-api and echo-server to 127.0.0.1
- remove per-test dataPath after use
- throw when setCodeMirrorValue does not hold after retries
- drop continue-on-error from the build job
- shorten cookie waitForPersisted docstring

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Bob QiuandClaude Sonnet 5.5 committed 2026-11-02 13:10:07 +08:00
1 parent 392bea748f
commit bc83bac54d
6 files changed
+10 -22

No files matched your search

-4
View File
@@ -20,14 +20,10 @@ jobs:
# ---------------------------------------------------------------------------
# Build the Insomnia binary once and cache it by commit SHA. All shards
# restore the same cached binary instead of each building it.
#
# continue-on-error: true so a failure here never blocks the PR merge check
# and downstream jobs still run instead of being skipped.
# ---------------------------------------------------------------------------
build:
timeout-minutes: 30
runs-on: ubuntu-latest
continue-on-error: true
permissions:
contents: read
packages: read
+3 -13
View File
@@ -75,19 +75,9 @@ export class CookieFlow extends BaseFlow {
/**
* Polls the on-disk `CookieJar` NeDB file directly until it contains
* every one of `cookies` by key/value, re-running the whole
* open→setCookies→close write once per mismatch. Confirmed live via a
* diagnostic probe: a cookie missing right after `setCookies()` doesn't
* arrive later no matter how long this waits — the file's mtime never
* moves again, across 50+ polls spanning almost a minute. So this isn't
* an in-memory-state-outrunning-disk timing gap; it's a genuinely lost
* write, the same species of bug `HttpRequestFlow.waitForUrlPersisted()`
* works around for URLs. The likely cause here: clicking "Done" unmounts
* the edit dialog, and under CPU-contended parallel runs the app's own
* debounced save can still be pending at that point, so the unmount
* cancels it before it ever fires — so the cookie never lands on its own
* and the same write has to be repeated. `CookiePage` now polls the
* on-disk jar after each field edit to narrow that window, but this
* stays as the backstop.
* open→setCookies→close write once per mismatch. The dialog's unmount
* can cancel the app's debounced save, so a lost cookie write has to be
* repeated, not only waited for.
* @param item - The Collection/request whose location the Cookie Jar dialog is opened from, for a retry
* @param cookies - The cookies that must all be present in the persisted jar
*/
+4 -4
View File
@@ -277,15 +277,15 @@ const httpsServer = https.createServer(HTTPS_OPTIONS, handleRequest);
const customCaHttpsServer = https.createServer(CUSTOM_CA_HTTPS_OPTIONS, handleRequest);
const mtlsHttpsServer = https.createServer(MTLS_HTTPS_OPTIONS, handleRequest);
server.listen(4060, () => {
server.listen(4060, '127.0.0.1', () => {
process.stdout.write('Listening at http://localhost:4060\n');
});
httpsServer.listen(4061, () => {
httpsServer.listen(4061, '127.0.0.1', () => {
process.stdout.write('Listening at https://localhost:4061\n');
});
customCaHttpsServer.listen(4062, () => {
customCaHttpsServer.listen(4062, '127.0.0.1', () => {
process.stdout.write('Listening at https://localhost:4062 (custom CA)\n');
});
mtlsHttpsServer.listen(4063, () => {
mtlsHttpsServer.listen(4063, '127.0.0.1', () => {
process.stdout.write('Listening at https://localhost:4063 (mTLS)\n');
});
+1
View File
@@ -252,6 +252,7 @@ export const test = base.extend<Fixtures>({
crypto.randomUUID(),
);
await use(dataPath);
fs.rmSync(dataPath, { recursive: true, force: true });
},
// Its own fixture so a spec that needs the real v13 onboarding/login
+1 -1
View File
@@ -1611,6 +1611,6 @@ const server = http.createServer((req, res) => {
}
});
server.listen(4010, () => {
server.listen(4010, "127.0.0.1", () => {
process.stdout.write("Listening at http://localhost:4010\n");
});
@@ -101,6 +101,7 @@ export abstract class BasePage {
}).toPass({ timeout: DEFAULT_TIMEOUT });
if (await this.valueHolds(cmLocator, text, 200)) return;
}
throw new Error(`CodeMirror value "${text}" did not hold after 3 attempts`);
}
/**