fix(W3): 预览资产代理前缀拼 request.getContextPath(/yschcms 下 CSS 404 裸 HTML),T-W3-01..04 全绿+全量 264/264
This commit is contained in:
@@ -137,6 +137,17 @@ class PreviewApiIT extends CmsIntegrationTestBase {
|
||||
assertThat(body(result)).contains("/api/theme/t-demo-red/asset/css/main.css");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("T-W3-04: 端到端回归:contextPath=/yschcms 时预览资产 href 带上下文前缀")
|
||||
void previewAssetHrefCarriesContextPathEndToEnd() throws Exception {
|
||||
MvcResult result = standalone.perform(get("/yschcms/api/theme/preview")
|
||||
.contextPath("/yschcms")
|
||||
.param("siteCode", "demo").param("theme", "t-demo-red"))
|
||||
.andExpect(status().isOk()).andReturn();
|
||||
assertThat(body(result))
|
||||
.contains("href=\"/yschcms/api/theme/t-demo-red/asset/css/main.css\"");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("T26: 预览响应 no-store(不进缓存/CDN)")
|
||||
void previewNoStore() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user