增加 PC 企业微信扫码登录(07-30-pc-wecom-qr-login)
这个提交包含在:
@@ -1,6 +1,7 @@
|
||||
const {
|
||||
assertSendAllowed,
|
||||
buildApprovalConfigChecks,
|
||||
buildEntryOauthCheck,
|
||||
buildSecretMatrix,
|
||||
evaluateConclusion,
|
||||
executeRuntimeReady,
|
||||
@@ -24,6 +25,7 @@ function baseConfig(overrides = {}) {
|
||||
appTimezone: "Asia/Shanghai",
|
||||
wecomEnabled: true,
|
||||
wecomEntryEnabled: true,
|
||||
wecomPcWebLoginEnabled: false,
|
||||
wecomOauthEnabled: true,
|
||||
wecomCorpId: "corp-runtime",
|
||||
wecomAgentId: "1000002",
|
||||
@@ -73,6 +75,22 @@ function wecomProfile(overrides = {}) {
|
||||
}
|
||||
|
||||
describe("check-wecom-runtime-ready", () => {
|
||||
it("reports the independently gated PC Web login entry without blocking workbench readiness", () => {
|
||||
const disabled = buildEntryOauthCheck(baseConfig());
|
||||
expect(disabled.status).toBe("OK");
|
||||
expect(disabled.evidence).toEqual(expect.objectContaining({
|
||||
enabled: true,
|
||||
pcWebLoginEnabled: false,
|
||||
pcLoginUrl: null,
|
||||
}));
|
||||
|
||||
const enabled = buildEntryOauthCheck(baseConfig({ wecomPcWebLoginEnabled: true }));
|
||||
expect(enabled.status).toBe("OK");
|
||||
expect(enabled.evidence.pcLoginUrl).toBe(
|
||||
"/api/auth/wecom/login?returnTo=%2Fportal&entrySource=pc_qr",
|
||||
);
|
||||
});
|
||||
|
||||
it("parses runner options and enforces message send double confirmation", () => {
|
||||
const options = parseArgs([
|
||||
"--live",
|
||||
|
||||
在新工单中引用
屏蔽一个用户