Skip to content

Commit

Permalink
feat: created Action.PushCard and Action.ReplaceCard
Browse files Browse the repository at this point in the history
  • Loading branch information
meenahoda committed Jan 24, 2019
1 parent 040f583 commit cb1a479
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
60 changes: 60 additions & 0 deletions lib/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,69 @@
},
{
"$ref": "#/definitions/Action.Save"
},
{
"$ref": "#/definitions/Action.PushCard"
},
{
"$ref": "#/definitions/Action.ReplaceCard"
}
]
},
"Action.PushCard": {
"additionalProperties": true,
"description": "When invoked this will push the new card on the routing history.",
"properties": {
"type": {
"type": "string",
"description": "Must be `\"Action.PushCard\"`."
},
"title": {
"type": "string",
"description": "Label for button or link that represents this action."
},
"stateMachineName": {
"type": "string",
"description": "The state machine to launch."
},
"input": {
"type": "object",
"description": "The input to launch with."
}
},
"required": [
"type",
"stateMachineName"
],
"type": "object"
},
"Action.ReplaceCard": {
"additionalProperties": true,
"description": "When invoked this will replace the current entry in the history with the new route.",
"properties": {
"type": {
"type": "string",
"description": "Must be `\"Action.ReplaceCard\"`."
},
"title": {
"type": "string",
"description": "Label for button or link that represents this action."
},
"stateMachineName": {
"type": "string",
"description": "The state machine to launch."
},
"input": {
"type": "object",
"description": "The input to launch with."
}
},
"required": [
"type",
"stateMachineName"
],
"type": "object"
},
"Action.OpenUrl": {
"additionalProperties": true,
"description": "When invoked, show the given url either by launching it in an external web browser or showing in-situ with embedded web browser.",
Expand Down
2 changes: 1 addition & 1 deletion test/simple-manifest-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ describe('Run some manifestation tests', () => {
expect(requiredElements.includes(element.type)).to.equal(true)
requiredElements.splice(requiredElements.indexOf(element.type), 1)
})
expect(requiredElements.length).to.equal(31)
expect(requiredElements.length).to.equal(33)
})
})

0 comments on commit cb1a479

Please sign in to comment.