oficina / equipo Public

Browser tests: the chooser offers TensorX, two greyed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 789cb8d26f082fa45693deb96257134111d4195c parent 45aed97
2 files changed, +4 −4
  • internal/headless/browser_conn_add_test.go +2 −2
  • internal/headless/browser_connections_test.go +2 −2

CI failed — run details

diff --git a/internal/headless/browser_conn_add_test.go b/internal/headless/browser_conn_add_test.go
index 12b7493b..07e85357 100644
--- a/internal/headless/browser_conn_add_test.go
+++ b/internal/headless/browser_conn_add_test.go
@@ -37,8 +37,8 @@ func TestBrowserConnectionsAddPage(t *testing.T) {
p.check(`(()=>{window.__equipoStayed=true;sessionStorage.removeItem('success');new MutationObserver(()=>{if(document.querySelector('[data-success]'))sessionStorage.setItem('success','1')}).observe(document.body,{childList:true,subtree:true});return true})()`, "mark")
// The page: its heading, the chooser with Claude and Codex
- // live and three greyed, in Settings with Connections current.
- p.check(`(()=>{const c=document.querySelector('[equipo-conn-chooser]');return document.querySelector('[equipo-settings-body] h1').textContent==='Add a connection' && c.checkVisibility() && !document.querySelector('[data-add="codex"]').disabled && !document.querySelector('[data-add="claude"]').disabled && c.querySelectorAll('[equipo-conn-opt][disabled]').length===3 && document.querySelector('[equipo-settings-link][aria-current="page"]').dataset.settingsLink==='connections' && document.documentElement.scrollWidth<=innerWidth+1})()`, "the Add page is not the chooser in Settings")
+ // live, TensorX, and two greyed, in Settings with Connections current.
+ p.check(`(()=>{const c=document.querySelector('[equipo-conn-chooser]');return document.querySelector('[equipo-settings-body] h1').textContent==='Add a connection' && c.checkVisibility() && !document.querySelector('[data-add="codex"]').disabled && !document.querySelector('[data-add="claude"]').disabled && c.querySelectorAll('[equipo-conn-opt][disabled]').length===2 && !!c.querySelector('[data-add-metered="tensorx"]') && document.querySelector('[equipo-settings-link][aria-current="page"]').dataset.settingsLink==='connections' && document.documentElement.scrollWidth<=innerWidth+1})()`, "the Add page is not the chooser in Settings")
if width < 600 {
p.check(`(()=>{const back=document.querySelector('[rst-shell-back] a');return back.checkVisibility() && back.getAttribute('href')==='/conversation/settings/connections' && back.textContent.trim()==='Connections' && !document.querySelector('[equipo-settings-nav]').checkVisibility()})()`, "390: no way back to Connections in the bar")
} else {
diff --git a/internal/headless/browser_connections_test.go b/internal/headless/browser_connections_test.go
index d1cf65b0..2f17a049 100644
--- a/internal/headless/browser_connections_test.go
+++ b/internal/headless/browser_connections_test.go
@@ -92,8 +92,8 @@ func TestBrowserConnectionsAdd(t *testing.T) {
p.run(chromedp.Navigate(inst.URL+"/conversation/settings/connections/add"), browsertest.Wait(`!!document.querySelector('[data-connections]')`))
p.check(`(()=>{window.__equipoStayed=true;return true})()`, "mark")
p.check(`!document.querySelector('meta[http-equiv="refresh"]')`, "the page refreshes itself")
- // The chooser: Claude and Codex live, three more greyed.
- p.check(`(()=>{const c=document.querySelector('[equipo-conn-chooser]');return !!c && c.checkVisibility() && !document.querySelector('[data-add="codex"]').disabled && !document.querySelector('[data-add="claude"]').disabled && c.querySelectorAll('[equipo-conn-opt][disabled]').length===3})()`, "the chooser is not Claude and Codex with three greyed")
+ // The chooser: Claude, Codex and TensorX live, two more greyed.
+ p.check(`(()=>{const c=document.querySelector('[equipo-conn-chooser]');return !!c && c.checkVisibility() && !document.querySelector('[data-add="codex"]').disabled && !document.querySelector('[data-add="claude"]').disabled && c.querySelectorAll('[equipo-conn-opt][disabled]').length===2 && !!c.querySelector('[data-add-metered="tensorx"]')})()`, "the chooser is not Claude, Codex and TensorX with two greyed")
p.check(`(()=>{document.querySelector('[data-add="codex"]').click();return !!document.querySelector('[data-connecting][data-provider="codex"]')})()`, "no card the instant Codex is chosen")
p.run(browsertest.Wait(`!!document.querySelector('[data-device-code]')`))
p.check(`(()=>{const card=document.querySelector('[data-connecting][data-provider="codex"]');const code=card.querySelector('[data-code]').textContent;const open=card.querySelector('[data-open-provider]');return /^FAKE-/.test(code) && card.textContent.split(code).length===2 && open.getAttribute('href')==='https://auth.openai.com/codex/device' && open.target==='_blank' && !card.textContent.includes('auth.openai.com') && card.querySelectorAll('ol > li').length===3 && card.querySelector('h3').textContent==='Connect Codex'})()`, "the device code card is not the three steps with the code once")