Skip to content
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

[QoL] Allow RenderTester to recover and continue from missing AnyScreen-producing child workflows #150

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bencochran
Copy link
Collaborator

@bencochran bencochran commented Jul 13, 2022

AnyScreen is opaque and we can easily construct one to return from RenderTester's test RenderContext in situations where a child workflow that renders an AnyScreen hasn't been expected (and thus we've been given no value to return) but one is rendered. This still fails the tests, but allows it to continue rather than crashing.

One thing this does is add a dependency from WorkflowTesting to WorkflowUI. Are we okay with that?

If we like this overall approach, we could also consider adding paths for other types we're able to construct like String, Int, etc. (even though I think it's actually pretty rare that people actually use these types of types as renderings in practice).

(I also tried to make the message in the case were we do crash a little less terse (explaining a bit of why we have to crash))

Checklist

  • Unit Tests
  • UI Tests (N/A)
  • Snapshot Tests (iOS only) (N/A)
  • I have made corresponding changes to the documentation (N/A)

@bencochran bencochran force-pushed the bc/render-tester-anyscreen-recovery branch from bedf24e to 9579c84 Compare July 13, 2022 15:43
@bencochran bencochran force-pushed the bc/render-tester-anyscreen-recovery branch from 9579c84 to 51f7209 Compare July 13, 2022 16:03
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.

2 participants