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

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

查看文件

@@ -0,0 +1,47 @@
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isWeb = platformInfo.startsWith('web') || platformInfo.startsWith('h5')
const PAGE_PATH = '/pages/template/browser-built-in-elements/browser-built-in-elements'
jest.setTimeout(60000)
describe('template-browser-built-in-elements', () => {
if (!isWeb) {
it('only supports web runtime', () => {
expect(1).toBe(1)
})
return
}
let page
beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH)
await page.waitFor('view')
await page.waitFor('text')
await page.waitFor(1000)
})
it('renders page titles and browser link', async () => {
const titles = await page.$$('.title')
expect(titles.length).toBe(2)
expect(await titles[0].text()).toBe('使用浏览器内置的 a 标签')
expect(await titles[1].text()).toContain('button 标签')
const nativeState = await page.callMethod('jest_getNativeState')
expect(nativeState.linkText).toContain('uni-app x')
expect(nativeState.linkHref).toContain('doc.dcloud.net.cn/uni-app-x/')
expect(nativeState.linkTarget).toBe('uni-app-x')
})
it('creates the browser native button in placeholder area', async () => {
const container = await page.$('.html-element-area')
const nativeState = await page.callMethod('jest_getNativeState')
expect(nativeState.buttonCount).toBe(1)
expect(nativeState.buttonText).toBe('browser button')
const containerSize = await container.size()
expect(containerSize.width).toBeGreaterThan(0)
})
})