In this last part of the classification feature, we add the completion logic, fix a few issues and add all missing tests.
Type of change
[X] New feature (non-breaking change which adds functionality)
Related tickets
Fixes #10
Changes
Implemented data set completion logic and UI
Sort data sets by completion
Implemented classification sorting logic
Data that has been once but not 3 times should be displayed first
Data that has been categorized three times should not be presented again
The same categorizer should not be able to categorize the same item twice
The user that made the categorization should be captured
Turned the confidence rating into an enum
Ensure the "Unable to map" card is shown when the search endpoint does not return anything
Adjusted the design so that the classification flow remains usable on smaller screen sizes
Fixed an issue where the code for the incident types were hardcoded and used as the name. Code is now at the bottom of the card, description is used as the name and "Notes" are used to explain the incident type.
Tests added for:
[x] Models
[x] Data set call_type_field and completion method
[x] Field#pick_value_to_classify_for
[x] unique value <> classification link
[x] data set completion update after classification save
[x] Test all unique value scopes
[x] Services
[x] completion service
[x] Controllers
[x] classifications control#call_types (sorting of data sets)
[x] call_types_controller (index & create)
[x] common incident types controller (search)
[x] features specs
[x] classification flow (unknown, back, proceed)
[x] data set completion details being displayed properly
Notes
There seem to be an issue with running RSpec with Selenium (for JS) in GH (they work locally). I'll be investigating it.
This has now been fixed by switching to selenium_chrome_headless. It also revealed an issue with double classification submission.
Overview
In this last part of the classification feature, we add the completion logic, fix a few issues and add all missing tests.
Type of change
Related tickets
Fixes #10
Changes
Tests added for:
Notes
There seem to be an issue with running RSpec with Selenium (for JS) in GH (they work locally). I'll be investigating it.
This has now been fixed by switching to
selenium_chrome_headless
. It also revealed an issue with double classification submission.