From 53d21dd9067eb022bc6347f7258400cf72fb9c07 Mon Sep 17 00:00:00 2001 From: Anne_LXM Date: Wed, 29 May 2024 16:24:02 +0800 Subject: [PATCH] test:testSequencer.js --- pages/validate-demo/{add.test.js => validate-demo-add.test.js} | 3 +-- testSequencer.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) rename pages/validate-demo/{add.test.js => validate-demo-add.test.js} (90%) 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 9edfa96..8035386 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 85ac482..c401c30 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) { // 测试例排序 -- GitLab