Documentation ¶
Overview ¶
Package dgapi2 contains helper functions to interact with the DGAPI2 test app. See go/dgapi-v2.0-test-plan for the details
Index ¶
- type FixtDgapiData
- type TestAppDgapi2
- func (ta *TestAppDgapi2) Close(ctx context.Context) error
- func (ta *TestAppDgapi2) InstallApp(ctx context.Context) error
- func (ta *TestAppDgapi2) Launch(ctx context.Context) error
- func (ta *TestAppDgapi2) PurchaseOneTime(ctx context.Context) error
- func (ta *TestAppDgapi2) SignIn(ctx context.Context) error
- func (ta *TestAppDgapi2) SignOut(ctx context.Context) error
- func (ta *TestAppDgapi2) TryConsumeOneTime(ctx context.Context) error
- func (ta *TestAppDgapi2) TryPurchaseOneTimeItemSecondTime(ctx context.Context) error
- func (ta *TestAppDgapi2) VerifyDetailsLogs(ctx context.Context) error
- func (ta *TestAppDgapi2) VerifyLogsMatch(ctx context.Context, pattern string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FixtDgapiData ¶
type FixtDgapiData struct { Chrome *chrome.Chrome TestApp *TestAppDgapi2 }
The FixtDgapiData object is made available to users of this fixture via:
func DoSomething(ctx context.Context, s *testing.State) { d := s.FixtValue().(dgapi2.FixtDgapiData) ... }
type TestAppDgapi2 ¶
type TestAppDgapi2 struct {
// contains filtered or unexported fields
}
TestAppDgapi2 represents the Play Billing test PWA and ARC Payments Overlay.
func NewTestAppDgapi2 ¶
func NewTestAppDgapi2(ctx context.Context, cr *chrome.Chrome, d *ui.Device, tconn *chrome.TestConn, a *arc.ARC) (*TestAppDgapi2, error)
NewTestAppDgapi2 returns a reference to a new DGAPI2 Test App.
func (*TestAppDgapi2) Close ¶
func (ta *TestAppDgapi2) Close(ctx context.Context) error
Close opposite of Launch, closes TestAppDgapi2 window and existing connections.
func (*TestAppDgapi2) InstallApp ¶
func (ta *TestAppDgapi2) InstallApp(ctx context.Context) error
InstallApp installs DGAPI2 test app.
func (*TestAppDgapi2) Launch ¶
func (ta *TestAppDgapi2) Launch(ctx context.Context) error
Launch starts a new TestAppDgapi2 window.
func (*TestAppDgapi2) PurchaseOneTime ¶
func (ta *TestAppDgapi2) PurchaseOneTime(ctx context.Context) error
PurchaseOneTime purchases a onetime item.
func (*TestAppDgapi2) SignIn ¶
func (ta *TestAppDgapi2) SignIn(ctx context.Context) error
SignIn logs into the app.
func (*TestAppDgapi2) SignOut ¶
func (ta *TestAppDgapi2) SignOut(ctx context.Context) error
SignOut signs out of the app.
func (*TestAppDgapi2) TryConsumeOneTime ¶
func (ta *TestAppDgapi2) TryConsumeOneTime(ctx context.Context) error
TryConsumeOneTime consumes a onetime item.
func (*TestAppDgapi2) TryPurchaseOneTimeItemSecondTime ¶
func (ta *TestAppDgapi2) TryPurchaseOneTimeItemSecondTime(ctx context.Context) error
TryPurchaseOneTimeItemSecondTime attempts to purchase a onetime item second time, fail and close the error window.
func (*TestAppDgapi2) VerifyDetailsLogs ¶
func (ta *TestAppDgapi2) VerifyDetailsLogs(ctx context.Context) error
VerifyDetailsLogs verifies logs contain expected getDetails response.
func (*TestAppDgapi2) VerifyLogsMatch ¶
func (ta *TestAppDgapi2) VerifyLogsMatch(ctx context.Context, pattern string) error
VerifyLogsMatch verifies logs contain an entry that matches the passed regex.