summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorGrail Finder (aider) <wohilas@gmail.com>2025-04-05 15:55:42 +0300
committerGrail Finder (aider) <wohilas@gmail.com>2025-04-05 15:55:42 +0300
commite7e0bc7113ffe38273848c79e77b6c90dfaa93f4 (patch)
tree7cd61f7cd139000ca7cdaba66312d458de3ee041 /components
parent5862de4e0cbe43ee273461043a230fa16ac049cc (diff)
test: update question flow test assertions and feedback structure
Diffstat (limited to 'components')
-rw-r--r--components/index.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/components/index.html b/components/index.html
index fb294f5..b51c0e3 100644
--- a/components/index.html
+++ b/components/index.html
@@ -13,7 +13,14 @@
<div class="question-text" data-testid="question">
{{.Text}}
</div>
- <div id="feedback"></div>
+ <div id="feedback" data-testid="feedback" class="{{if .Correct}}correct-feedback{{else}}error-feedback{{end}}">
+ {{if .Correct}}
+ <div class="correct-answer">Correct!</div>
+ {{else}}
+ <div class="wrong-answer">Try Again</div>
+ {{end}}
+ <div class="explanation">{{.Explanation}}</div>
+ </div>
<div id="options">
<button
data-testid="option1"