Documentation ¶
Overview ¶
Package playbilling contains helper functions to interact with the Play Billing test PWA.
Index ¶
- Variables
- func AlreadyOwnErrorClose(uiAutomator *ui.Device) action.Action
- func CheckPaymentSuccessful(uiAutomator *ui.Device) action.Action
- func Click1TapBuy(uiAutomator *ui.Device) action.Action
- func ClickButtonOnArcPaymentOverlay(uiAutomator *ui.Device, buttonType, objectText string) action.Action
- func ClickElementByCDP(conn *chrome.Conn, jsExpr string) action.Action
- func RequiredAuthConfirm(uiAutomator *ui.Device) action.Action
- func TapPointsDecline(uiAutomator *ui.Device) action.Action
- type FixtData
- type TestApp
- func (ta *TestApp) BuySku(ctx context.Context) error
- func (ta *TestApp) CheckPaymentSuccessful(ctx context.Context) error
- func (ta *TestApp) Launch(ctx context.Context) error
- func (ta *TestApp) OpenBillingDialog(ctx context.Context, sku string) error
- func (ta *TestApp) RequiredAuthConfirm(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
var DataFiles = append(pwaFiles, playBillingWebApk.ApkDataPath)
DataFiles are the files required for each Play Billing tests.
Functions ¶
func AlreadyOwnErrorClose ¶
AlreadyOwnErrorClose closes "You already own this item" window.
func CheckPaymentSuccessful ¶
CheckPaymentSuccessful checks for a presence of payment successful screen in the android ui tree.
func Click1TapBuy ¶
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 ¶
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 ¶
RequiredAuthConfirm clicks "Yes, always" button in required auth window.
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 ¶
NewTestApp returns a reference to a new Play Billing Test App.
func (*TestApp) CheckPaymentSuccessful ¶
CheckPaymentSuccessful checks for a presence of payment successful screen in the android ui tree.
func (*TestApp) OpenBillingDialog ¶
OpenBillingDialog clicks a button on the PWA to launch the Play Billing UI.