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.
chajia/__tests__/workers/rpa/flock-login-two-step.test.ts

30 lines
876 B

This file contains ambiguous Unicode characters!

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 fs from "node:fs";
import path from "node:path";
describe("flock login two-step", () => {
it("login.ts 含两步登录Email → Next → Password", () => {
const src = fs.readFileSync(
path.join(process.cwd(), "workers/rpa/flock/login.ts"),
"utf8",
);
expect(src).toContain("Email Address");
expect(src).toContain("Next");
expect(src).toContain("Password");
expect(src).toContain("勿先等 password");
});
it("脱敏基线录制为两步登录", () => {
const src = fs.readFileSync(
path.join(
process.cwd(),
"scripts/fixtures/flock-logged-in-quote-baseline.js",
),
"utf8",
);
expect(src).toContain('name: "Email Address"');
expect(src).toContain('name: "Next"');
expect(src).toContain('name: "Password"');
});
});