Improved parsing attributes in tests #808
Merged
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.
What has been done to verify that this works as intended?
I've run automated tests.
Why is this the best possible solution? Were any other approaches considered?
Currently, in
XFormsElement
, we have two different implementations ofselect1Dynamic
: https://github.com/getodk/javarosa/blob/3d3efac4dded7f0bee706d4b740b052a0732c4f1/src/main/java/org/javarosa/test/XFormsElement.java#L150C26-L150C40.In the past, one implementation relied on the other, but this has recently changed in:
grzesiek2010@3e9c225
I experimented with some tests and tried using the second implementation, which allows me to provide
valueRef
andlabelRef
, but I couldn't make it work due to the same issue that led to changes in the first method (it was buggy). I could have reworked it and called the new code in both cases (the new one), but it seems to me that the changes weren't necessary here. We can still rely on the old (more consistent) approach, as long as the parsing of attributes is fixed. That's what I did.How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
This does not require testing.
Do we need any specific form for testing your changes? If so, please attach one.
No.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No.