diff options
Diffstat (limited to 'internal/handlers')
| -rw-r--r-- | internal/handlers/handlers_test.go | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/internal/handlers/handlers_test.go b/internal/handlers/handlers_test.go index 89f4d73..be5607f 100644 --- a/internal/handlers/handlers_test.go +++ b/internal/handlers/handlers_test.go @@ -53,7 +53,7 @@ func TestQuestionFlow(t *testing.T) {  	if err != nil {  		assert.FailNow("Failed to get question text", err)  	} -	assert.Contains(questionText, "Zweifel", "Question text should contain 'Zweifel'") +	assert.Contains(questionText, "___ hast du heute Zeit?", "Question text should contain the actual question text from DB")  	// Set longer timeout for CI environment  	page.SetDefaultTimeout(5000) @@ -69,20 +69,20 @@ func TestQuestionFlow(t *testing.T) {  		assert.True(visible, "Option %d not visible", i)  	} -	// Test correct answer (option2 is correct per test data) -	err = page.Locator("[data-testid='option2']").Click() +	// Test correct answer (option3 is correct per DB data) +	err = page.Locator("[data-testid='option3']").Click()  	assert.NoError(err)  	// Wait for feedback to update and verify -	err = page.Locator("[data-testid='feedback']:has-text('Correct')").WaitFor() +	err = page.Locator("[data-testid='feedback']:has-text('zu welchem Zeitpunkt')").WaitFor()  	assert.NoError(err, "Correct answer feedback not shown")  	// Test wrong answer  	err = page.Locator("[data-testid='option1']").Click()  	assert.NoError(err) -	// Wait for feedback to update and verify -	err = page.Locator("[data-testid='feedback']:has-text('Wrong')").WaitFor() +	// Wait for feedback to update and verify - using actual explanation from DB +	err = page.Locator("[data-testid='feedback']:has-text('Wann: zu welchem Zeitpunkt')").WaitFor()  	assert.NoError(err, "Wrong answer feedback not shown")  } | 
