功能(文档预览):集成 ONLYOFFICE 安全只读预览与工作台体验
新增 ONLYOFFICE 配置签名、内部内容接口、容器编排与反向代理。 打通网页端和桌面端独立预览工作区,完善文档入口、布局及帮助体验。 补充桌面安全发布门禁、开发脚本、使用文档和前后端测试。
This commit is contained in:
@@ -5,6 +5,18 @@ import { resolve } from "node:path";
|
||||
const readRouter = () => readFileSync(resolve(__dirname, "./router/index.ts"), "utf8").replace(/\r\n/g, "\n");
|
||||
|
||||
describe("admin project route permissions", () => {
|
||||
it("registers independent full-bleed routes for attachment and version Office previews", () => {
|
||||
const source = readRouter();
|
||||
|
||||
expect(source).toContain('path: "office-preview/attachment/:id"');
|
||||
expect(source).toContain('name: "OfficeAttachmentPreview"');
|
||||
expect(source).toContain('path: "office-preview/version/:id"');
|
||||
expect(source).toContain('name: "OfficeVersionPreview"');
|
||||
expect(source.match(/component: OfficePreviewWorkspace/g)).toHaveLength(2);
|
||||
expect(source.match(/fullBleed: true/g)?.length).toBeGreaterThanOrEqual(2);
|
||||
expect(source.match(/transientWorkspaceTask: true/g)?.length).toBeGreaterThanOrEqual(2);
|
||||
});
|
||||
|
||||
it("lets any authorized project role open the project management detail page", () => {
|
||||
const source = readRouter();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user