Open henriquepaes1 opened 2 weeks ago
I would like to know if would be useful to create tests for the feature's expected behavior (considering the switch for conditional rendering). In case of positive answer, I could use some guidance to write the corresponding tests, since I'm new to Jest and front-end testing in general.
Fixes #13174
Outline of Solution
The solution consists in adding a control variable in the session results screen. That was accomplished by creating a switch in the session-result-page component. The switch's status is then passed to the question-response-panel with the angular Input annotation. This variable is used as a conditional for self responses rendering. The response view now has a switch controlling the self responses, as shown below: ![image](https://github.com/user-attachments/assets/89e04070-af86-405f-83dc-f79cf5cd6f54) When the switch isn't toggled, the student can view their own responses: ![image](https://github.com/user-attachments/assets/cd952ed4-81de-4b87-bb04-89496d4e5867) Once the switch is toggled: ![image](https://github.com/user-attachments/assets/22d3d3ee-eaa5-41f6-9d62-77551fae2fe5) The student can't see their own responses: ![image](https://github.com/user-attachments/assets/c784c244-a047-4d7a-a650-2a33c5f6ccdc)