import moduleForComponent from 'web-client/tests/helpers/module-for-component';
import { test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';

moduleForComponent('dashboards/revenue/export-data', 'Integration | Component | dashboards/revenue/export-data');

test('it renders', function(assert) {
  assert.expect(2);

  this.set('revenueData', {});
  this.set('subscriptionsData', {});
  this.set('isDisabled', false);

  this.render(hbs`
    {{dashboards/revenue/export-data
      revenueData=revenueData
      subscriptionsData=subscriptionsData
      isDisabled=isDisabled
    }}`);

  assert.notOk(this.$('button').hasClass('button--disabled'), 'Button is not disabled');
  assert.elementText(this.$('button'), 'Export Data', 'Button text is correct');
});

//TODO: Write case for downloading CSV file
