Compare commits

..

No commits in common. "d44f457d866e67d97983115437d7e1a0fead6dd3" and "3547f32493bfaa4001e131bc2ccfd3cf8010721f" have entirely different histories.

9 changed files with 196 additions and 135 deletions

View File

@ -1,30 +1,29 @@
stages:
- test
- report
playwright_tests: playwright_tests:
stage: test stage: test
image: mcr.microsoft.com/playwright:v1.51.0-noble image: mcr.microsoft.com/playwright:focal
timeout: 60 minutes
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- node_modules/
before_script:
- npm config set registry https://registry.npmmirror.com
script: script:
- npm install - npm install
- npx playwright test /touch/boss_cashier.spec.ts --project '慧来客touch(管理员身份) - Desktop Chrome' - npx playwright install
after_script: - npx playwright test
- |
if [ "$CI_JOB_STATUS" == "success" ]; then
echo "Tests passed! Sending success message..."
else
echo "Tests failed! Sending failure message..."
fi
- ls -la playwright-report/
artifacts: artifacts:
paths: paths:
- playwright-report/ - test-results/
expire_in: 1 week expire_in: 1 week
when: always
tags: send_report:
- test stage: report
image: alpine:latest
script:
- apk add --no-cache curl
- |
if [ -d test-results ]; then
echo "Test Successful."
else
echo "No test results found."
fi
only: only:
- main - main

View File

@ -17,7 +17,7 @@
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@faker-js/faker": "^8.4.1", "@faker-js/faker": "^8.4.1",
"@playwright/test": "^1.51.1", "@playwright/test": "^1.48.2",
"@types/node": "^22.3.0", "@types/node": "^22.3.0",
"axios": "^1.7.4", "axios": "^1.7.4",
"cross-env": "^7.0.3" "cross-env": "^7.0.3"
@ -31,7 +31,7 @@
"ldap": "^0.7.1", "ldap": "^0.7.1",
"ldap-authentication": "^3.2.2", "ldap-authentication": "^3.2.2",
"ldapjs": "^3.0.7", "ldapjs": "^3.0.7",
"playwright": "^1.51.1", "playwright": "^1.47.2",
"qrcode-reader": "^1.0.4", "qrcode-reader": "^1.0.4",
"sharp": "^0.33.5", "sharp": "^0.33.5",
"tesseract.js": "^5.1.1", "tesseract.js": "^5.1.1",

View File

