playbilling

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

Package playbilling contains helper functions to interact with the Play Billing test PWA.

Index

Constants

This section is empty.

Variables

View Source
var DataFiles = append(pwaFiles, playBillingWebApk.ApkDataPath)

DataFiles are the files required for each Play Billing tests.

Functions

func AlreadyOwnErrorClose

func AlreadyOwnErrorClose(uiAutomator *ui.Device) action.Action

AlreadyOwnErrorClose closes "You already own this item" window.

func CheckPaymentSuccessful

func CheckPaymentSuccessful(uiAutomator *ui.Device) action.Action

CheckPaymentSuccessful checks for a presence of payment successful screen in the android ui tree.

func Click1TapBuy

func Click1TapBuy(uiAutomator *ui.Device) action.Action

Click1TapBuy clicks 1-tap buy button.

func ClickButtonOnArcPaymentOverlay

func ClickButtonOnArcPaymentOverlay(uiAutomator *ui.Device, buttonType, objectText string) action.Action

ClickButtonOnArcPaymentOverlay clicks a button and text.

func ClickElementByCDP

func ClickElementByCDP(conn *chrome.Conn, jsExpr string) action.Action

ClickElementByCDP clicks the element defined by jsExpr. A separate function to emulate a click is needed, because there are restrictions, which don't allow invoking billing actions via js interactions.

func RequiredAuthConfirm

func RequiredAuthConfirm(uiAutomator *ui.Device) action.Action

RequiredAuthConfirm clicks "Yes, always" button in required auth window.

func TapPointsDecline

func TapPointsDecline(uiAutomator *ui.Device) action.Action

TapPointsDecline declines tap points proposal, if available.

Types

type FixtData

type FixtData struct {
	TestApp *TestApp
}

The FixtData object is made available to users of this fixture via:

func DoSomething(ctx context.Context, s *testing.State) {
	d := s.FixtValue().(playbilling.FixtData)
	...
}

type TestApp

type TestApp struct {
	// contains filtered or unexported fields
}

TestApp represents the Play Billing test PWA and ARC Payments Overlay.

func NewTestApp

func NewTestApp(ctx context.Context, arc *arc.ARC, d *ui.Device, wm *webapk.Manager) *TestApp

NewTestApp returns a reference to a new Play Billing Test App.

func (*TestApp) BuySku

func (ta *TestApp) BuySku(ctx context.Context) error

BuySku clicks the buy button on a Play Billing overlay.

func (*TestApp) CheckPaymentSuccessful

func (ta *TestApp) CheckPaymentSuccessful(ctx context.Context) error

CheckPaymentSuccessful checks for a presence of payment successful screen in the android ui tree.

func (*TestApp) Launch

func (ta *TestApp) Launch(ctx context.Context) error

Launch starts a new TestApp window.

func (*TestApp) OpenBillingDialog

func (ta *TestApp) OpenBillingDialog(ctx context.Context, sku string) error

OpenBillingDialog clicks a button on the PWA to launch the Play Billing UI.

func (*TestApp) RequiredAuthConfirm

func (ta *TestApp) RequiredAuthConfirm(ctx context.Context) error

RequiredAuthConfirm clicks "Yes, always" button in required auth window.

Directories

Path Synopsis
Package dgapi2 contains helper functions to interact with the DGAPI2 test app.
Package dgapi2 contains helper functions to interact with the DGAPI2 test app.

Jump to

Keyboard shortcuts

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