A bug was recently found in the spectrum viewer where tof_mode was not set correctly on initialisation when opening with a new dataset which included a spectra file (SEE PR: #2212) Tests did not fail meaning this bug was only found by chance during usage.
We should add some more tests surrounding swapping sample stacks and unit modes where the sample being switched too and from may or may not have a spectra log file loaded.
Example tests we should add:
[x] Switching stack with and without data behave correctly
[x] Opening spectrum viewer first time without spectra data
[x] Opening spectrum viewer with spectra data
[x] Switching from a stack with a spectra file to a stack without a spectra file
[x] Switching from a stack without a spectra file to a stack with a spectra file
[x] Switching form a stack without a spectra file to another stack without a spectra file
[x] Switching from a stack with a spectra file to another stack with a spectra file for each ToF mode, ensuring mode stays the same when switching stacks.
[ ] ToF mode should never be None. if None, an error should be returned
Current Behaviour
There are no tests to check swapping between samples and/or unit modes.
Desired Behaviour
A bug was recently found in the spectrum viewer where tof_mode was not set correctly on initialisation when opening with a new dataset which included a spectra file (SEE PR: #2212) Tests did not fail meaning this bug was only found by chance during usage.
We should add some more tests surrounding swapping sample stacks and unit modes where the sample being switched too and from may or may not have a spectra log file loaded.
Example tests we should add:
Current Behaviour
There are no tests to check swapping between samples and/or unit modes.