"use strict";

var _scrolling = require("../scrolling");

var _constants = require("@instructure/quiz-common/lib/constants");

describe('scrolling action creators', function () {
  it('returns a well-formed scroll to item action', function () {
    var scrollToItemAction = (0, _scrolling.scrollToItem)('3');
    expect(scrollToItemAction).to.deep.equal({
      type: _constants.SCROLL_TO_COMPONENT,
      payload: '3',
      scrollingFocus: true
    });
  });
  it('returns a well-formed scroll to item action without focus', function () {
    var scrollToItemAction = (0, _scrolling.scrollToItem)('3', false);
    expect(scrollToItemAction).to.deep.equal({
      type: _constants.SCROLL_TO_COMPONENT,
      payload: '3',
      scrollingFocus: false
    });
  });
  it('returns a well-formed clear scrolledComponentKey action', function () {
    var clearsScrolledComponentKeyAction = (0, _scrolling.clearsScrolledComponentKey)();
    expect(clearsScrolledComponentKeyAction).to.deep.equal({
      type: _constants.CLEAR_SCROLLED_COMPONENT
    });
  });
});