Skip to content

Commit cb1a479

Browse files
committed
feat: created Action.PushCard and Action.ReplaceCard
1 parent 040f583 commit cb1a479

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

lib/schema.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,69 @@
6060
},
6161
{
6262
"$ref": "#/definitions/Action.Save"
63+
},
64+
{
65+
"$ref": "#/definitions/Action.PushCard"
66+
},
67+
{
68+
"$ref": "#/definitions/Action.ReplaceCard"
6369
}
6470
]
6571
},
72+
"Action.PushCard": {
73+
"additionalProperties": true,
74+
"description": "When invoked this will push the new card on the routing history.",
75+
"properties": {
76+
"type": {
77+
"type": "string",
78+
"description": "Must be `\"Action.PushCard\"`."
79+
},
80+
"title": {
81+
"type": "string",
82+
"description": "Label for button or link that represents this action."
83+
},
84+
"stateMachineName": {
85+
"type": "string",
86+
"description": "The state machine to launch."
87+
},
88+
"input": {
89+
"type": "object",
90+
"description": "The input to launch with."
91+
}
92+
},
93+
"required": [
94+
"type",
95+
"stateMachineName"
96+
],
97+
"type": "object"
98+
},
99+
"Action.ReplaceCard": {
100+
"additionalProperties": true,
101+
"description": "When invoked this will replace the current entry in the history with the new route.",
102+
"properties": {
103+
"type": {
104+
"type": "string",
105+
"description": "Must be `\"Action.ReplaceCard\"`."
106+
},
107+
"title": {
108+
"type": "string",
109+
"description": "Label for button or link that represents this action."
110+
},
111+
"stateMachineName": {
112+
"type": "string",
113+
"description": "The state machine to launch."
114+
},
115+
"input": {
116+
"type": "object",
117+
"description": "The input to launch with."
118+
}
119+
},
120+
"required": [
121+
"type",
122+
"stateMachineName"
123+
],
124+
"type": "object"
125+
},
66126
"Action.OpenUrl": {
67127
"additionalProperties": true,
68128
"description": "When invoked, show the given url either by launching it in an external web browser or showing in-situ with embedded web browser.",

test/simple-manifest-tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ describe('Run some manifestation tests', () => {
1919
expect(requiredElements.includes(element.type)).to.equal(true)
2020
requiredElements.splice(requiredElements.indexOf(element.type), 1)
2121
})
22-
expect(requiredElements.length).to.equal(31)
22+
expect(requiredElements.length).to.equal(33)
2323
})
2424
})

0 commit comments

Comments
 (0)