refactor: 确立独立子工程架构 (backend, admin, mpuniapp) 并同步更新 AGENTS.md 规范
这个提交包含在:
@@ -0,0 +1,67 @@
|
||||
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
|
||||
const isMP = platformInfo.startsWith('mp')
|
||||
describe('background-image-test', () => {
|
||||
if (isMP) {
|
||||
it('skip', () => {
|
||||
expect(1).toBe(1)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
let page;
|
||||
beforeAll(async () => {
|
||||
page = await program.reLaunch('/pages/CSS/background/background-image');
|
||||
await page.waitFor('view');
|
||||
await page.waitFor(1000);
|
||||
});
|
||||
|
||||
it('background-image-screenshot', async () => {
|
||||
const image = await program.screenshot({
|
||||
fullPage: true
|
||||
});
|
||||
expect(image).toSaveImageSnapshot();
|
||||
});
|
||||
|
||||
it('background-image-select', async () => {
|
||||
await page.callMethod('updateBackgroundSelect')
|
||||
await page.waitFor(300);
|
||||
const image = await program.screenshot({
|
||||
fullPage: true
|
||||
});
|
||||
expect(image).toSaveImageSnapshot();
|
||||
});
|
||||
|
||||
it('动态 style 切换 background color', async () => {
|
||||
await page.callMethod('setBackgroundColor')
|
||||
await page.waitFor(300);
|
||||
const image1 = await program.screenshot({
|
||||
fullPage: true
|
||||
});
|
||||
expect(image1).toSaveImageSnapshot();
|
||||
|
||||
await page.callMethod('setBackgroundImage')
|
||||
await page.waitFor(300);
|
||||
|
||||
const image2 = await program.screenshot({
|
||||
fullPage: true
|
||||
});
|
||||
expect(image2).toSaveImageSnapshot();
|
||||
})
|
||||
|
||||
it('动态 class 切换 background color/image', async () => {
|
||||
await page.callMethod('changeBgClass')
|
||||
await page.waitFor(300);
|
||||
const image1 = await program.screenshot({
|
||||
fullPage: true
|
||||
});
|
||||
expect(image1).toSaveImageSnapshot();
|
||||
|
||||
await page.callMethod('changeBgClass')
|
||||
await page.waitFor(300);
|
||||
|
||||
const image2 = await program.screenshot({
|
||||
fullPage: true
|
||||
});
|
||||
expect(image2).toSaveImageSnapshot();
|
||||
})
|
||||
});
|
||||
在新工单中引用
屏蔽一个用户