Skip to content

Conversation

dhavalshreyas
Copy link
Contributor

In AnyWorkflowConvertible we were mapping all actions to AnyWorkflowAction. Fixing it here to map to a generic Action type.

Checklist

  • Unit Tests
  • I have made corresponding changes to the documentation

Copy link
Collaborator

@bencochran bencochran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ended up being a lot less invasive than I had imagined, nice!

return asAnyWorkflow().render(context: context, key: key, outputMap: { $0 })
}

public func rendered<Parent, Action>(in context: RenderContext<Parent>, key: String = "", outputMap: @escaping (Output) -> Action) -> Rendering where Action: WorkflowAction, Action.WorkflowType == Parent {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line below this too, yeah? (github won’t let me comment on collapsed parts of code…)

.assertNoAction()
}

func test_childWorkflowAction() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this test fail before? I thought this only happened when things got AnyWorkflowd?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test did fail before the fix.

@dhavalshreyas dhavalshreyas force-pushed the dhaval/workflowAssertActionFix branch from bd9e188 to 542fd03 Compare August 25, 2020 22:33
@dhavalshreyas dhavalshreyas merged commit 0b65bcf into main Aug 25, 2020
@dhavalshreyas dhavalshreyas deleted the dhaval/workflowAssertActionFix branch August 25, 2020 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants