Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(dept): [dept] Fix test cases #1452

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions examples/sites/demos/pc/app/dept/custom-service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading