init-pixiu/tests/test.spec.ts
雨霖铃 729b6de180 feat(tests): add global setup and test specification for identity verification
- Created a global setup file to handle user login and merchant selection based on identity verification.
- Implemented a test specification to verify the identity verification tool and log merchant details.
2025-06-25 22:45:26 +08:00

16 lines
544 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { expect, test } from '@playwright/test';
import { identityVerificationTool } from '../src/util/authUtil';
test('test1', async ({ page, baseURL }) => {
const body = await identityVerificationTool('17770898274', 'a123456');
const content = body?.content;
for (const merchant in content) {
if (content[merchant]?.merchantId === 373) {
console.log(
`租户名称:${content[merchant]?.merchantName}租户ID${content[merchant]?.merchantId}`
);
console.log(content[merchant]?.users);
}
}
});