diff --git a/examples/sites/demos/pc/app/dept/custom-service.spec.ts b/examples/sites/demos/pc/app/dept/custom-service.spec.ts index e5a9b7027e..37139bec14 100644 --- a/examples/sites/demos/pc/app/dept/custom-service.spec.ts +++ b/examples/sites/demos/pc/app/dept/custom-service.spec.ts @@ -5,13 +5,25 @@ test('自定义服务数据', async ({ page }) => { await page.goto('dept#custom-service') const iconBox = page.locator('.tiny-input__suffix-inner svg') await iconBox.first().click() - await page.getByPlaceholder('可输入部门编码或名称').click() + await page.getByPlaceholder('可输入部门编码或名称').first().click() await page.getByText('无线网络业务架构与设计部').click() - await page.locator('.col-xs-9 > .tiny-select > div > .tiny-input > .tiny-input__inner').first().click() + await page + .locator('div') + .filter({ hasText: /^公司SZ技术SZ海洋网络天闻数媒贝托SZ鼎桥通信$/ }) + .getByRole('textbox') + .click() await page.getByRole('listitem').filter({ hasText: 'SZ技术' }).click() - await page.locator('div:nth-child(3) > .col-xs-9 > .tiny-select > div > .tiny-input > .tiny-input__inner').click() + await page + .locator('div') + .filter({ hasText: /^一级部门测试数据室XX中国XX测试数据部测试数据XX管理部$/ }) + .getByRole('textbox') + .click() await page.getByRole('listitem').filter({ hasText: '测试数据室XX' }).click() - await page.locator('div:nth-child(7) > .col-xs-9 > .tiny-select > div > .tiny-input > .tiny-input__inner').click() + await page + .locator('div') + .filter({ hasText: /^五级部门测试数据室XX中国XX测试数据部测试数据XX管理部$/ }) + .getByRole('textbox') + .click() await page.getByRole('listitem').filter({ hasText: '测试数据室XX' }).click() await page.waitForTimeout(500) await page.getByRole('button', { name: '确定' }).click()