Documentation
¶
Overview ¶
Package electron provides an opt-in Electron E2E harness backed by the existing Bldr desktop runtime.
Index ¶
- func E2EElectronEnabled() bool
- type Harness
- func (h *Harness) AppPages() []playwright.Page
- func (h *Harness) CDPEndpoint() string
- func (h *Harness) CLISocketPath() string
- func (h *Harness) ConnectDriver() error
- func (h *Harness) Relaunch(ctx context.Context) error
- func (h *Harness) Release()
- func (h *Harness) RepoRoot() string
- func (h *Harness) StateRoot() string
- func (h *Harness) WaitForAppPages(ctx context.Context, count int) ([]playwright.Page, error)
- func (h *Harness) WaitForNoAppPages(ctx context.Context) error
- func (h *Harness) WaitForPage(ctx context.Context) (playwright.Page, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func E2EElectronEnabled ¶
func E2EElectronEnabled() bool
E2EElectronEnabled reports whether the heavy Electron e2e suite should run.
Types ¶
type Harness ¶
type Harness struct {
// contains filtered or unexported fields
}
Harness owns a Bldr desktop runtime plus a Playwright CDP attachment to the Electron renderer.
func Boot ¶
Boot starts Bldr's current desktop runtime and waits until Electron exposes its debug-only CDP endpoint.
func (*Harness) AppPages ¶
func (h *Harness) AppPages() []playwright.Page
AppPages returns the renderer pages visible through the CDP driver.
func (*Harness) CDPEndpoint ¶
CDPEndpoint returns the local Electron CDP HTTP endpoint.
func (*Harness) CLISocketPath ¶
CLISocketPath returns the dev-mode Spacewave daemon socket path.
func (*Harness) ConnectDriver ¶
ConnectDriver attaches Playwright to Electron through the Chrome DevTools Protocol endpoint exposed by the Electron main process.
func (*Harness) Relaunch ¶
Relaunch terminates the current Electron runtime, starts it again with the same state root, and reconnects the Playwright CDP driver.
func (*Harness) Release ¶
func (h *Harness) Release()
Release stops Playwright, cancels the Bldr desktop runtime, and restores env.
func (*Harness) WaitForAppPages ¶
WaitForAppPages waits until at least count renderer pages are visible.
func (*Harness) WaitForNoAppPages ¶
WaitForNoAppPages waits until no app renderer pages are visible.
func (*Harness) WaitForPage ¶
WaitForPage waits until a renderer page is visible through the CDP driver.