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

moduleForComponent('directory/game-details/carousel', 'Integration | Component | directory/game details/carousel');

test('it renders', function(assert) {
  this.render(hbs`
    {{#directory/game-details/carousel}}
      slideszzz
    {{/directory/game-details/carousel}}
  `);

  assert.elementCount(this.$('.game-details__carousel-wrapper'), 1, 'carousel component wrapper');
  assert.elementCount(this.$('.game-details__carousel'), 1, 'carousel');
  assert.elementCount(this.$('.game-details__carousel .slides'), 1, 'slides');
  assert.equal(this.$('.game-details__carousel .slides').html().trim(), 'slideszzz', 'slides yield');

  assert.elementCount(this.$('.game-details__carousel-nav'), 1, 'carousel arrows wrapper');
  assert.elementCount(this.$('.game-details__carousel-nav .game-details__carousel-arrow'), 2, '2 carousel arrows');
  assert.elementCount(this.$('.game-details__carousel-nav .game-details__carousel-arrow.game-details__carousel-arrow--prev'), 1, 'carousel arrow (prev)');
  assert.elementCount(this.$('.game-details__carousel-nav .game-details__carousel-arrow.game-details__carousel-arrow--next'), 1, 'carousel arrow (next)');
});
