提交 9dbc5d86 编写于 作者: 杜庆泉's avatar 杜庆泉

storage 调整自动化测试判定条件,避免序列化顺序导致失败

上级 e607a793
......@@ -233,7 +233,12 @@ describe('ExtApi-StorageInfoTest', () => {
await btnGetStorageButtonInfo.tap()
await page.waitFor(600)
let jsonStr = await getData('apiGetData')
expect(jsonStr).toEqual('{"age":12,"from":"american","name":"james"}')
// 顺序不能保证,验证长度和各个属性来区分
let parseObj = JSON.parse(jsonStr)
expect(jsonStr.length).toEqual(43)
expect(parseObj['age']).toEqual(12)
expect(parseObj['from']).toEqual('american')
expect(parseObj['name']).toEqual('james')
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册