我正在使用Firebase存储锻炼应用程序的信息。
我用户添加了锻炼名称,然后将其推送到数据库。我可以继续推动这些,但是我的问题是它似乎并没有像一个对象一样被推动为一个数组。请参阅下面的屏幕截图...
正如您在控制台日志图片中看到的,executions属性是一个对象,而不是我期望的数组。
我用来推送的代码:
let newWorkout = {
title: 'title',
exercises: [{
name: 'pulldownsnsn',
sets: 4
}]}
let ref = firebase.database().ref("/userProfile/"+this.userId);
ref.child("workouts").push(newWorkout);
Run Code Online (Sandbox Code Playgroud) 我试图在 testcafes API 中找到一种类似于 Cypress 请求的方法。
Cypress 的请求会将任何 cookie 附加到浏览器中已经存在的请求中,以便 http 请求看起来像是从浏览器/用户发出的。
testcafe 中是否有类似的功能?