"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _immutable = require("immutable");

var _SessionItemResult = _interopRequireDefault(require("../../SessionItemResult"));

var _index = _interopRequireDefault(require("../index"));

var _SessionItem = _interopRequireDefault(require("../../../../../records/SessionItem"));

var _SessionItemResult2 = _interopRequireDefault(require("../../../../../records/SessionItemResult"));

var _Item = _interopRequireDefault(require("../../../../../records/Item"));

var _QuizSession = _interopRequireDefault(require("../../../../../records/QuizSession"));

describe('SessionItemResultsList Presenter', function () {
  var item1 = new _Item.default({
    id: '1'
  });

  item1.getInteractionType = function () {
    return {
      slug: 'foo'
    };
  };

  var item2 = new _Item.default({
    id: '2',
    itemBody: 'test'
  });

  item2.getInteractionType = function () {
    return {
      slug: 'foo'
    };
  };

  var testbed = createTestbed(withContext(_index.default), {
    quizSession: new _QuizSession.default({
      user: (0, _immutable.Map)()
    }),
    quizSessionResults: (0, _immutable.List)(),
    sessionItems: (0, _immutable.List)([new _SessionItem.default({
      position: '1',
      item: item1,
      id: 1
    }), new _SessionItem.default({
      position: '2',
      item: item2,
      id: 2
    })]),
    sessionItemResults: (0, _immutable.List)([new _SessionItemResult2.default({
      position: '1'
    }), new _SessionItemResult2.default({
      position: '2'
    })])
  });
  shouldRenderComponent(testbed, {}, _index.default);
  it('should render items results', function () {
    testbed.render({});
    var results = testbed.findChildrenByType(_SessionItemResult.default);
    expect(results.length).to.equal(2);
  });
  describe('a11y tests', function () {
    it('should meet a11y standards', function (done) {
      testbed.render({});
      testbed.checkA11yStandards(done);
    });
  });
});