test(upload): resumable upload spec이 페이지 origin을 설정의 baseURL에서 읽는다
문제 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 포트)
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user