import * as React from 'react'; import * as sinon from 'sinon'; import PaymentMethodItem from './PaymentMethodItem'; import BaseDriver from '../../../test/BaseDriver'; export default class CashierPaymentsDriver extends BaseDriver { component: any; handleMethodChange: any; constructor() { super(); this.handleMethodChange = sinon.spy(); } when = { render: () => { this.component = this._render(); return this; }, click: () => { this.get.input().simulate('click'); return this; } }; has = { root: () => this.get.root().exists(), }; get = { root: () => this.findByDataHook(`wcn-payment-method-item`), input: () => this.findByDataHook(`wcn-payment-method-item-input-payPal`), handleMethodChange: () => this.handleMethodChange, }; }