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:
@@ -228,7 +228,7 @@ func TestRecorder(t *testing.T) {
|
||||
|
||||
// Verificar que contiene JSON
|
||||
contentStr := string(content)
|
||||
if !contains(contentStr, "TestAction") {
|
||||
if !containsStr(contentStr, "TestAction") {
|
||||
t.Error("Recording doesn't contain action name")
|
||||
}
|
||||
}
|
||||
@@ -277,11 +277,11 @@ func TestProfilePersistence(t *testing.T) {
|
||||
}
|
||||
|
||||
// Helper function
|
||||
func contains(s, substr string) bool {
|
||||
return len(s) >= len(substr) && (s == substr || len(s) > len(substr) && containsHelper(s, substr))
|
||||
func containsStr(s, substr string) bool {
|
||||
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++ {
|
||||
if s[i:i+len(substr)] == substr {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user