为 Chromium 浏览器加入书签和持久历史
This commit is contained in:
1 parent
c27ad52dab
commit
ae04cc9494
9 files changed
+200
-6
No files matched your search
@@ -90,6 +90,24 @@ test('双端联系人实时同步,桌面浏览器独立分区与 UA', { timeou
|
||||
const userAgent = requests.find((entry) => entry.path === '/first').userAgent
|
||||
assert.ok(userAgent.includes('Chrome/' + site.version))
|
||||
assert.match(userAgent, /XHChat\/0\.1\.0/)
|
||||
await toolbar.getByRole('button', { name: '添加书签', exact: true }).click()
|
||||
await toolbar.getByRole('button', { name: '取消书签', exact: true }).waitFor()
|
||||
await toolbar.getByRole('button', { name: '书签与历史', exact: true }).click()
|
||||
await toolbar.locator('#bookmarks').getByText(url + '/first', { exact: true }).waitFor()
|
||||
await toolbar.locator('#history').getByText(url + '/first', { exact: true }).waitFor()
|
||||
const openedPrivate = app.waitForEvent('window')
|
||||
await toolbar.getByRole('button', { name: '隐私窗口', exact: true }).click()
|
||||
const privateToolbar = await openedPrivate
|
||||
const privateAddress = privateToolbar.getByRole('textbox', { name: '网址或搜索关键词' })
|
||||
await privateAddress.fill(url + '/private')
|
||||
await privateAddress.press('Enter')
|
||||
await privateToolbar.getByRole('button', { name: '隔离测试站', exact: true }).waitFor()
|
||||
assert.equal(await privateToolbar.getByRole('button', { name: '书签与历史' }).count(), 0)
|
||||
assert.equal(await toolbar.locator('#history').getByText(url + '/private', { exact: true }).count(), 0)
|
||||
await privateToolbar.close()
|
||||
await toolbar.locator('#bookmarks').getByRole('button', { name: '移除' }).click()
|
||||
await toolbar.getByText('暂无书签').waitFor()
|
||||
await toolbar.getByRole('button', { name: '书签与历史', exact: true }).click()
|
||||
await toolbar.getByRole('button', { name: '新建标签页' }).click()
|
||||
await toolbar.getByRole('button', { name: '新标签页', exact: true }).waitFor()
|
||||
await address.fill('file:///C:/Windows/win.ini')
|
||||
|
||||
Reference in new issue
Block a user