Commit 5f5725c5 authored by Hannah Parraga's avatar Hannah Parraga
Browse files

added coverage

parent 3e23e937
# Data Management Station UI Test Guide
## Running the Test Suite
Be sure the services are running. Services live in
`data-management/etc/init.d`
To run the gui:
```
......@@ -16,23 +20,27 @@ python dmStationUiTest.py
```
## Coverage
TODO
To run with coverage:
```
python -m coverage run dmStationUiTest.py
python -m coverage report
python -m coverage html #detailed html reports
```
Last run coverage: 48%
## Test Scenarios
### Experiment tab
- [ ] clicking `add experiment` button switches to `ESAF list` tab if ESAF list
- [ ] clicking `add experiment` button switches to `experiment settings` tab if no ESAF list
- [ ] clicking `use selected` button switches to `experiment settings` tab with experiment info filled in
- [ ] cliciking `delete experiment` button removes experiment
- [ ] Delete experiment had a pop up which says number of associated files. Need to make sure that number is correct
- [ ] Make sure the files are actually removed on clicking `yes` button
- [ ] Make sure experiment is removed on ‘yes’
- [ ] Make sure files aren’t remove on ‘no’
- [ ] Make sure experiment isn’t removed on ‘no’
- [ ] clicking `refresh` button, actually refreshes
- [ ] `use selected` and `delete experiment` buttons disabled when no experiment selected
- [ ] clicking experiment changes row color to blue
- [ ] double clicking experiment opens `experiment settings` tab
- [X] table contains all experiments
- [X] clicking `add experiment` button switches to `ESAF list` tab if ESAF list
- [X] clicking `add experiment` button switches to `experiment settings` tab if no ESAF list
- [X] clicking `use selected` button switches to `experiment settings` tab with experiment info filled in
- [ ] clicking `delete experiment` button opens `delete experiment` modal
- [X] clicking `refresh` button, actually refreshes
- [X] `use selected` and `delete experiment` buttons disabled when no experiment selected
- [ ] clicking experiment changes row color to blue and enables `use selected` and `delete experiment` buttons
- [X] double clicking experiment opens `experiment settings` tab
### ESAF List tab
- [ ] shows list of ESAFs
......@@ -54,6 +62,8 @@ TODO
- [ ] able to set date by typing or clicking calendar
- [ ] clicking calendar button opens calendar
- [ ] clicking date on calendar closes calendar
- [ ] choosing an end date which is before the start date opens error pop up and sets end date equal to start date
- [ ] choosing a start date which is after the end date opens error pop up and sets start date equal to end date
- [ ] `type` is populated with experiment types and able to select from drop down
- [ ] default experiment type is correct
- [ ] clicking `save` button will save experiment
......@@ -69,6 +79,8 @@ TODO
- [ ] clicking `start upload` button creates, runs new upload with values set in upload params modal and additional params and switch to `uploads list` tab
- [ ] daq wrench opens daq parameter pop up
- [ ] upload wrench opens upload params
- [ ] users list is by default populated with the station managers
- [ ] modifying the storage root path and clicking the `save` button moves the already collected data to the new path and removes it from the old location
### DAQs tab
- [ ] clicking a row changes color to blue
......@@ -76,12 +88,13 @@ TODO
- [ ] double clicking row opens upload details tab
- [ ] clicking `start new` button opens the `experiments list` tab
- [ ] clicking `show details` button opens the `daq details` tab
- [ ] clciking `clear selected` button removes selected daq from list. Is it deleted?
- [ ] clicking `clear selected` button removes selected daq from list. Is it deleted?
- [ ] `Stop selected`, `clear selected`, `show details` buttons disabled if nothing selected
- [ ] `Stop selected` button is disabled if selected daq is not running
- [ ] `Clear selected` button is disabled if selected daq is running
- [ ] clicking `refresh` button actually refreshes
- [ ] Uploads go to uploads tab, daqs go to daq tab and not the other way
- [ ] daqs do not end unless the `stop selected` button is clicked or they reach the maximum run time set in the daq params
### Uploads tab
- [ ] clicking a row changes color to blue
......@@ -142,7 +155,6 @@ TODO
- [ ] clicking `save` button changes the interval
- [ ] interval of 0 means no refresh
- [ ] hovering over input box opens tooltip
- [ ] moving mouse away closes tooltip
- [ ] inputs outside of range 0-1000 cannot be entered, and only numbers
- [ ] saving an empty input resets its value to 60
......@@ -164,16 +176,17 @@ TODO
- [ ] compression changes only apply to files shown after being filetered by search
- [ ] compressing/decompressing a file which is already compressed/decompressed is a noop
- [ ] hovering over compression buttons opens tooltip
- [ ] moving mouse off button closes tooltip
- [ ] clicking `back button` removes compression buttons/checkboxes returning to regular `file list` tab
- [ ] clicking `show details` button opens `file details` tab for selected file
- [ ] `go to` button ?? doing it wrong opens bin not found error pop up
### File Details tab
- [ ] shows details for selected file
- [ ] if there are no files, stats show empty value '-' or 0
- [ ] clicking `back` button opens `file list` tab
### Modify Users tab
- [ ] by default, beamline managers are added to user list
- [ ] clicking `back` button opens `experiment settings` tab
- [ ] clicking a user changes row color to blue
- [ ] clicking `<->` button moves selected users to the other list (swap if one selected in both lists)
......@@ -183,15 +196,15 @@ TODO
- [ ] clicking `reset` button with a new experiment is a noop
- [ ] clicking `save` button opens `experiment settings` tab with updated users list
- [ ] show proposals, users list, and year select hidden if no ESAFs
- [ ] clicking `show proposals` button switches list to proposals
- [ ] clicking `show proposals` button switches list to proposals and changes `year` select to `run` select
- [ ] selecting esaf/proposal from select box populates list with users from that esaf/proposal
- [ ] default value for esaf/proposal select box is 'all users'
- [ ] selecting year from year select box changes options in esaf/proposal select box to those from that year, sets selection to default 'all users' and resets user list
### System Parameters for DAQ modal
- [ ] `process hidden files` has true/false options, false default
- [ ] `process existing` has true/false options, false default
- [ ] hovering over each input field opens a tooltip
- [ ] moving mouse away from input field closes tooltip
- [ ] `max runtime` in hours can be set with arrows or typing, numeric only
- [ ] `max runtime` has max value of 10000
- [ ] clicking `browse` button opens file system view and sets destination directory
......@@ -202,7 +215,6 @@ TODO
- [ ] `reprocess files` has true/false options, false default
- [ ] processing modes are 'file' or 'directory'
- [ ] hovering over each input field opens a tooltip
- [ ] moving mouse away from input field closes tooltip
- [ ] clicking `done` button closes the modal with upload params saved
### File Collection Stats modal
......@@ -225,11 +237,30 @@ TODO
- [ ] clicking `yes` button saves experiment changes and closes modal
- [ ] clicking `no` button does not save experiment change and closes modal
### Delete Experiment modal
- [ ] says correct number of associated files
- [ ] files are actually removed on clicking `yes` button
- [ ] experiment is removed on ‘yes’
- [ ] files aren’t remove on ‘no’
- [ ] experiment isn’t removed on ‘no’
### DM Unexpected Error modal
- [ ] clicking `show details` button shows the error message
- [ ] clicking `quit` button exits the gui
- [ ] clicking `notify admin` button sends error report to dm-admin email (probably only test manually)
### Integrations
UI robust to connection failures with:
- [ ] UserDsApi
- [ ] EsafApsDbApi
- [ ] ExperimentDsApi
- [ ] FileDsApi
- [ ] ExperimentDaqApi
- [ ] BssApsDbApi
- [ ] ApsUserDbApi
- [ ] FileCatApi
- [ ] WorkflowProcApi
## Issues
- start daq warning pop up gives a whole list of potential problems but it could instead tell you which depending on the error/check that failed
- file collection stats button shows error pop up if not saved, view files is hidden if not saved (inconsistent)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment