yeg
2026-09-09 1ab091c3746bce05b968b93b5f612305f06d4cec
tests/refinement.ui.test.mjs
@@ -97,8 +97,8 @@
  await expect(popup.locator('body')).toContainText('3:原循环10')
  await expect(popup.locator('svg')).toHaveCount(3)
  // 同组同名电池跨测试仍有各自图例,打印不能合并来源段。
  await expect(popup.locator('svg').first()).toContainText('测试1 (#1) · 组9 · 1号')
  await expect(popup.locator('svg').first()).toContainText('测试2 (#2) · 组9 · 1号')
  await expect(popup.locator('svg').first()).toContainText('测试1-1号')
  await expect(popup.locator('svg').first()).toContainText('测试2-1号')
  await popup.close()
  await page.setViewportSize({width:390,height:844})
  await expect.poll(() => page.locator('.app-main').evaluate(element => element.getBoundingClientRect().left)).toBe(0)
@@ -109,13 +109,15 @@
  await expect(page.locator('.chart-empty')).toHaveCount(0)
  await expect(page.locator('.report-test-detail')).not.toContainText('循环')
  await expect(page.locator('.report-test-detail')).not.toContainText('工步')
  await expect(page.locator('.chart-legend-bar')).toContainText('合并工步')
  await expect(page.locator('.chart-legend-bar .legend-name')).toHaveText(['测试1-1号','测试2-1号'])
  await expect(page.getByText('数据选择',{exact:true})).toHaveCount(0)
  await page.screenshot({path:resolve(artifacts,'compare-desktop.png'),fullPage:true})
  const comparePopupPromise=page.waitForEvent('popup')
  await page.getByRole('button',{name:'打印 / 另存 PDF'}).click()
  const comparePopup=await comparePopupPromise
  await expect(comparePopup.locator('.chart-card svg')).toHaveCount(5)
  await expect(comparePopup.locator('.legend span')).toHaveText(['测试1-1号','测试2-1号'])
  await expect(comparePopup.locator('.chart-card svg').first()).toContainText('测试1-1号')
  for (const chart of await comparePopup.locator('.chart-card svg').all()) {
    await expect(chart.locator('path[fill="none"][stroke="#3978f6"][stroke-width="2"]')).toHaveCount(1)
    await expect(chart.locator('path[fill="none"][stroke="#7d42d8"][stroke-width="2"]')).toHaveCount(1)