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

expected output from wf:qs -> [] vs [[]] #15

Open
fnchooft opened this issue Jan 3, 2023 · 2 comments
Open

expected output from wf:qs -> [] vs [[]] #15

fnchooft opened this issue Jan 3, 2023 · 2 comments

Comments

@fnchooft
Copy link

fnchooft commented Jan 3, 2023

Hi, I was running the "make test" target to see if a change I made was passing.

However I found that the test for multidropdownblank was failing.
The function returns [[]] instead of the expected [].

 test_multidropdownblank() ->
     {
         fun() -> wf:set_multiple(multiple, []) end,
-        fun() -> wf:qs(multiple) == [] end
+        fun() -> wf:qs(multiple) == [[]] end
     }.

https://github.com/nitrogen/NitrogenProject.com/blob/master/src/tests/tests_simplecontrols.erl#L75

The question now becomes - what is wf:qs supposed to return if there is no result?

It seems that:

  • if the element with id=multiple is ON screen - and data is selected ( "1","3" ) - it returns ["1","3"]
  • if the element with id=multiple is NOT ON screen - it returns []
  • if the element with id=multiple is ON screen - without any selection - it returns [[]]

Could you confirm my understanding?

Kind regards,

Fabian

@choptastic
Copy link
Member

choptastic commented Jan 5, 2023 via email

@fnchooft
Copy link
Author

fnchooft commented Jan 5, 2023

Hi Jesse, happy new year!
I will check the rebar3-branch.

Follow up question: Is there a timeline for this rebar3-transformation? :)

No hurries - but if so that would be great news!

Especially thinking about dependency mgmt - for instance jquery- jmobile, fileupload etc - maybe there is a way to make it a bit more configurable.

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

No branches or pull requests

2 participants