import * as React from 'react';

import PaymentComplete from './PaymentComplete';
import BaseDriver from '../../../test/BaseDriver';

export default class PaymentCompleteDriver extends BaseDriver {
  when = {
    render: (props) => {
      this._render(<PaymentComplete
        {...props}
        />
      );
      return this;
    },
    clickReturnButton: () => this.get.returnButton().simulate('click'),
  };

  has = {
    returnButton: () => this.get.returnButton().exists(),
  };

  get = {
    transactionInfo: () => this.findByDataHook('wcn-transaction-info'),
    returnButton: () => this.findByDataHook('wcn-return-button'),
  };
}
