限制认证状态增长并优化阿里云默认入口和权限诊断
This commit is contained in:
1 parent
00ea12cbd9
commit
667f76924e
10 files changed
+353
-14
No files matched your search
@@ -75,7 +75,7 @@ export function useSetupWizard(props, emit) {
|
||||
email_retry_count: 3,
|
||||
email_retry_intervals_secs: "30,120,600",
|
||||
recipients: "",
|
||||
dns_provider: props.status.dns_provider || "cloudflare",
|
||||
dns_provider: props.status.dns_provider || "aliyun",
|
||||
propagation_timeout_secs: props.status.propagation_timeout_secs || 900,
|
||||
propagation_polling_interval_secs:
|
||||
props.status.propagation_polling_interval_secs || 10,
|
||||
|
||||
@@ -4,6 +4,19 @@ import { nextTick } from "vue";
|
||||
import { useSetupWizard } from "./SetupWizard.js";
|
||||
import { aliyunProvider, deferred, mountComposable, verifiedResponse } from "../../test-support/mount.js";
|
||||
|
||||
test("全新初始化默认选择阿里云", async (t) => {
|
||||
const { state } = await mountComposable(t, () => useSetupWizard({ status: {} }, () => {}),
|
||||
async () => Response.json({ items: [aliyunProvider] }));
|
||||
assert.equal(state.form.value.dns_provider, "aliyun");
|
||||
});
|
||||
|
||||
test("已有初始化服务商选择保持兼容", async (t) => {
|
||||
const provider = { ...aliyunProvider, id: "cloudflare" };
|
||||
const { state } = await mountComposable(t, () => useSetupWizard({ status: { dns_provider: "cloudflare" } }, () => {}),
|
||||
async () => Response.json({ items: [provider, aliyunProvider] }));
|
||||
assert.equal(state.form.value.dns_provider, "cloudflare");
|
||||
});
|
||||
|
||||
async function setup(t, request) {
|
||||
const { state, unmount } = await mountComposable(t, () => useSetupWizard({ status: { dns_provider: "aliyun" } }, () => {}),
|
||||
async (path) => path.endsWith("/providers") ? Response.json({ items: [aliyunProvider] }) : request());
|
||||
|
||||
Reference in new issue
Block a user