-
Notifications
You must be signed in to change notification settings - Fork 18
Launching a Workflow using an AnyWorkflow #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…lowRepresentableMetadata open - RAG MZ Co-authored-by: Richard Gist <Richard.Gist@wwt.com>
…ng AnyWorkflow - RAG MZ Co-authored-by: Richard Gist <Richard.Gist@wwt.com>
…ind starting content item in WorkflowLauncher.
Richard-Gist
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to try to stay hands-off, and let you run with this. Reach out if you want some help.
| wait(for: [exp], timeout: TestConstant.timeout) | ||
| } | ||
|
|
||
| func testLaunchingAWorkflowFromAnAnyWorkflow() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll want to either update this or split it out. This is effectively only testing that we can compile with multiple FRs in the workflow, and that we can get an FR on the screen.
The updated and/or new test would be something with FR1-4 and each FR is a different type (one is Passthrough, one is String/String, One is String/Never, Never/Never) or something like that. Then we'll want to actually assert that we can step through the entire flow and find FR1-4 on the screen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's exactly what the generic constraint tests are for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tyler-Keith-Thompson I'll take a look at those in the AM 👍🏻
Codecov Report
@@ Coverage Diff @@
## data-driven #150 +/- ##
===============================================
- Coverage 91.27% 89.70% -1.57%
===============================================
Files 92 94 +2
Lines 2373 2497 +124
===============================================
+ Hits 2166 2240 +74
- Misses 207 257 +50
Continue to review full report at Codecov.
|
|
Added a test for fatalError when no items in a workflow earlier then spent most of the day deciphering some of the unit tests and working through adding needed |
|
EOD: Was able to drive out a few more Also fuzzy on the difference between setting |
Sources/SwiftCurrent_SwiftUI/Extensions/WorkflowExtensions.swift
Outdated
Show resolved
Hide resolved
|
EOD: Added support for startingArgs - swapped to using the GenericConstraintsTests (copied and renamed for ExtendedFlowRepresentableMetadata) to drive out more functionality for persistence and launch style arguements. |
|
I tried to work on this a bit today, but there's a LOT of work we'll need to do to convert all of the tests over to actually test things. I tried some different routes like maybe taking the generic constraint tests from SwiftCurrent core and seeing if those were easier to change over, but they weren't because of a difference in what you can use as starting arguments. Maybe someone with a bit more regex prowess can make mass edits to convert the code, but for now, the only way forward I see is essentially translating all of the tests. I found I had to update how the workflow was created, how it was launched, and how it was asserted. I did contemplate for a while if we even needed to do all of this, which is still a "maybe" to a somewhat of a "yeah". We might be able to prune it down some but a lot of these tests will remain valid if we ever get to a point of letting our users declare Workflows and feed them into SwiftUI this way (which is something that holds a lot of value for integrating into certain design patterns). But overall I'm not sure we're actually going to use these |
… needed to test launching with a workflow. Added TODO for the thenProceeds to be removed later. - RAG MZ Co-authored-by: Richard Gist <Richard.Gist@wwt.com>
Co-authored-by: Richard Gist <Richard.Gist@wwt.com>
…vate again. - RAG MZ Co-authored-by: Richard Gist <Richard.Gist@wwt.com>
Tests/SwiftCurrentTests/FlowRepresentableMetadataConsumerTests.swift
Outdated
Show resolved
Hide resolved
Tests/SwiftCurrentTests/FlowRepresentableMetadataConsumerTests.swift
Outdated
Show resolved
Hide resolved
Co-authored-by: Richard Gist <Richard.Gist@wwt.com>
Richard-Gist
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though the Linter is failing, I am approving this PR because we are merging into a feature branch. Those TODO failures will prevent us from accidentally merging into main with that code, but also allow us to move forward with getting data-driven working.
Linked Issue:
Checklist:
If Applicable:
If Public API Has Changed: