 Ext = window.Ext4 || window.Ext
 
 Ext.require [
-  'Rally.util.DateTime',
-  'Rally.alm.FeatureToggle'
+  'Rally.util.DateTime'
 ]
 
 describe 'Rally.apps.iterationtrackingboard.IterationTrackingBoardApp', ->


      @waitForComponentReady(@app)

  beforeEach ->
    @ajax.whenReading('project').respondWith {
      TeamMembers: []
      Editors: []
    }

    @ajax.whenQuerying('userstory').respondWith()
    @ajax.whenQuerying('defect').respondWith()
    @ajax.whenQuerying('defectsuite').respondWith()
    @ajax.whenQuerying('testset').respondWith()
    @ajax.whenQueryingAllowedValues('userstory', 'ScheduleState').respondWith(["Defined", "In-Progress", "Completed", "Accepted"]);

    @tooltipHelper = new Helpers.TooltipHelper this


    it 'should not show field picker in settings ', ->
      @createApp(isShowingBlankSlate: -> true).then =>
        @app.showFieldPicker = true
        expect(Ext.isEmpty(_.find(@app.getSettingsFields(), name: 'cardFields'))).toBe true

  it 'should filter the grid to the currently selected iteration', ->
    @stub(Rally.app.Context.prototype, 'isFeatureEnabled').withArgs('ITERATION_TRACKING_BOARD_GRID_TOGGLE').returns(true)
    requests = @stubRequests()

    @createApp().then =>
      @toggleToGrid()

      expect(request).toBeWsapiRequestWith(filters: @getIterationFilter()) for request in requests

  it 'should filter the board to the currently selected iteration', ->
    @stub(Rally.app.Context.prototype, 'isFeatureEnabled').withArgs('ITERATION_TRACKING_BOARD_GRID_TOGGLE').returns(true)
    requests = @stubRequests()

    @createApp().then =>
      @toggleToBoard()

      expect(request).toBeWsapiRequestWith(filters: @getIterationFilter()) for request in requests
