refactor: 确立独立子工程架构 (backend, admin, mpuniapp) 并同步更新 AGENTS.md 规范

这个提交包含在:
wikiboss
2026-09-20 17:05:22 +08:00
父节点 de3cf8b870
当前提交 9fa1d1fbd0
共有 1679 个文件被更改,包括 204798 次插入 和 16817 次删除

查看文件

@@ -0,0 +1,74 @@
jest.setTimeout(30000)
const PAGE_PATH = '/pages/component/scroll-view/scroll-view-refresher-props'
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
const isAndroid = platformInfo.startsWith('android')
const isVapor = process.env.UNI_APP_X_DOM2 === 'true'
describe('scroll-view-refresher-props', () => {
if (isMP) {
it('skip', () => {
expect(1).toBe(1)
})
return
}
let page
async function performPullRefresh(pullDistance = 180, offsetY = 10) {
const rect = await page.callMethod('getBoundingClientRectForTest')
const windowInfo = await program.callUniMethod('getWindowInfo')
const startX = Math.round(rect.left + rect.width / 2)
const startY = Math.round(rect.top + offsetY + windowInfo.safeAreaInsets.top + 44)
const endY = Math.round(startY + pullDistance)
await program.swipe({
startPoint: {
x: startX,
y: startY
},
endPoint: {
x: startX,
y: endY
},
duration: 500
})
await page.waitFor(800)
}
beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH)
await page.waitFor('view')
await page.waitFor(500)
})
it('screenshot', async () => {
const image = await program.screenshot({ fullPage: true })
expect(image).toSaveImageSnapshot()
})
if (isAndroid && isVapor) {
beforeEach(async () => {
await page.callMethod('resetAndroidOverscrollForTest')
await page.waitFor(100)
})
it('check_android_overscroll', async () => {
await page.callMethod('setAndroidOverscrollForTest', true)
await page.callMethod('setRefresherEnabledForTest', false)
await page.waitFor(100)
expect(await page.callMethod('getAndroidOverscrollForTest')).toBe(true)
expect(await page.callMethod('getRefresherRefreshCountForTest')).toBe(0)
await performPullRefresh()
expect(await page.callMethod('getAndroidOverscrollForTest')).toBe(true)
expect(await page.callMethod('getRefresherRefreshCountForTest')).toBe(0)
})
}
})