|
|
@@ -147,8 +147,34 @@ test('created roles and editable teams share a durable chat list without plugin
|
|
|
await expect(rail.locator('.sidebar-account-switcher__main')).toContainText('fixture')
|
|
|
await expect(rail.locator('.sidebar-account-switcher__main .account-initial-avatar')).toHaveText('F')
|
|
|
await rail.getByRole('button', { name: '设置与模式', exact: true }).click()
|
|
|
- await expect(page.getByRole('menu', { name: '设置与模式' }).getByRole('menuitem')).toHaveText(['进入设置', '进入聊天模式'])
|
|
|
- await page.getByRole('menuitem', { name: '进入设置', exact: true }).click()
|
|
|
+ await expect(page.getByRole('menu', { name: '账号菜单' }).getByRole('menuitem')).toHaveText(['设置', '关于', '帮助', '进入聊天模式'])
|
|
|
+ await page.getByRole('menuitem', { name: '关于', exact: true }).click()
|
|
|
+ const about = page.getByRole('dialog', { name: '关于夭夭 AI', exact: true })
|
|
|
+ await expect(about).toBeVisible()
|
|
|
+ await expect(about.locator('.about-version')).toHaveText(/^版本 \d+\.\d+\.\d+$/)
|
|
|
+ await expect(page.getByRole('dialog', { name: '设置中心', exact: true })).toHaveCount(0)
|
|
|
+ await page.screenshot({ path: testInfo.outputPath('independent-about.png') })
|
|
|
+ await page.keyboard.press('Escape')
|
|
|
+ await expect(about).toHaveCount(0)
|
|
|
+ await rail.getByRole('button', { name: '工具', exact: true }).click()
|
|
|
+ await page.getByRole('menuitem', { name: '已连接应用', exact: true }).click()
|
|
|
+ const apps = page.getByRole('dialog', { name: '已连接应用', exact: true })
|
|
|
+ await expect(apps).toBeVisible()
|
|
|
+ await expect(apps.getByRole('tab', { name: 'MCP 服务', exact: true })).toBeVisible()
|
|
|
+ await expect(page.locator('.settings-sidebar')).toHaveCount(0)
|
|
|
+ await page.screenshot({ path: testInfo.outputPath('independent-apps.png') })
|
|
|
+ await apps.getByRole('button', { name: '关闭已连接应用', exact: true }).click()
|
|
|
+ await rail.getByRole('button', { name: '工具', exact: true }).click()
|
|
|
+ await page.getByRole('menuitem', { name: '自动化', exact: true }).click()
|
|
|
+ await expect(page).toHaveURL(/\/conversations\/automations(?:\?.*)?$/)
|
|
|
+ await expect(page.getByRole('main', { name: '自动化工作区' })).toBeVisible()
|
|
|
+ await expect(page.locator('.schedule-day')).toHaveCount(7)
|
|
|
+ await page.getByRole('tab', { name: '运行日志', exact: true }).click()
|
|
|
+ await page.screenshot({ path: testInfo.outputPath('independent-automations.png') })
|
|
|
+ await page.getByRole('button', { name: '返回聊天', exact: true }).click()
|
|
|
+ await expect(page).toHaveURL(/\/conversations$/)
|
|
|
+ await rail.getByRole('button', { name: '设置与模式', exact: true }).click()
|
|
|
+ await page.getByRole('menuitem', { name: '设置', exact: true }).click()
|
|
|
const settings = page.getByRole('dialog', { name: '设置中心', exact: true })
|
|
|
await expect(settings.locator('.settings-account-summary')).toContainText('fixture')
|
|
|
await expect(settings.locator('.settings-account-summary .account-initial-avatar')).toHaveText('F')
|
|
|
@@ -165,6 +191,7 @@ test('created roles and editable teams share a durable chat list without plugin
|
|
|
await expect(settings.getByRole('button', { name: '保存更改', exact: true })).toBeDisabled()
|
|
|
await settings.getByRole('button', { name: '关闭设置中心', exact: true }).click()
|
|
|
await rail.locator('.sidebar-account-switcher__main').click()
|
|
|
+ await page.getByRole('menuitem', {name:'设置',exact:true}).click()
|
|
|
await settings.getByRole('button', { name: '身份与头像', exact: true }).click()
|
|
|
await expect(settings.getByRole('button', { name: '造型:星星', exact: true })).toHaveAttribute('aria-pressed', 'true')
|
|
|
await expect(settings.getByRole('button', { name: '使用颜色 #1488ff', exact: true })).toHaveAttribute('aria-pressed', 'true')
|
|
|
@@ -183,10 +210,10 @@ test('created roles and editable teams share a durable chat list without plugin
|
|
|
await expect(rail).toHaveCSS('width', '264px')
|
|
|
await expect(rail.getByRole('button', { name: '聊天', exact: true })).toHaveCount(0)
|
|
|
await rail.getByRole('button', { name: '设置与模式', exact: true }).click()
|
|
|
- const settingsMenu = page.getByRole('menu', { name: '设置与模式', exact: true })
|
|
|
- await expect(settingsMenu.getByRole('menuitem')).toHaveText(['进入设置', '进入 Bot 模式'])
|
|
|
+ const settingsMenu = page.getByRole('menu', { name: '账号菜单', exact: true })
|
|
|
+ await expect(settingsMenu.getByRole('menuitem')).toHaveText(['设置', '关于', '帮助', '进入 Bot 模式'])
|
|
|
await page.screenshot({ path: testInfo.outputPath('chat-settings-mode-menu.png') })
|
|
|
- await settingsMenu.getByRole('menuitem', { name: '进入设置', exact: true }).click()
|
|
|
+ await settingsMenu.getByRole('menuitem', { name: '设置', exact: true }).click()
|
|
|
await expect(page.getByRole('dialog', { name: '设置中心', exact: true })).toBeVisible()
|
|
|
await page.getByRole('button', { name: '关闭设置中心', exact: true }).click()
|
|
|
await expect(rail.getByRole('button', { name: '设置与模式', exact: true })).toBeFocused()
|
|
|
@@ -421,7 +448,7 @@ test('created roles and editable teams share a durable chat list without plugin
|
|
|
await expect(page.getByRole('tab', { name: '未归档', exact: true })).toBeVisible()
|
|
|
await page.getByRole('button', { name: '关闭搜索', exact: true }).click()
|
|
|
await rail.locator('.sidebar-account-switcher__main').click()
|
|
|
- await page.getByRole('button', { name: '进入聊天模式', exact: true }).click()
|
|
|
+ await page.getByRole('menuitem', { name: '进入聊天模式', exact: true }).click()
|
|
|
await expect(page).toHaveURL(/\/chat$/)
|
|
|
await page.goto('/')
|
|
|
await expect(page).toHaveURL(/\/chat$/)
|
|
|
@@ -438,7 +465,7 @@ test('created roles and editable teams share a durable chat list without plugin
|
|
|
test('subaccount allocation and Bot-only navigation work through the browser', async ({ page, browser }, testInfo) => {
|
|
|
await login(page)
|
|
|
await page.locator('.desktop-sidebar').getByRole('button', { name: '设置与模式', exact: true }).click()
|
|
|
- await page.getByRole('menuitem', { name: '进入设置', exact: true }).click()
|
|
|
+ await page.getByRole('menuitem', { name: '设置', exact: true }).click()
|
|
|
const settings = page.getByRole('dialog', { name: '设置中心', exact: true })
|
|
|
await settings.getByRole('button', { name: '用户与权限', exact: true }).click()
|
|
|
const username = `child-${Date.now()}`
|
|
|
@@ -462,7 +489,7 @@ test('subaccount allocation and Bot-only navigation work through the browser', a
|
|
|
await expect(child).toHaveURL(/\/conversations$/)
|
|
|
await expect(child.getByRole('heading', { name: '还没有聊天' })).toBeVisible()
|
|
|
await child.locator('.desktop-sidebar').getByRole('button', { name: '设置与模式', exact: true }).click()
|
|
|
- await expect(child.getByRole('menu', { name: '设置与模式' }).getByRole('menuitem')).toHaveText(['进入设置'])
|
|
|
+ await expect(child.getByRole('menu', { name: '账号菜单' }).getByRole('menuitem')).toHaveText(['设置', '关于', '帮助'])
|
|
|
await child.keyboard.press('Escape')
|
|
|
await openCreate(child, '新建 Bot')
|
|
|
const dialog = child.getByRole('dialog')
|