 
 helper = (model, routerQuery) -> PlanRenderHelper(model, Builder, {}, {}, routerQuery)
 
+fakePeriodDisable = (element, disabledPeriod) ->
+  fakeEvent =
+    target:
+      checked: false
+
+  element.togglePeriodEnabled(disabledPeriod, fakeEvent)
+
+fakePeriodEnable = (element, enabledPeriod) ->
+  fakeEvent =
+    target:
+      checked: true
+
+  element.togglePeriodEnabled(enabledPeriod, fakeEvent)
 
 describe 'Task Plan Builder', ->
   beforeEach ->

tomorrow = (new Date(Date.now() + 1000 * 3600 * 24)).toString()
dayAfter = (new Date(Date.now() + 1000 * 3600 * 48)).toString()

getDateString = (value) -> moment(value).format(TutorDateFormat)
getISODateString = (value) -> moment(value).format(ISO_DATE_FORMAT)

COURSES = require '../../../api/user/courses.json'
NEW_READING = ExtendBasePlan({id: "_CREATING_1", settings: {page_ids: []}}, false, false)

      expect(dueAt).to.not.be.ok

  it 'can clear due at when there is no common due at', ->
    firstPeriod = COURSES[0].periods[0]
    secondPeriod = COURSES[0].periods[1]

    helper(NEW_READING).then ({dom, element}) ->
      #set individual periods
