diff options
Diffstat (limited to 'internal/handlers/handlers_test.go')
| -rw-r--r-- | internal/handlers/handlers_test.go | 15 | 
1 files changed, 9 insertions, 6 deletions
| diff --git a/internal/handlers/handlers_test.go b/internal/handlers/handlers_test.go index d177239..a74be30 100644 --- a/internal/handlers/handlers_test.go +++ b/internal/handlers/handlers_test.go @@ -35,15 +35,18 @@ func TestQuestionFlow(t *testing.T) {  	})  	assert.NoError(err, "Failed to load page") -	// Wait for question to appear -	err = page.Locator(".question-text").WaitFor(playwright.LocatorWaitForOptions{ +	// Wait for main content to load +	err = page.Locator("body").WaitFor(playwright.LocatorWaitForOptions{  		State:   playwright.WaitForSelectorStateVisible, -		Timeout: playwright.Float(1000), +		Timeout: playwright.Float(2000),  	}) -	assert.NoError(err, "Question text did not appear") +	assert.NoError(err, "Page content did not load") -	questionText, err := page.Locator(".question-text").TextContent() -	assert.NoError(err, "Failed to get question text") +	// Verify question text exists +	questionText, err := page.Locator("[data-testid='question']").TextContent() +	if err != nil { +		assert.FailNow("Question text not found", err) +	}  	assert.Contains(questionText, "Zweifel", "Question text mismatch")  	// Set reasonable timeout for light site | 
