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

Improved parsing attributes in tests #808

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Nov 29, 2024

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 of select1Dynamic: 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 and labelRef, 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.

@grzesiek2010 grzesiek2010 marked this pull request as ready for review November 29, 2024 22:16
@grzesiek2010 grzesiek2010 requested a review from seadowg December 3, 2024 01:06
@seadowg seadowg merged commit 96440da into getodk:master Dec 3, 2024
3 checks passed
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