-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #206 from mercillo/mocksForPlugins
Updated Demo App Refactored plugin mocks for android Demo App
- Loading branch information
Showing
25 changed files
with
257 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -313,4 +313,4 @@ internal extension XCTestCase { | |
await fulfillment(of: [expectation], timeout: timeout) | ||
return cancel | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"id": "generated-flow", | ||
"views": [ | ||
{ | ||
"id": "action", | ||
"type": "action", | ||
"exp": [ | ||
"{{count}} = {{count}} + 1", | ||
"beacon('action', 'some-data')" | ||
], | ||
"metaData": { | ||
"beacon": "Click count: {{count}}" | ||
}, | ||
"label": { | ||
"asset": { | ||
"id": "action-label-text", | ||
"type": "text", | ||
"value": "Clicked {{count}} times" | ||
} | ||
} | ||
} | ||
], | ||
"data": { | ||
"count": 0 | ||
}, | ||
"navigation": { | ||
"BEGIN": "FLOW_1", | ||
"FLOW_1": { | ||
"startState": "VIEW_1", | ||
"VIEW_1": { | ||
"state_type": "VIEW", | ||
"ref": "action", | ||
"transitions": { | ||
"*": "END_Done" | ||
} | ||
}, | ||
"END_Done": { | ||
"state_type": "END", | ||
"outcome": "done" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
load("//:index.bzl", "generate_manifest","javascript_pipeline") | ||
|
||
filegroup( | ||
name = "mocks", | ||
srcs = glob(["**/*.json"]), | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
generate_manifest( | ||
name = "manifest", | ||
mocks = [":mocks"], | ||
visibility = ["//visibility:public"], | ||
) | ||
javascript_pipeline( | ||
name = "@player-ui/external-action-plugin-mocks", | ||
entry = "index.ts", | ||
other_srcs = [ | ||
"index.ts", | ||
":manifest", | ||
], | ||
out_dir = "", | ||
) | ||
|
||
java_library( | ||
name = "jar", | ||
resources = [":mocks"], | ||
resource_strip_prefix = "plugins/external-action/mocks", | ||
visibility = ["//visibility:public"], | ||
) |
28 changes: 28 additions & 0 deletions
28
plugins/external-action/mocks/external-action/external-action.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"id": "test-flow", | ||
"data": { | ||
"transitionValue": "Next" | ||
}, | ||
"navigation": { | ||
"BEGIN": "FLOW_1", | ||
"FLOW_1": { | ||
"startState": "EXT_1", | ||
"EXT_1": { | ||
"state_type": "EXTERNAL", | ||
"ref": "test-1", | ||
"transitions": { | ||
"Next": "END_FWD", | ||
"Prev": "END_BCK" | ||
} | ||
}, | ||
"END_FWD": { | ||
"state_type": "END", | ||
"outcome": "FWD" | ||
}, | ||
"END_BCK": { | ||
"state_type": "END", | ||
"outcome": "BCK" | ||
} | ||
} | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
load("//:index.bzl", "generate_manifest") | ||
load("//:index.bzl", "javascript_pipeline") | ||
|
||
generate_manifest( | ||
name = "mocks", | ||
mocks = ["//plugins/reference-assets/mocks","//plugins/pubsub/mocks", "//plugins/external-action/mocks"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
java_library( | ||
name = "jar", | ||
resources = [":mocks"], | ||
resource_strip_prefix = "plugins/", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
load("//:index.bzl", "generate_manifest","javascript_pipeline") | ||
|
||
|
||
|
||
|
||
filegroup( | ||
name = "mocks", | ||
srcs = glob(["**/*.json"]), | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
generate_manifest( | ||
name = "manifest", | ||
mocks = [":mocks"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
javascript_pipeline( | ||
name = "@player-ui/pubsub-plugin-mocks", | ||
entry = "index.ts", | ||
dependencies = [ | ||
"@npm//@player-tools/dsl", | ||
], | ||
other_srcs = [ | ||
"index.ts", | ||
":manifest", | ||
] + glob(["**/*.tsx"]), | ||
out_dir = "", | ||
) | ||
|
||
java_library( | ||
name = "jar", | ||
resources = [":mocks"], | ||
resource_strip_prefix = "plugins/pubsub/mocks/", | ||
visibility = ["//visibility:public"], | ||
) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"id": "generated-flow", | ||
"views": [ | ||
{ | ||
"id": "action", | ||
"type": "action", | ||
"exp": "@[ publish('some-event', 'event published message') ]@", | ||
"label": { | ||
"asset": { | ||
"id": "action-label", | ||
"type": "text", | ||
"value": "Clicked to publish event" | ||
} | ||
} | ||
} | ||
], | ||
"data": { | ||
"count": 0 | ||
}, | ||
"navigation": { | ||
"BEGIN": "FLOW_1", | ||
"FLOW_1": { | ||
"startState": "VIEW_1", | ||
"VIEW_1": { | ||
"state_type": "VIEW", | ||
"ref": "action", | ||
"transitions": { | ||
"*": "END_Done" | ||
} | ||
}, | ||
"END_Done": { | ||
"state_type": "END", | ||
"outcome": "done" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.