<commit_before>describe("app.views.ServicesSelector", function(){
  beforeEach(function(){
    loginAs({
      services : [
        { provider : "facebook" }
      ]
    });

    this.view = new app.views.ServicesSelector();
  });

  describe("rendering", function(){
    beforeEach(function(){
      this.view.setElement("#jasmine_content")
      this.view.render();
    });

    it("displays all services", function(){
      var checkboxes = $(this.view.el).find('input[type="checkbox"]');
      expect(checkboxes.val()).toBe("facebook");
    });

    // this tests the crazy css we have in a bassackwards way
    // check out toggling the services on the new publisher and make sure it works if you change stuff.
    it("selects the checkbox when the image is clicked", function(){
      expect($("label[for=service_toggle_facebook]").css("opacity")).toBeLessThan(0.8) //floating point weirdness, be safe.
      this.view.$("input[value='facebook']").select()
      expect($("label[for=service_toggle_facebook]").css("opacity")).toBe('1')
    })
  });
});<commit_msg>be really pedantic about the stupid service selector spec<commit_after>describe("app.views.ServicesSelector", function(){
  beforeEach(function(){
    loginAs({
      services : [
        { provider : "facebook" }
      ]
    });

    this.view = new app.views.ServicesSelector();
  });

  describe("rendering", function(){
    beforeEach(function(){
      this.view.setElement("#jasmine_content")
      this.view.render();
    });

    it("displays all services", function(){
      var checkboxes = $(this.view.el).find('input[type="checkbox"]');
      expect(checkboxes.val()).toBe("facebook");
    });

    // this tests the crazy css we have in a bassackwards way
    // check out toggling the services on the new publisher and make sure it works if you change stuff.
    it("selects the checkbox when the image is clicked", function(){
      expect($("label[for=service_toggle_facebook]").css("opacity")).toBeLessThan(0.8) //floating point weirdness, be safe.
      this.view.$("input[value='facebook']").select()

        waitsFor(function(){
          return $("label[for=service_toggle_facebook]").css("opacity") == 1
      })
    })
  });
});
{'fraction_non_alphanumeric': 0.16343989194056732, 'fraction_numerical': 0.0027014858171994596, 'mean_word_length': 3.461847389558233, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5030352', 'n_tokens_mistral': 640, 'n_tokens_neox': 621, 'n_words': 149}