import { describe, expect, it } from "vitest"; import { isProviderLoginFailureMessage, PROVIDER_LOGIN_FAILED_USER_MESSAGE, } from "@/modules/rpa/provider-login-message"; describe("provider-login-message", () => { it("识别登录失败原文", () => { expect(isProviderLoginFailureMessage("FLOCK_LOGIN_FAILED:账号或密码错误")).toBe( true, ); expect(isProviderLoginFailureMessage("仍停在登录页")).toBe(true); expect(isProviderLoginFailureMessage("地址联想失败")).toBe(false); }); it("用户文案要求确认即时更新", () => { expect(PROVIDER_LOGIN_FAILED_USER_MESSAGE).toContain("即时保存更新"); expect(PROVIDER_LOGIN_FAILED_USER_MESSAGE).toContain("账号或密码"); }); });