@ -55,7 +55,7 @@ module.exports = defineConfig({
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
hasTouch: true, hasTouch: true,
trace: 'on', trace: 'retain-on-failure',
screenshot: 'only-on-failure', screenshot: 'only-on-failure',
timezoneId: 'Asia/Shanghai', timezoneId: 'Asia/Shanghai',
locale: 'zh-CN', locale: 'zh-CN',
@ -87,7 +87,7 @@ module.exports = defineConfig({
...devices['Desktop Chrome'], ...devices['Desktop Chrome'],
baseURL: process.env.BASE_URL, baseURL: process.env.BASE_URL,
storageState: firstAuthFile, storageState: firstAuthFile,
// viewport: { width: 1280, height: 720 }, viewport: { width: 1280, height: 720 },
isMobile: true, isMobile: true,
}, },
testMatch: /.*boss_.*\.spec\.ts/, testMatch: /.*boss_.*\.spec\.ts/,
@ -99,7 +99,7 @@ module.exports = defineConfig({
...devices['Desktop Safari'], ...devices['Desktop Safari'],
baseURL: process.env.BASE_URL, baseURL: process.env.BASE_URL,
storageState: firstAuthFile, storageState: firstAuthFile,
// viewport: { width: 1280, height: 720 }, viewport: { width: 1280, height: 720 },
isMobile: true, isMobile: true,
}, },
testMatch: /.*boss_.*\.spec\.ts/, testMatch: /.*boss_.*\.spec\.ts/,
@ -110,7 +110,7 @@ module.exports = defineConfig({
use: { use: {
...devices['Desktop Chrome'], ...devices['Desktop Chrome'],
baseURL: process.env.BASE_URL, baseURL: process.env.BASE_URL,
// viewport: { width: 1280, height: 720 }, viewport: { width: 1280, height: 720 },
isMobile: false, isMobile: false,
}, },
testMatch: /.*staff_.*\.spec\.ts/, testMatch: /.*staff_.*\.spec\.ts/,
@ -121,7 +121,7 @@ module.exports = defineConfig({
use: { use: {
...devices['Desktop Safari'], ...devices['Desktop Safari'],
baseURL: process.env.BASE_URL, baseURL: process.env.BASE_URL,
// viewport: { width: 1280, height: 720 }, viewport: { width: 1280, height: 720 },
isMobile: false, isMobile: false,
}, },
testMatch: /.*staff_.*\.spec\.ts/, testMatch: /.*staff_.*\.spec\.ts/,

View File

@ -14,13 +14,8 @@ export const test = base.extend<MyFixture>({
await expect(page.locator('.versionModal_main_content')).toBeVisible(); await expect(page.locator('.versionModal_main_content')).toBeVisible();
}); });
try { if (!baseURL) throw new Error('baseURL is required');
await page.goto(baseURL!, { timeout: 90 * 1000 }); await page.goto(baseURL);
} catch (error) {
console.log(error);
// await page.screenshot({ path: 'error.png' });
await page.reload();
}
// await page.getByRole('button', { name: /开\s单/ }).waitFor(); // await page.getByRole('button', { name: /开\s单/ }).waitFor();
await expect(page.getByRole('button', { name: /开\s单/ })).toBeEnabled(); await expect(page.getByRole('button', { name: /开\s单/ })).toBeEnabled();
@ -29,9 +24,7 @@ export const test = base.extend<MyFixture>({
await page.getByRole('button', { name: /开\s单/ }).click(); await page.getByRole('button', { name: /开\s单/ }).click();
// await page.getByRole('button', { name: /开\s单/ }).waitFor(); // await page.getByRole('button', { name: /开\s单/ }).waitFor();
await expect(page.getByRole('button', { name: '创建会员' })).toBeEnabled(); await expect(page.getByRole('button', { name: '创建会员' })).toBeEnabled();
await page.locator('.top > .anticon').first().click();
await expect(page.getByRole('button', { name: '创建会员' })).not.toBeVisible();
await expect(page.getByRole('button', { name: /开\s单/ })).toBeInViewport();
await use(page); await use(page);
}, },

View File

@ -339,55 +339,22 @@ export class CustomerPage {
* @param {string} phone * @param {string} phone
*/ */
private readonly confirmCreation = async (phone: string) => { private readonly confirmCreation = async (phone: string) => {
try {
// 等待响应并点击按钮
const [response] = await Promise.all([ const [response] = await Promise.all([
this.page.waitForResponse(async (res) => { this.page.waitForResponse(async res => res.url().includes('/invalid_check') && (await res.json()).code === 'SUCCESS'),
const urlMatch = res.url().includes('/invalid_check');
if (!urlMatch) return false;
try {
const json = await res.json();
return json.code === 'SUCCESS';
} catch (e) {
console.error('解析响应体失败:', e);
return false;
}
}),
this.page.getByRole('button', { name: '确认创建' }).click(), this.page.getByRole('button', { name: '确认创建' }).click(),
]); ]);
const responseBody = await response.json();
// 解析响应体 const phoneStatus = responseBody?.content?.status;
let responseBody: any; if (phoneStatus === undefined || phoneStatus === null) {
try {
responseBody = await response.json();
} catch (e) {
throw new Error('无法解析服务器响应体,请检查网络连接或服务器状态');
}
// 检查响应体内容
if (responseBody && typeof responseBody.content === 'object') {
const phoneStatus = responseBody.content?.status;
if (phoneStatus != null) {
throw new Error(`手机号码 ${phone} 已被使用,无法创建新顾客`);
}
} else {
console.warn('响应体格式不符合预期content 不是对象');
}
} catch (error) {
// 捕获并记录异常
console.error('检查手机号码时发生错误:', error);
throw error; // 重新抛出异常以便调用方处理
}
// if (phoneStatus === undefined || phoneStatus === null) {
// 创建顾客成功 // 创建顾客成功
// return; return;
// } }
// await this.page.getByText('系统查询到当前手机号被建档后转为无效客,是否要恢复无效客?').waitFor(); await this.page.getByText('系统查询到当前手机号被建档后转为无效客,是否要恢复无效客?').waitFor();
// await this.page.getByRole('button', { name: '重新建档' }).click(); await this.page.getByRole('button', { name: '重新建档' }).click();
// const popupWindow = this.page.locator('.ant-message'); const popupWindow = this.page.locator('.ant-message');
// await expect(popupWindow).not.toContainText('该手机号码已经被使用');
await expect(popupWindow).not.toContainText('该手机号码已经被使用');
// await popupWindow.waitFor(); // await popupWindow.waitFor();
// const popupContent = (await popupWindow.innerText()).trim(); // const popupContent = (await popupWindow.innerText()).trim();

View File

@ -18,13 +18,7 @@ for (let testAccount of testAccountArray) {
.locator('div', { has: page.getByRole('textbox', { name: '请输入您的手机号码' }) }) .locator('div', { has: page.getByRole('textbox', { name: '请输入您的手机号码' }) })
.locator('.pass_svg'); .locator('.pass_svg');
try { await page.goto(baseURL!);
await page.goto(baseURL!, { timeout: 90 * 1000 });
} catch (error) {
console.log(error);
await page.bringToFront();
await page.reload();
}
await page.getByRole('textbox', { name: '请输入您的手机号码' }).fill(account); await page.getByRole('textbox', { name: '请输入您的手机号码' }).fill(account);
await page.getByRole('textbox', { name: '请输入登录密码' }).fill(password); await page.getByRole('textbox', { name: '请输入登录密码' }).fill(password);
await page.getByLabel('请同意慧来客隐私政策和用户协议').check(); await page.getByLabel('请同意慧来客隐私政策和用户协议').check();
@ -47,6 +41,6 @@ for (let testAccount of testAccountArray) {
await page.getByRole('button', { name: /登\s录/ }).click(); await page.getByRole('button', { name: /登\s录/ }).click();
await page.getByRole('button', { name: /开\s单/ }).waitFor(); await page.getByRole('button', { name: /开\s单/ }).waitFor();
} }
await page.context().storageState({ path: authFile, indexedDB: true }); await page.context().storageState({ path: authFile });
}); });
} }

View File

@ -31,7 +31,7 @@ setup.describe('员工登录', () => {
await page.getByLabel('请同意慧来客隐私政策和用户协议').check(); await page.getByLabel('请同意慧来客隐私政策和用户协议').check();
await $login.click(); await $login.click();
await expect(page.getByRole('button', { name: /开\s单/ })).toBeEnabled(); await expect(page.getByRole('button', { name: /开\s单/ })).toBeEnabled();
await page.context().storageState({ path: e.authFile, indexedDB: true }); await page.context().storageState({ path: e.authFile });
}); });
} }
}); });

