fix: report ErrSearchTimeout when results never hydrate; raise integration selector timeout to 15s

This commit is contained in:
Rustem Kamalov
2026-06-12 19:06:46 +03:00
parent 04db5347a8
commit 976ceeadf4
8 changed files with 19 additions and 7 deletions

View File

@@ -47,6 +47,13 @@ func HandleError(t *testing.T, operation string, err error) {
t.Skipf("skipping flaky live %s: %v", operation, err)
}
// EngineOptions returns engine options tuned for live-site integration runs.
// Real SERPs (Baidu especially) hydrate result cards client-side and can take
// well past the 5s default selector timeout on a first visit.
func EngineOptions() core.SearchEngineOptions {
return core.SearchEngineOptions{SelectorTimeout: 15}
}
// CreateBrowser creates a browser configured for integration tests and closes
// it when the test finishes. Respects OPENSERP_INTEGRATION_HEADFUL for
// debugging (browser and page are left open for inspection).