u
This commit is contained in:
1 parent
b4498e5350
commit
bf9dca19de
47 files changed
+8592
-313
No files matched your search
@@ -0,0 +1,41 @@
|
||||
import { chromium } from '@playwright/test'
|
||||
|
||||
// 直接确认:dev server 吐给浏览器的 G3Table.vue 里,到底有没有新判据。
|
||||
const BASE = process.env.PROBE_URL || 'http://localhost:5200'
|
||||
const browser = await chromium.launch()
|
||||
const page = await browser.newPage({ viewport: { width: 1400, height: 1200 } })
|
||||
|
||||
const seen = []
|
||||
page.on('response', async (res) => {
|
||||
const u = res.url()
|
||||
if (u.includes('G3Table.vue')) {
|
||||
try {
|
||||
const t = await res.text()
|
||||
seen.push({
|
||||
url: u.split('?')[0],
|
||||
hasNew: t.includes('innerBottom - 1'),
|
||||
hasOld: t.includes('used + bodyH >= available'),
|
||||
len: t.length,
|
||||
})
|
||||
} catch {}
|
||||
}
|
||||
})
|
||||
|
||||
await page.goto(BASE, { waitUntil: 'networkidle' })
|
||||
await page.waitForTimeout(800)
|
||||
|
||||
console.log('=== G3Table.vue responses seen by browser ===')
|
||||
console.log(JSON.stringify(seen, null, 2))
|
||||
|
||||
// 再看页面里 is-body-fill 的实际状态,以及 measureBodyFill 是否存在新逻辑
|
||||
const probe = await page.evaluate(() => {
|
||||
const wrap = document.querySelector('[data-testid="table-wrap"]')
|
||||
const root = wrap.querySelector('.g3-table')
|
||||
return {
|
||||
isBodyFill: root.classList.contains('is-body-fill'),
|
||||
wrapH: Math.round(wrap.getBoundingClientRect().height),
|
||||
}
|
||||
})
|
||||
console.log('page state:', JSON.stringify(probe))
|
||||
|
||||
await browser.close()
|
||||
Reference in new issue
Block a user