You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
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 ( "账号或密码" ) ;
} ) ;
} ) ;