Documentation
¶
Overview ¶
Package runtime defines the user-facing contract shared by every E2E runtime adapter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsUnsupported ¶
IsUnsupported reports whether err requests a SKIP result.
func SkipReason ¶
SkipReason returns the human-readable reason from a skip error.
func Unsupported ¶
Unsupported returns a skip error for an unavailable runtime control.
Types ¶
type Event ¶
type Event string
Event names a readiness transition owned by the runtime under test.
const ( // EventAppReady waits for the application document to render. EventAppReady Event = "app-ready" // EventDriveReady waits for the Drive shell to finish its intro path. EventDriveReady Event = "drive-ready" // EventDriveSettled waits for Drive loading diagnostics to become idle. EventDriveSettled Event = "drive-settled" // EventContentReady waits for an opened content view to render. EventContentReady Event = "content-ready" // EventSpaceListConverged waits for a session-level Space list readback. EventSpaceListConverged Event = "space-list-converged" )
type Runtime ¶
type Runtime interface {
// Name returns the runtime identifier used in reports.
Name() string
// ResetSession applies a declared state boundary before a scenario runs.
ResetSession(requirement SessionRequirement) error
// OpenRoute opens an application route without rebooting warm runtimes.
OpenRoute(route string) error
// ClickControl activates a named or selector-backed control.
ClickControl(control string) error
// DoubleClickContent opens visible content by name.
DoubleClickContent(content string) error
// Type enters a value into a named or selector-backed field.
Type(field string, value string) error
// UploadFile supplies an in-memory file to the runtime upload control.
UploadFile(target string, file File) error
// MoveContent moves one visible content row into another.
MoveContent(source string, target string) error
// DeleteSpace deletes the currently open Space and waits for completion.
DeleteSpace() error
// ExpectVisible waits until visible content appears.
ExpectVisible(content string) error
// ExpectAbsent waits until visible content disappears.
ExpectAbsent(content string) error
// ExpectRoute verifies the current route contains the expected path.
ExpectRoute(route string) error
// WaitForEvent waits for a named runtime readiness transition.
WaitForEvent(event Event) error
// OpenSecondTab opens another browser tab at a route in the same install.
OpenSecondTab(route string) (Tab, error)
// BackgroundTab moves a tab out of foreground focus when supported.
BackgroundTab(tab Tab) error
// ReloadPage reloads the active page without replacing the browser install.
ReloadPage() error
// RestartWorkerHost restarts the runtime worker host when supported.
RestartWorkerHost() error
}
Runtime is the scenario-facing API implemented by browser adapters.
type SessionRequirement ¶
type SessionRequirement string
SessionRequirement controls the state boundary before a scenario runs.
const ( // SessionAny reuses the current warm session state. SessionAny SessionRequirement = "" // SessionFresh creates a fresh page in the current browser install. SessionFresh SessionRequirement = "fresh-session" // SessionFreshInstall creates a fresh browser install and page. SessionFreshInstall SessionRequirement = "fresh-install" )
func (SessionRequirement) Valid ¶
func (r SessionRequirement) Valid() bool
Valid reports whether the requirement is one of the supported boundaries.
Click to show internal directories.
Click to hide internal directories.