docs: 定时通知补充飞书自定义机器人渠道说明
定时通知新增飞书渠道后同步文档:使用文档补充飞书渠道的配置方式与示例截图,开发文档补充 FEISHU 渠道类型与发送器实现,并在功能概览、技术栈等处同步“飞书”。 变更内容: - guide/notifications.md 增加飞书渠道配置项与获取路径,新增飞书渠道配置示例图 - dev/notifications.md 渠道表新增 FEISHU(post 富文本、可选加签),补充 webhookUrl/secret 与 hasSecret 脱敏说明 - guide/introduction.md、guide/settings.md、index.md、dev/architecture.md 同步“飞书” - scripts/ts/capture-elements.ts 新增 captureChannelFeishu 并纳入 main 全量调用
This commit is contained in:
@@ -86,6 +86,38 @@ export async function captureModals(page: Page, only?: string[]): Promise<void>
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 截取「添加渠道」弹窗的飞书配置表单(elements/add-channel-feishu.png)。
|
||||
*
|
||||
* 打开设置页的添加渠道弹窗后,将「渠道类型」切换为飞书,展示 Webhook 地址与签名密钥表单项。
|
||||
*
|
||||
* @param page Page 实例
|
||||
*/
|
||||
export async function captureChannelFeishu(page: Page): Promise<void> {
|
||||
try {
|
||||
await page.setViewportSize({ width: 1440, height: 1000 })
|
||||
await page.goto(BASE_URL + '/settings')
|
||||
await waitPage(page, { selector: PAGE_READY })
|
||||
if (!(await clickText(page, '添加渠道'))) throw new Error('未找到「添加渠道」按钮')
|
||||
const modal = page.locator('.n-modal').first()
|
||||
try {
|
||||
await modal.waitFor({ state: 'visible', timeout: 8000 })
|
||||
} catch {
|
||||
// 首次点击可能未生效(页面状态未就绪),重试一次
|
||||
await clickText(page, '添加渠道')
|
||||
await modal.waitFor({ state: 'visible', timeout: 15000 })
|
||||
}
|
||||
// 弹窗内首个下拉为「渠道类型」,切换为飞书以展示 Webhook 与签名密钥表单
|
||||
await modal.locator('.n-base-selection').first().click()
|
||||
await page.getByText('飞书', { exact: true }).last().click()
|
||||
await page.waitForTimeout(600)
|
||||
await modal.screenshot({ path: resolve(ELEM_DIR, 'add-channel-feishu.png') })
|
||||
console.log('[OK] modal/add-channel-feishu')
|
||||
} catch (err) {
|
||||
console.log(`[FAIL] add-channel-feishu: ${err}`)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 截取新增记录弹窗(elements/add-record.png)。
|
||||
*
|
||||
@@ -605,6 +637,7 @@ async function main(): Promise<void> {
|
||||
await captureCalendarDetail(page)
|
||||
await captureAddRecord(page)
|
||||
await captureModals(page)
|
||||
await captureChannelFeishu(page)
|
||||
await captureEditRecord(page)
|
||||
await captureInlineCreate(page)
|
||||
await captureAiRule(page)
|
||||
|
||||
Reference in New Issue
Block a user