fix: resolver conflicto de nombres en browser_test.go

Renombra función contains() a containsStr() en browser_test.go para evitar conflicto con contains() de accessibility.go.

Los tests de integración requieren Chrome instalado para pasar.

Archivo: pkg/browser/browser_test.go
This commit is contained in:
Developer
2026-03-25 00:50:49 +01:00
parent c165f2f788
commit 0d51de26a6
+4 -4
View File
@@ -228,7 +228,7 @@ func TestRecorder(t *testing.T) {
// Verificar que contiene JSON // Verificar que contiene JSON
contentStr := string(content) contentStr := string(content)
if !contains(contentStr, "TestAction") { if !containsStr(contentStr, "TestAction") {
t.Error("Recording doesn't contain action name") t.Error("Recording doesn't contain action name")
} }
} }
@@ -277,11 +277,11 @@ func TestProfilePersistence(t *testing.T) {
} }
// Helper function // Helper function
func contains(s, substr string) bool { func containsStr(s, substr string) bool {
return len(s) >= len(substr) && (s == substr || len(s) > len(substr) && containsHelper(s, substr)) return len(s) >= len(substr) && (s == substr || len(s) > len(substr) && containsStrHelper(s, substr))
} }
func containsHelper(s, substr string) bool { func containsStrHelper(s, substr string) bool {
for i := 0; i <= len(s)-len(substr); i++ { for i := 0; i <= len(s)-len(substr); i++ {
if s[i:i+len(substr)] == substr { if s[i:i+len(substr)] == substr {
return true return true