browsertest

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package browsertest provides integration test helpers for our browser-based tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginToUpstream

func LoginToUpstream(t *testing.T, page *agouti.Page, upstream testlib.TestOIDCUpstream)

LoginToUpstream expects the page to be redirected to one of several known upstream IDPs. It knows how to enter the test username/password and submit the upstream login form.

func Open

func Open(t *testing.T) *agouti.Page

Open a webdriver-driven browser and returns an *agouti.Page to control it. The browser will be automatically closed at the end of the current test. It is configured for test purposes with the correct HTTP proxy and in a mode that ignore certificate errors.

func WaitForURL

func WaitForURL(t *testing.T, page *agouti.Page, pat *regexp.Regexp)

WaitForURL expects the page to eventually navigate to a URL matching the specified pattern. It waits for this to occur and times out, failing the test, if it never does.

func WaitForVisibleElements

func WaitForVisibleElements(t *testing.T, page *agouti.Page, selectors ...string)

WaitForVisibleElements expects the page to contain all the the elements specified by the selectors. It waits for this to occur and times out, failing the test, if they never appear.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL