- 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.
16 lines
544 B
TypeScript
16 lines
544 B
TypeScript
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);
|
||
}
|
||
}
|
||
});
|