Add an automated test that will catch if a new question type doesn't use read-only status
lognaturel opened this issue · comments
This should probably be broadened: have a way to validate that basic functionality like read-only, validation messages, etc, work for all question types
Currently the engine updates read-only status of a field based on the bound read-only expression and the Vue frontend reacts to that. The engine prevents writing to read-only fields which is different from JavaRosa and feels more correct. A well-behaved frontend should not allow those writes anyway so there shouldn't be a user-facing difference.
Each question type defined in the frontend must use the read-only information given by the engine. At the very least, we should have a question type checklist that includes verifying that read-only is implemented. Ideally, we would have some automated way to verify it. For example, maybe there's a test that runs against each question type to verify that its control is disabled. If the question type has special behavior to implement read-only, that test can be overwritten.