View File

@ -37,15 +37,31 @@ test.describe('挂单', () => {
}); });
test('查看员工名下挂单', async ({ page, customerPage }) => { test('查看员工名下挂单', async ({ page, customerPage }) => {
const $employeeBottom = page.locator('.userpanel_item'); let OrderLQ = 0;
const employeeLq = $employeeBottom.getByText(Employees.FirstShop.Employee_8.name); let OrderZP = 0;
const employeeZp = $employeeBottom.getByText(Employees.FirstShop.Employee_9.name); await test.step('记录员工原挂单数量', async () => {
// 点击底部员工刘强
const EmployeeLQ = page.locator('.userpanel_item').getByText(Employees.FirstShop.Employee_8.name);
if (await EmployeeLQ.isVisible()) {
await page.locator('.userpanel_item').filter({ hasText: Employees.FirstShop.Employee_8.name }).click();
await page.locator('.item_box').first().waitFor();
OrderLQ = await page.locator('.item_box').count();
} else {
OrderLQ = 0;
}
const $employeeLq = page.locator('.counselor:nth-child(2)').locator('.check_item:nth-child(1)').filter({ hasText: Employees.FirstShop.Employee_8.name }); // 点击底部员工周萍
const EmployeeZP = page.locator('.userpanel_item', { hasText: Employees.FirstShop.Employee_9.name });
if (await EmployeeZP.isVisible()) {
await page.locator('.userpanel_item').filter({ hasText: Employees.FirstShop.Employee_9.name }).click();
await page.locator('.item_box').first().waitFor();
OrderZP = await page.locator('.item_box').count();
} else {
OrderZP = 0;
}
});
const $$pendingOrderCard = page.locator('.cash_content .list .item_box'); await test.step('刘强挂单1', async () => {
await test.step('刘强挂单', async () => {
//员工1开第1单 //员工1开第1单
await page.getByRole('button', { name: /^开\s单$/ }).click(); await page.getByRole('button', { name: /^开\s单$/ }).click();
await customerPage.searchCustomer(phone); await customerPage.searchCustomer(phone);
@ -55,18 +71,61 @@ test.describe('挂单', () => {
// 选择添加员工 // 选择添加员工
await page.locator('button.staff_btn').click(); await page.locator('button.staff_btn').click();
// 选择员工:刘强 // 选择员工:刘强
await $employeeLq.click(); await page
.locator('.counselor:nth-child(2)')
.locator('.check_item:nth-child(1)')
.filter({ hasText: Employees.FirstShop.Employee_8.name })
.click();
// 保存并复制到其他项目 // 保存并复制到其他项目
await page.locator('button.save_and_copy').filter({ hasText: '保存并复制到其他项目/卖品' }).click(); await page.locator('button.save_and_copy').filter({ hasText: '保存并复制到其他项目/卖品' }).click();
// 挂单 // 挂单
await page.locator('#cart_bottom_btn').getByText('挂单').click(); await page.locator('#cart_bottom_btn').getByText('挂单').click();
await expect.soft($$pendingOrderCard.first()).toContainText(`${username}`);
await expect($$pendingOrderCard.first()).toContainText(`${Employees.FirstShop.Employee_8.name}`);
}); });
const $employeeZp = page.locator('.counselor:nth-child(2)').locator('.check_item:nth-child(1)').filter({ hasText: Employees.FirstShop.Employee_9.name }); await test.step('刘强挂单2', async () => {
//员工1开第2单
await page.getByRole('button', { name: /^开\s单$/ }).click();
await customerPage.searchCustomer(phone);
await customerPage.selectSearchCustomer(username);
await test.step('周萍挂单', async () => { // 选择第三个项目
await page.locator('.project_list').filter({ hasText: ProjectName.Projects.Projects_3.name }).click();
// 选择添加员工
await page.locator('button.staff_btn').click();
// 选择员工:刘强
await page
.locator('.counselor:nth-child(2)')
.locator('.check_item:nth-child(1)')
.filter({ hasText: Employees.FirstShop.Employee_8.name })
.click();
// 保存并复制到其他项目
await page.locator('button.save_and_copy').filter({ hasText: '保存并复制到其他项目/卖品' }).click();
// 挂单
await page.locator('#cart_bottom_btn').getByText('挂单').click();
});
await test.step('刘强挂单3', async () => {
//员工1开第3单
await page.getByRole('button', { name: /^开\s单$/ }).click();
await customerPage.searchCustomer(phone);
await customerPage.selectSearchCustomer(username);
// 选择第二个项目
await page.locator('.project_list').filter({ hasText: ProjectName.Projects.Projects_2.name }).click();
// 选择添加员工
await page.locator('button.staff_btn').click();
// 选择员工:刘强
await page
.locator('.counselor:nth-child(2)')
.locator('.check_item:nth-child(1)')
.filter({ hasText: Employees.FirstShop.Employee_8.name })
.click();
// 保存并复制到其他项目
await page.locator('button.save_and_copy').filter({ hasText: '保存并复制到其他项目/卖品' }).click();
// 挂单
await page.locator('#cart_bottom_btn').getByText('挂单').click();
});
await test.step('周萍挂单1', async () => {
//员工2开第1单 //员工2开第1单
await page.getByRole('button', { name: /^开\s单$/ }).click(); await page.getByRole('button', { name: /^开\s单$/ }).click();
await customerPage.searchCustomer(phone); await customerPage.searchCustomer(phone);
@ -78,25 +137,54 @@ test.describe('挂单', () => {
// 选择添加员工 // 选择添加员工
await page.locator('button.staff_btn').click(); await page.locator('button.staff_btn').click();
// 选择员工:周萍 // 选择员工:周萍
await $employeeZp.click(); await page
.locator('.counselor:nth-child(2)')
.locator('.check_row:nth-child(2) .check_item:nth-child(1)')
.filter({ hasText: Employees.FirstShop.Employee_9.name })
.click();
// 保存并复制到其他项目 // 保存并复制到其他项目
await page.locator('button.save_and_copy').filter({ hasText: '保存并复制到其他项目/卖品' }).click(); await page.locator('button.save_and_copy').filter({ hasText: '保存并复制到其他项目/卖品' }).click();
// 挂单 // 挂单
await page.locator('#cart_bottom_btn').getByText('挂单').click(); await page.locator('#cart_bottom_btn').getByText('挂单').click();
await expect.soft($$pendingOrderCard.first()).toContainText(`${username}`);
await expect($$pendingOrderCard.first()).toContainText(`${Employees.FirstShop.Employee_9.name}`);
}); });
await test.step('校验各个员工的挂单', async () => { await test.step('周萍挂单2', async () => {
//员工2开第2单
await page.getByRole('button', { name: /^开\s单$/ }).click();
await customerPage.searchCustomer(phone);
await customerPage.selectSearchCustomer(username);
// 选择第二个项目
await page.locator('.project_list').filter({ hasText: ProjectName.Projects.Projects_2.name }).click();
// 选择添加员工
await page.locator('button.staff_btn').click();
// 选择员工:周萍
await page
.locator('.counselor:nth-child(2)')
.locator('.check_row:nth-child(2) .check_item:nth-child(1)')
.filter({ hasText: Employees.FirstShop.Employee_9.name })
.click();
// 保存并复制到其他项目
await page.locator('button.save_and_copy').filter({ hasText: '保存并复制到其他项目/卖品' }).click();
// 挂单
await page.locator('#cart_bottom_btn').getByText('挂单').click();
// 等待挂单成功
await page.locator('.ant-message').waitFor();
// 判断挂单成功弹窗消失后再执行下一步
await expect(page.locator('.ant-message')).not.toBeVisible();
});
await test.step('最后校验挂单数量', async () => {
// 点击底部员工刘强 // 点击底部员工刘强
await employeeLq.click(); await page.locator('.userpanel_item').filter({ hasText: Employees.FirstShop.Employee_8.name }).click();
await expect.soft($$pendingOrderCard.first()).toContainText(`${username}`); await page.locator('.item_box').first().waitFor();
await expect($$pendingOrderCard.first()).toContainText(`${Employees.FirstShop.Employee_8.name}`); const order = await page.locator('.item_box').all();
expect(order.length).toBe(3 + OrderLQ);
// 点击底部员工周萍 // 点击底部员工周萍
await employeeZp.click(); await page.locator('.userpanel_item').filter({ hasText: Employees.FirstShop.Employee_9.name }).click();
await expect.soft($$pendingOrderCard.first()).toContainText(`${username}`); await page.locator('.item_box').first().waitFor();
await expect($$pendingOrderCard.first()).toContainText(`${Employees.FirstShop.Employee_9.name}`); const order1 = await page.locator('.item_box').all();
expect(order1.length).toBe(2 + OrderZP);
}); });
}); });
@ -123,18 +211,32 @@ test.describe('挂单', () => {
// // 点击底部员工吴浩 // // 点击底部员工吴浩
// 取单 // 取单
await page.locator('.item_box', { hasText: username }).waitFor(); await page.locator('.item_box', { hasText: username }).waitFor();
await page.locator('.item_box').first().getByRole('button', { name: /^取\s单$/ }).click(); await page
await page.locator('#buyList').getByText('雪肌晶纯护理').waitFor(); .locator('.item_box')
.first()
.getByRole('button', { name: /^取\s单$/ })
.click();
//结算 //结算
await page.locator('.pay_btn').filter({ hasText: /^结\s算$/ }).click(); await page
.locator('.pay_btn')
.filter({ hasText: /^结\s算$/ })
.click();
//点击优惠券折扣 //点击优惠券折扣
await page.getByText('优惠券抵扣').click(); await page.getByText('优惠券抵扣').click();
//点击赠送优惠券 //点击赠送优惠券
await page.getByText('赠送优惠券').click(); await page.getByText('赠送优惠券').click();
//点击定额10元券 //点击定额10元券
await page.locator('.popup_content').locator('.alloytouch-target').filter({ hasText: Coupons.coupon.coupon_1.name }).click(); await page
.locator('.popup_content')
.locator('.alloytouch-target')
.filter({ hasText: Coupons.coupon.coupon_1.name })
.click();
//确认 //确认
await page.locator('.operation_btn').first().getByRole('button', { name: /^确\s定$/ }).click(); await page
.locator('.operation_btn')
.first()
.getByRole('button', { name: /^确\s定$/ })
.click();
//选择定额10元券 //选择定额10元券
await page.getByLabel(Coupons.coupon.coupon_1.name).first().check(); await page.getByLabel(Coupons.coupon.coupon_1.name).first().check();
//确认选择 //确认选择
@ -174,21 +276,27 @@ test.describe('挂单', () => {
}); });
test('已过期单据不能取单,只能删除', async ({ page }) => { test('已过期单据不能取单,只能删除', async ({ page }) => {
const $slidingMenu = page.locator('div.deleteList .m_sliding_menu');
await page.getByText('已过期 / 删除单据').click(); await page.getByText('已过期 / 删除单据').click();
await page.getByText('警告:已过期服务无法取单结算,请至收银台处理').waitFor(); await page.getByText('警告:已过期服务无法取单结算,请至收银台处理').waitFor();
await $slidingMenu.locator('div.item_box').first().waitFor();
await expect(
$slidingMenu
.locator('div.item_box')
.first()
.getByRole('button', { name: /^取\s单$/ }),
).not.toBeVisible();
const $firstOrder = page.locator('.deleteList .m_sliding_menu .item_box').first(); const $delete = $slidingMenu
.locator('div.item_box')
await expect($firstOrder.getByRole('button', { name: /^取\s单$/ })).not.toBeVisible(); .first()
.locator('.comment > div:nth-child(2) > .touchIcon');
await $firstOrder.locator('.comment > div:nth-child(2) > .touchIcon').click(); await $delete.click();
await page.getByPlaceholder('请输入1-100个字符备注内容').click(); await page.getByPlaceholder('请输入1-100个字符备注内容').click();
await page.getByPlaceholder('请输入1-100个字符备注内容').fill('测试备注'); await page.getByPlaceholder('请输入1-100个字符备注内容').fill('测试备注');
await Promise.all([ await page.getByRole('button', { name: /^保\s存$/ }).click();
page.getByRole('button', { name: /^保\s存$/ }).click(), await expect(page.locator('.ant-message').filter({ hasText: '删除成功' }).nth(2)).toBeVisible();
expect(page.locator('.ant-message').filter({ hasText: '删除成功' })).toBeVisible(),
]);
}); });
}); });
@ -198,7 +306,7 @@ test.describe('挂单', () => {
const phone = customer.phone; const phone = customer.phone;
const username = customer.username; const username = customer.username;
// await page.pause(); await page.pause();
await homeNavigation.gotoModule('收银'); await homeNavigation.gotoModule('收银');
await page.getByRole('button', { name: /^开\s单$/ }).click(); await page.getByRole('button', { name: /^开\s单$/ }).click();

View File

@ -48,7 +48,7 @@ test.describe('目标-目标设置', () => {
.locator('.m-table-cell') .locator('.m-table-cell')
.nth(1) .nth(1)
.click(); .click();
await numberInput.setValue('common', Number(goal)); await numberInput.setValue(Number(goal));
await numberInput.confirmValue(); await numberInput.confirmValue();
await page.getByRole('button', { name: '保 存' }).click(); await page.getByRole('button', { name: '保 存' }).click();
@ -101,7 +101,7 @@ test.describe('目标-目标设置', () => {
.locator('.m-table-cell') .locator('.m-table-cell')
.nth(1) .nth(1)
.click(); .click();
await numberInput.setValue('common', 0); await numberInput.setValue(0);
await numberInput.confirmValue(); await numberInput.confirmValue();
await page.getByRole('button', { name: '保 存' }).click(); await page.getByRole('button', { name: '保 存' }).click();
}); });
@ -191,7 +191,7 @@ test.describe('目标-目标设置', () => {
const code = page.locator('.popupComTableStyle .m-table__body .main-table-body_tr'); const code = page.locator('.popupComTableStyle .m-table__body .main-table-body_tr');
await code.nth(nowRowB).locator('.m-table-cell').nth(1).click(); await code.nth(nowRowB).locator('.m-table-cell').nth(1).click();
await numberInput.setValue('common', Number(goalB)); await numberInput.setValue(Number(goalB));
await numberInput.confirmValue(); await numberInput.confirmValue();
// 员工C内行数 // 员工C内行数
@ -217,7 +217,7 @@ test.describe('目标-目标设置', () => {
).not.toBeVisible(); ).not.toBeVisible();
await code.nth(nowRowC).locator('.m-table-cell').nth(1).click(); await code.nth(nowRowC).locator('.m-table-cell').nth(1).click();
await numberInput.setValue('common', Number(goalC)); await numberInput.setValue(Number(goalC));
await numberInput.confirmValue(); await numberInput.confirmValue();
await page.getByRole('button', { name: /保\s存/ }).click(); await page.getByRole('button', { name: /保\s存/ }).click();