feat: 今天环境条新增下一个倒数日、浙江油价、上证指数、降雨/AQI
- 后端新增三源:中石化浙江油价(3步会话)、新浪上证行情、Open-Meteo 空气质量(国标AQI换算),按源独立超时与状态 - 天气行改为 降雨概率% · AQI 等级(无雨无AQI时保留观测时间),stale 补缓存标记 - 前端 strip 六格两行(桌面)/四行(移动),倒数日取本地缓存最近一条,超12字截断 - 修复两处 AppSheet 动画竞态存量 e2e 失败(modal contract footer 时序、scrollable 重开残留 dialog)
This commit is contained in:
@@ -59,6 +59,8 @@ test('desktop task composer stays compact, centered, and scrollable on short scr
|
||||
expect(metrics.footerBottom).toBeLessThanOrEqual(metrics.viewport.height + 1)
|
||||
|
||||
await page.keyboard.press('Escape')
|
||||
// AppSheet 关闭有 160ms leave 动画,等旧 dialog 完全移除再重开(否则 strict mode 命中残留按钮)
|
||||
await expect(page.getByRole('dialog', { name: /添加(?:今天)?任务/ })).toHaveCount(0)
|
||||
await page.setViewportSize({ width: 930, height: 844 })
|
||||
dialog = await openTaskComposer(page)
|
||||
const mobile = await dialog.evaluate(element => {
|
||||
@@ -346,6 +348,11 @@ test('task, habit, countdown, memo, action and confirmation overlays share the m
|
||||
const assertModal = async (dialog: ReturnType<Page['getByRole']>) => {
|
||||
await expect(dialog).toBeVisible()
|
||||
await expect(page.locator('#app')).toHaveAttribute('inert', '')
|
||||
const footer = dialog.locator('.app-sheet__footer, footer').first()
|
||||
if (await footer.count()) {
|
||||
// AppSheet 打开有 210ms 滑入动画,先等 footer 落位再测量(否则测在动画中途)
|
||||
await expect.poll(async () => footer.evaluate(element => element.getBoundingClientRect().bottom - innerHeight)).toBeLessThanOrEqual(1)
|
||||
}
|
||||
const metrics = await dialog.evaluate(element => {
|
||||
const panel = element as HTMLElement
|
||||
const header = panel.querySelector<HTMLElement>('.app-sheet__header, header')
|
||||
|
||||
Reference in New Issue
Block a user