<commit_before>window.BasicTourTests = (description, tourGenerator) ->
  describe "Tourist.Tour #{description}", ->
    beforeEach ->
      loadFixtures('tour.html')

      @options =
        this: 1
        that: 34

      @steps = [{
        content: '''
          <p class="one">One</p>
        '''
        target: $('#target-one')
        highlightTarget: true
        closeButton: true
        nextButton: true
        setup: (tour, options) ->
        teardown: ->
      },{
        content: '''
          <p class="two">Step Two</p>
        '''
        closeButton: true
        skipButton: true
        setup: ->
          {target: $('#target-two')}
        teardown: ->
      },{
        content: '''
          <p class="three action">Step Three</p>
        '''
        closeButton: true
        nextButton: true
        setup: ->
        teardown: ->
      }]

      @finalQuit =
        content: '''
          <p class="finalquit">The user quit early</p>
        '''
        okButton: true
        setup: ->
        teardown: ->

      @finalSucceed =
        content: '''
          <p class="finalsuccess">User made it all the way through</p>
        '''
        okButton: true
        setup: ->
        teardown: ->

      @s = tourGenerator.call(this)

    afterEach ->
      Tourist.Tip.Base.destroy()

    describe 'basics', ->
      it 'inits', ->
        expect(@s.model instanceof Tourist.Model).toEqual(true)
        expect(@s.view instanceof Tourist.Tip[@s.options.tipClass]).toEqual(true)

    describe 'rendering', ->
      it 'starts and updates the view', ->
        @s.start()
        @s.next()
        @s.next()

        el = @s.view._getTipElement()
        expect(el.find('.action')).toExist()
        expect(el.find('.action-label')).toExist()
        expect(el.find('.action-label').text()).toEqual('Do this:')

    describe 'stepping', -><commit_msg>add targets to tests to fix tests<commit_after>window.BasicTourTests = (description, tourGenerator) ->
  describe "Tourist.Tour #{description}", ->
    beforeEach ->
      loadFixtures('tour.html')

      @options =
        this: 1
        that: 34

      @steps = [{
        content: '''
          <p class="one">One</p>
        '''
        target: $('#target-one')
        highlightTarget: true
        closeButton: true
        nextButton: true
        setup: (tour, options) ->
        teardown: ->
      },{
        content: '''
          <p class="two">Step Two</p>
        '''
        closeButton: true
        skipButton: true
        setup: ->
          {target: $('#target-two')}
        teardown: ->
      },{
        content: '''
          <p class="three action">Step Three</p>
        '''
        closeButton: true
        nextButton: true
        setup: ->
        teardown: ->
      }]

      @finalQuit =
        content: '''
          <p class="finalquit">The user quit early</p>
        '''
        okButton: true
        target: $('#target-one')
        setup: ->
        teardown: ->

      @finalSucceed =
        content: '''
          <p class="finalsuccess">User made it all the way through</p>
        '''
        okButton: true
        target: $('#target-one')
        setup: ->
        teardown: ->

      @s = tourGenerator.call(this)

    afterEach ->
      Tourist.Tip.Base.destroy()

    describe 'basics', ->
      it 'inits', ->
        expect(@s.model instanceof Tourist.Model).toEqual(true)
        expect(@s.view instanceof Tourist.Tip[@s.options.tipClass]).toEqual(true)

    describe 'rendering', ->
      it 'starts and updates the view', ->
        @s.start()
        @s.next()
        @s.next()

        el = @s.view._getTipElement()
        expect(el.find('.action')).toExist()
        expect(el.find('.action-label')).toExist()
        expect(el.find('.action-label').text()).toEqual('Do this:')

    describe 'stepping', ->
{'fraction_non_alphanumeric': 0.15896103896103897, 'fraction_numerical': 0.0015584415584415584, 'mean_word_length': 1.698668535388928, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '780511', 'n_tokens_mistral': 1159, 'n_tokens_neox': 1122, 'n_words': 230}