Skip to content

Conversation

watt
Copy link
Collaborator

@watt watt commented Jan 30, 2021

This PR adds a helper method to AnyWorkflowConvertible to ignore outputs.

I'm not sure if this is testable, but happy to add tests if someone has an idea how!

Checklist

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

@CLAassistant
Copy link

CLAassistant commented Jan 30, 2021

CLA assistant check
All committers have signed the CLA.

@dhavalshreyas
Copy link
Contributor

This is great!

We'd also need a counter-part API on the RenderTester side. Like in here.

@watt watt marked this pull request as ready for review March 1, 2021 21:29
/// - key: The key of the expected workflow (if specified).
/// - rendering: The rendering result that should be returned when the workflow of this type is rendered.
/// - assertions: Additional assertions for the given workflow, if any. You may use this to assert the properties of the requested workflow are as expected.
public func expectWorkflowIgnoringOutput<ExpectedWorkflowType: Workflow>(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@dhavalshreyas Is this in line with what you had in mind?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes! This is it :)

/// - key: The key of the expected workflow (if specified).
/// - rendering: The rendering result that should be returned when the workflow of this type is rendered.
/// - assertions: Additional assertions for the given workflow, if any. You may use this to assert the properties of the requested workflow are as expected.
public func expectWorkflowIgnoringOutput<ExpectedWorkflowType: Workflow>(
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes! This is it :)

@dhavalshreyas
Copy link
Contributor

Thanks @watt, :shipit:

@bencochran bencochran merged commit 860a51b into square:main Mar 5, 2021
@watt watt deleted the watt/ignore-output branch March 5, 2021 23:19
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.

4 participants