更新 文书管理测试最新

This commit is contained in:
HZX
2025-11-07 07:12:55 +00:00
parent e22a0b8d9a
commit 9f7a410fd6

View File

@ -10,7 +10,7 @@ test('test', async ({ page }) => {
// 登录信息(用于报告) // 登录信息(用于报告)
const loginInfo = { const loginInfo = {
email: 'xdf.admin@applify.ai', email: 'prodream.admin@applify.ai',
password: 'b9#0!;+{Tx4649op' password: 'b9#0!;+{Tx4649op'
}; };
@ -40,18 +40,12 @@ test('test', async ({ page }) => {
// 步骤1: 访问首页并登录 // 步骤1: 访问首页并登录
await executeStep('访问首页', async () => { await executeStep('访问首页', async () => {
await page.goto('https://pre.prodream.cn/en'); await page.goto('https://prodream.cn/en/login');
await expect(page.getByRole('button', { name: 'Log in' })).toBeVisible();
});
await executeStep('点击登录按钮', async () => {
await page.getByRole('button', { name: 'Log in' }).click();
await expect(page.getByRole('textbox', { name: 'Email Address' })).toBeVisible();
}); });
await executeStep('输入登录信息', async () => { await executeStep('输入登录信息', async () => {
await page.getByRole('textbox', { name: 'Email Address' }).click(); await page.getByRole('textbox', { name: 'Email Address' }).click();
await page.getByRole('textbox', { name: 'Email Address' }).fill('xdf.admin@applify.ai'); await page.getByRole('textbox', { name: 'Email Address' }).fill('prodream.admin@applify.ai');
await page.getByRole('textbox', { name: 'Psssword' }).click(); await page.getByRole('textbox', { name: 'Psssword' }).click();
await page.getByRole('textbox', { name: 'Psssword' }).fill('b9#0!;+{Tx4649op'); await page.getByRole('textbox', { name: 'Psssword' }).fill('b9#0!;+{Tx4649op');
await page.getByRole('button', { name: 'Log in' }).click(); await page.getByRole('button', { name: 'Log in' }).click();
@ -61,7 +55,7 @@ test('test', async ({ page }) => {
// 步骤2: 测试 DreamiExplore // 步骤2: 测试 DreamiExplore
await executeStep('进入 DreamiExplore', async () => { await executeStep('进入 DreamiExplore', async () => {
await page.getByRole('link').filter({ hasText: 'DreamiExplore Everything' }).click(); await page.getByRole('link').filter({ hasText: 'DreamiExplore Everything' }).click();
await expect(page.getByRole('heading', { name: 'Hello, Admin' })).toBeVisible(); await expect(page.getByRole('heading', { name: 'Hello, Prodream Admin' })).toBeVisible();
}); });
await executeStep('测试聊天功能', async () => { await executeStep('测试聊天功能', async () => {
@ -82,9 +76,9 @@ test('test', async ({ page }) => {
await page.getByRole('textbox', { name: 'Name *', exact: true }).click(); await page.getByRole('textbox', { name: 'Name *', exact: true }).click();
await page.getByRole('textbox', { name: 'Name *', exact: true }).fill('黄子旭测试'); await page.getByRole('textbox', { name: 'Name *', exact: true }).fill('黄子旭测试');
await page.locator('div').filter({ hasText: /^Please select branch$/ }).nth(2).click(); await page.locator('div').filter({ hasText: /^Please select branch$/ }).nth(2).click();
await page.locator('div').filter({ hasText: /^1$/ }).nth(1).click(); await page.locator('div').filter({ hasText: /^12$/ }).nth(1).click();
await page.getByText('Select counselor').click(); await page.getByText('Select counselor').click();
await page.locator('div').filter({ hasText: /^2-2@2\.com$/ }).nth(1).click(); await page.locator('div').filter({ hasText: /^yuanxiang-zhangyuanxiang@prodream.ai$/ }).nth(1).click();
await page.locator('svg').nth(5).click(); await page.locator('svg').nth(5).click();
await page.getByRole('textbox', { name: 'Contract Category *' }).click(); await page.getByRole('textbox', { name: 'Contract Category *' }).click();
await page.getByRole('textbox', { name: 'Contract Category *' }).fill('11'); await page.getByRole('textbox', { name: 'Contract Category *' }).fill('11');
@ -421,7 +415,7 @@ test('test', async ({ page }) => {
report += '【登录账号信息】\n'; report += '【登录账号信息】\n';
report += `账号: ${loginInfo.email}\n`; report += `账号: ${loginInfo.email}\n`;
report += `密码: ${loginInfo.password}\n`; report += `密码: ${loginInfo.password}\n`;
report += `测试环境: https://pre.prodream.cn/en\n\n`; report += `测试环境: https://prodream.cn/en\n\n`;
report += `${'='.repeat(60)}\n\n`; report += `${'='.repeat(60)}\n\n`;
if (errors.length === 0) { if (errors.length === 0) {