Potential bug in GUI, Unit Tests

Thursday, 23 March 2023 · 4 messages · last reply 1 Apr 2023
ZD
Zimmel, Daniel23 Mar 2023 11:22 #
Hi, while I am trying to find my way around the Unit Module, I noticed the following unexpected behavior. 0. Using the test example from https://docs.basex.org/wiki/Unit_Module#Query in the GUI 1. changes that are not saved to disk do not get respected - as opposed to other queries 2. pressing the default button for running queries executes the most recent query which is open in another tab While 1 might not be a bug , 2 feels like one (a query fires that is not displayed on the current tab) BaseX 10.3 Bye, Daniel
CG
Christian Grün30 Mar 2023 18:40 #
Sorry, Daniel, I overlooked your questions:
Quoted text · Zimmel, Daniel · 1 line
> 1. changes that are not saved to disk do not get respected - as opposed to other queries
True, this feels confusing. Maybe it would be better to disable the test icon if the current file has not been saved? If you prefer to, you can enable the option »Save before executing files« in the Preferences Dialog. This way, opened files will automatically be saved before a query is run.
Quoted text · Zimmel, Daniel · 1 line
> 2. pressing the default button for running queries executes the most recent query which is open in another tab
This is actually meant to be a feature: If lots of library modules are opened in the editor, it can save a lot of time if you can execute the main module that has been executed most recently. Best, Christian
ZD
Zimmel, Daniel31 Mar 2023 09:30 #
Quoted text · Christian Grün · 3 lines
>> 1. changes that are not saved to disk do not get respected - as >> opposed to other queries > True, this feels confusing. Maybe it would be better to disable the test icon if the current file has not been saved?
Yes that would be less confusing (to me).
Quoted text · Christian Grün · 1 line
> If you prefer to, you can enable the option »Save before executing files« in the Preferences Dialog. This way, opened files will automatically be saved before a query is run.
Thanks, I did not know that.
Quoted text · Christian Grün · 3 lines
> 2. pressing the default button for running queries executes the most > recent query which is open in another tab > This is actually meant to be a feature: If lots of library modules are opened in the editor, it can save a lot of time if you can execute the main module that has been executed most recently.
Ah - I can see the value - I always thought there is no other context for the play button than the current tab. Thanks, Daniel
CG
Christian Grün1 Apr 2023 17:34 #
Quoted text · Zimmel, Daniel · 2 lines
>> True, this feels confusing. Maybe it would be better to disable the test icon if the current file has not been saved? > Yes that would be less confusing (to me).
+1 Added in the latest snapshot. Thanks.

⚡Generated with XQuery