diff --git a/pages/validate-demo/add.test.js b/pages/validate-demo/validate-demo-add.test.js similarity index 90% rename from pages/validate-demo/add.test.js rename to pages/validate-demo/validate-demo-add.test.js index 9edfa96cdb8472e867a2c449d917299737bd240c..803538681a39f41f457ea59f9cfa6df944d107e9 100644 --- a/pages/validate-demo/add.test.js +++ b/pages/validate-demo/validate-demo-add.test.js @@ -1,7 +1,6 @@ describe('pages/validate-demo/add.vue', () => { let page beforeAll(async () => { - // 重新reLaunch至首页,并获取首页page对象(其中 program 是uni-automator自动注入的全局对象) page = await program.reLaunch('/pages/validate-demo/add') await page.waitFor('view') }) @@ -13,7 +12,7 @@ describe('pages/validate-demo/add.vue', () => { let weight = 51 let email = "1076998870@qq.com" let dowloadUrl = "https://dcloud.io/" - const setForm = await page.setData({ + await page.setData({ "formData": { "type": type, "type_name": type_name, diff --git a/testSequencer.js b/testSequencer.js index 85ac48272ba4e9f049ba843cd9459ccf781ae9aa..c401c302c12c852ee18d310afdc03df5918f32e1 100644 --- a/testSequencer.js +++ b/testSequencer.js @@ -1,5 +1,5 @@ const Sequencer = require("@jest/test-sequencer").default; -const sortTestFilenames = ["add.test.js","list.test.js","detail.test.js","edit.test.js"]; +const sortTestFilenames = ["add.test.js","list.test.js","detail.test.js","edit.test.js","validate-demo-add.test.js"]; class CustomSequencer extends Sequencer { sort(tests) { // 测试例排序