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

#597 json multiline: added a test for multiline json values #702

Merged
merged 9 commits into from
Aug 2, 2023

Conversation

jostran14
Copy link
Collaborator

specifically for variables set by code not through user input.
closes #597

Copy link
Collaborator

@BryceStevenWilley BryceStevenWilley left a comment

Choose a reason for hiding this comment

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

A good PR! The few suggestions that I'd recommend before merging are in comments

CHANGELOG.md Outdated Show resolved Hide resolved
@@ -99,23 +99,26 @@ Scenario: Test "Then I don’t continue" with an apostrophe
And I will be told an answer is invalid

@fast @o9 @table @json
Scenario: I can match JSON page var to str
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure why this scenario was removed, it should likely still be around?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@plocket and I considered these 2 tests equivalent. The purpose of this test is to make sure ALKiln can match a variable in the json to a value that the test author expects. We concluded that it shouldn't matter how that json variable is set. The previous version of this test used a variable set by filling in a field. The current version uses a variable set by python. We couldn't think of a reason that those 2 methods are testing anything different, and we didn't want duplicate tests. Do you still think we should restore the previous test?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Eh, yeah, I'd lean towards leaving it. I looked around, and surprisingly, there aren't any tests that seem to actually verify the value of a selection made by the user; we just say to input it and continue on. You're right that it's redundant for testing our JSON stuff, but we also need to test docassemble itself, which that test does.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We can add it back in, but if we're going to test selections, etc, I think that test belongs in its own set of tests and not buried in a JSON Step test. Again, we can still add this back in here for the moment and just make an issue to move it later and add further tests, it just doesn't seem like this is the appropriate place for it. I'm not sure what you mean by testing docassemble itself and would love to talk more about that if we get a chance. I those tests, too, would belong in a different set of tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@plocket
Copy link
Collaborator

plocket commented Jul 6, 2023

Just need to make the issue 👍

Copy link
Collaborator

@plocket plocket left a comment

Choose a reason for hiding this comment

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

Looks great! As soon as the tests pass, this can be merged!

@jostran14 jostran14 merged commit f8ee175 into v5 Aug 2, 2023
2 checks passed
@jostran14 jostran14 deleted the 597_json_multiline branch August 2, 2023 23:33
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.

Test the JSON variable text value Step with multi-line text
3 participants