From ed499736529e1b8733243175c90ea30bbd6090d9 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Wed, 4 Nov 2026 21:24:06 +0900 Subject: [PATCH] =?UTF-8?q?test(upload):=20resumable=20upload=20spec?= =?UTF-8?q?=EC=9D=B4=20=ED=8E=98=EC=9D=B4=EC=A7=80=20origin=EC=9D=84=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=EC=9D=98=20baseURL=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=9D=BD=EB=8A=94=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 문제 tests/browser-capabilities/resumable-upload.spec.ts가 CORS 응답의 origin을 "http://127.0.0.1:4174"로 따로 적는다. playwright.capabilities.config.ts의 baseURL과 지금은 같아서 동작하지만, 설정의 포트를 바꾸면 이 spec만 CORS로 조용히 깨진다. 고른 방법 - 설정 파일을 import해 use.baseURL의 origin을 쓴다. test.info()는 route 처리기 안에서 부를 수 있는지가 Playwright 내부 맥락에 달려 고르지 않았다. 검증 - check:types(tsconfig.test.json) 통과, eslint 통과. 브라우저 실행 결과는 이 커밋 메시지에 적지 않았다(공유 잠금 대기). Refs: docs/reviews/2026-11-03-maturity-review/11-tests-browser-release-scale.md (2절 FOLLOW-UP resumable-upload 포트) --- tests/browser-capabilities/resumable-upload.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/browser-capabilities/resumable-upload.spec.ts b/tests/browser-capabilities/resumable-upload.spec.ts index 3d84d0b0..a1c60946 100644 --- a/tests/browser-capabilities/resumable-upload.spec.ts +++ b/tests/browser-capabilities/resumable-upload.spec.ts @@ -2,9 +2,12 @@ import { createHash } from "node:crypto"; import type { Route } from "@playwright/test"; +import capabilitiesConfig from "../../playwright.capabilities.config.ts"; import { expect, test } from "../support/browser/strict-browser-test.ts"; -const PAGE_ORIGIN = "http://127.0.0.1:4174"; +// The page is served from the capability config's baseURL; a copy of its port +// here drifted silently whenever the config moved. +const PAGE_ORIGIN = new URL(capabilitiesConfig.use?.baseURL ?? "").origin; const API_ORIGIN = "https://upload-api.example.test"; const OBJECT_ORIGIN = "https://upload-objects.example.test"; const SESSION_ID = "session_browser_01";