Update types, downloader, reducers to accomodate new folder resource
parent
755ce7f178
commit
e2d311e3ea
|
@ -45,6 +45,7 @@ export function fakeSequence(): TaggedSequence {
|
|||
},
|
||||
id: idCounter++,
|
||||
color: "red",
|
||||
folder_id: undefined,
|
||||
name: "fake",
|
||||
kind: "sequence",
|
||||
body: []
|
||||
|
|
|
@ -39,6 +39,7 @@ const tr0: TaggedResource = {
|
|||
"id": 23,
|
||||
"name": "Goto 0, 0, 0",
|
||||
"color": "gray",
|
||||
"folder_id": undefined,
|
||||
"body": [
|
||||
{
|
||||
"kind": "move_absolute",
|
||||
|
@ -402,6 +403,7 @@ const blankSeq: TaggedSequence = {
|
|||
"id": undefined,
|
||||
"name": "Repair sequence",
|
||||
"color": "gray",
|
||||
"folder_id": undefined,
|
||||
"body": [],
|
||||
"args": {
|
||||
"version": 4,
|
||||
|
|
|
@ -164,5 +164,7 @@ export class API {
|
|||
get alertPath() { return `${this.baseUrl}/api/alerts/`; }
|
||||
/** /api/global_bulletins/:id */
|
||||
get globalBulletinPath() { return `${this.baseUrl}/api/global_bulletins/`; }
|
||||
/** /api/folders */
|
||||
get foldersPath() { return `${this.baseUrl}/api/folders/`; }
|
||||
// get syncPath() { return `${this.baseUrl}/api/device/sync/`; }
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ describe("commitBulkEditor()", () => {
|
|||
id: sequence_id,
|
||||
name: "Test Sequence",
|
||||
color: "gray",
|
||||
folder_id: undefined,
|
||||
body: [{ kind: "wait", args: { milliseconds: 100 } }],
|
||||
args: { "locals": { kind: "scope_declaration", args: {} }, "version": 4 },
|
||||
kind: "sequence"
|
||||
|
|
|
@ -108,6 +108,7 @@ describe("in_use tracking at reducer level", () => {
|
|||
name: "Y",
|
||||
kind: "sequence",
|
||||
color: "blue",
|
||||
folder_id: undefined,
|
||||
args: { version: 8, locals: { kind: "scope_declaration", args: {} } }
|
||||
})[0];
|
||||
sequence.body.id = sequence_id;
|
||||
|
|
|
@ -27,6 +27,7 @@ describe("resource reducer", () => {
|
|||
const next = resourceReducer(state, overwrite(sequence, {
|
||||
kind: "sequence",
|
||||
name: "wow",
|
||||
folder_id: undefined,
|
||||
args: { version: -0, locals: { kind: "scope_declaration", args: {} } },
|
||||
body: [],
|
||||
color: "red"
|
||||
|
|
|
@ -11,6 +11,7 @@ describe("tagAllSteps()", () => {
|
|||
"id": 8,
|
||||
"name": "Goto 0, 0, 0",
|
||||
"color": "gray",
|
||||
"folder_id": undefined,
|
||||
"body": [
|
||||
{
|
||||
"kind": "move_relative",
|
||||
|
|
|
@ -16,6 +16,7 @@ describe("<AllSteps/>", () => {
|
|||
"id": 8,
|
||||
"name": "Goto 0, 0, 0",
|
||||
"color": "gray",
|
||||
"folder_id": undefined,
|
||||
"body": [
|
||||
{
|
||||
"kind": "move_relative",
|
||||
|
|
|
@ -35,6 +35,7 @@ describe("<TestButton/>", () => {
|
|||
"body": {
|
||||
"name": "Goto 0, 0, 0",
|
||||
"color": "gray",
|
||||
"folder_id": undefined,
|
||||
"body": [],
|
||||
"args": {
|
||||
"version": 4,
|
||||
|
|
|
@ -39,6 +39,7 @@ describe("<InputDefault/>", () => {
|
|||
"id": 74,
|
||||
"name": "Goto 0, 0, 0",
|
||||
"color": "gray",
|
||||
"folder_id": undefined,
|
||||
"body": [step],
|
||||
"args": {
|
||||
"version": 4,
|
||||
|
|
|
@ -96,6 +96,7 @@ const emptySequenceBody = (seqCount: number): TaggedSequence["body"] => ({
|
|||
locals: { kind: "scope_declaration", args: {} },
|
||||
},
|
||||
color: "gray",
|
||||
folder_id: undefined,
|
||||
kind: "sequence",
|
||||
body: []
|
||||
});
|
||||
|
|
|
@ -37,6 +37,7 @@ const seedSequence: TaggedSequence = {
|
|||
body: {
|
||||
id: 1,
|
||||
color: "red",
|
||||
folder_id: undefined,
|
||||
name: "test",
|
||||
kind: "sequence",
|
||||
args: {
|
||||
|
|
|
@ -76,6 +76,7 @@ export async function fetchSyncData(dispatch: Function) {
|
|||
get("Sensor", API.current.sensorPath),
|
||||
get("Tool", API.current.toolsPath),
|
||||
get("Alert", API.current.alertPath),
|
||||
get("Folder", API.current.foldersPath)
|
||||
]),
|
||||
2: () => Promise.all<{}>([
|
||||
get("SensorReading", API.current.sensorReadingPath),
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
"coveralls": "3.0.9",
|
||||
"enzyme": "3.10.0",
|
||||
"enzyme-adapter-react-16": "1.15.1",
|
||||
"farmbot": "8.4.0",
|
||||
"farmbot": "8.4.1",
|
||||
"i18next": "19.0.1",
|
||||
"install": "0.13.0",
|
||||
"lodash": "4.17.15",
|
||||
|
|
Loading…
Reference in New Issue