Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[MBL-1814] PLOT plan selector component #2195
[MBL-1814] PLOT plan selector component #2195
Changes from 8 commits
fe44ad0
62e2ae0
b973413
c207ab4
1d3a34c
f6aa2e7
bfb8657
318a39d
27a3345
152587c
1343f23
4ca06c3
bfeb43f
28ddf83
5225a76
16830c7
fc6ac56
949dc63
1030358
3d22914
54a8669
1259d5f
a01864e
54109ce
a197ee6
64e6789
44073f0
56c0173
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
nit: delete this extra newline
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.
use
orthogonalCombos
instead ofcombos
here - this limits the number of superfluous snapshots we have to maintain (delete the snapshots and then rerun the tests to make sure that you're only adding snapshots we're testing). Alternatively, get rid of thecombos
entirely and just test this in english for now - it's not like the other languages are translated yet anyways, so we're just adding a bunch of copies of the same snapshot.The goal of snapshot tests is to comprehensively test with as few screenshots as possible. If "pledge in full" stays so simple, I'd recommend just having one or two snapshots where it's selected (all in english), and just doing
orthogonalCombos
for the "pledge over time" case.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.
Updated to use
orthogonalCombos
and limited the languages to[Language.en]
as suggested.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.
Looks like the stack view does not look as good in the snapshot tests as the table view did (I assume that's because the view is conforming to the size we give it, which for stack view means extra space). I'm not sure if there's a good way to fix this, however, other than manually setting the snapshot height to something that makes more sense for the view. @scottkicks , do you have any good ideas for this? I'm also okay with leaving it for now - feel free to file a tech debt ticket and assign it to me and I can look into snapshot options.
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 think this test does a pretty good job of demonstrating why we don't need a data source here at all, since it's not testing anything useful that we're not also seeing in the snapshot tests. I still think the best option here is to get rid of the tableview entirely and just use a UIStackView. If you do want to keep the test, however, please make it a little less confusing (see further comments).
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.
Agree, code updated to use a UIStackView instead
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.
Nit: since the tableView isn't important to the test itself and only used to test
numberOfSections
, I think it makes more sense to create it on line 15 instead. If not, at least add a comment for why you're creating a random tableView in a data source test; I know I was confused.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.
File removed by refactor