<commit_before>var React = require("react");
var TestUtils = require('react-testutils-additions');

var CertificateBuilder = require('../../../../testUtilities/builders/certificateBuilder');
var httpBackend = require('../../../../testUtilities/httpBackend');

var ComponentNameAdapter = require('editor/components/fields/componentName');
var componentNameStore = require('editor/components/fields/componentName/componentNameStore');

fdescribe('The ComponentName Adapter', () => {
  var component;

  beforeAll(done => {
    var certificate = new CertificateBuilder("1234")
      .build();

    var props = {
      certificate,
      options: {
        propertyName: 'componentName',
        resourceKey: 'ComponentName'
      },
      editMode: true
    };

    httpBackend.mock(/api\/certificates\/1234\/audittrail/, [{}]);

    componentNameStore.listen(state => {
      if (state.status === componentNameStore.statusCodes.READY) {
        setTimeout(done);
      }
    });

    component = TestUtils.renderIntoDocument(<ComponentNameAdapter {...props} />);
  });

  it('can be rendered', () => {
    expect(component).toBeDefined();
  });

  it('will render the dropdown', () => {
    var controls = TestUtils.find(component, '.form-control');
    expect(controls.length).toBe(1);
  });

});<commit_msg>Added naming to the adapter test<commit_after>var React = require("react");
var TestUtils = require('react-testutils-additions');

var CertificateBuilder = require('../../../../testUtilities/builders/certificateBuilder');
var httpBackend = require('../../../../testUtilities/httpBackend');

var <%= componentNamePC %>Adapter = require('editor/components/fields/<%= componentNameCC %>');
var <%= componentNameCC %>Store = require('editor/components/fields/<%= componentNameCC %>/<%= componentNameCC %>Store');

fdescribe('The <%= componentNamePC %> Adapter', () => {
  var component;

  beforeAll(done => {
    var certificate = new CertificateBuilder("1234")
      .build();

    var props = {
      certificate,
      options: {
        propertyName: '<%= componentNameCC %>',
        resourceKey: '<%= componentNamePC %>'
      },
      editMode: true
    };

    httpBackend.mock(/api\/certificates\/1234\/audittrail/, [{}]);

    <%= componentNameCC %>Store.listen(state => {
      if (state.status === <%= componentNameCC %>Store.statusCodes.READY) {
        setTimeout(done);
      }
    });

    component = TestUtils.renderIntoDocument(<<%= componentNamePC %>Adapter {...props} />);
  });

  it('can be rendered', () => {
    expect(component).toBeDefined();
  });

  it('will render the dropdown', () => {
    var controls = TestUtils.find(component, '.form-control');
    expect(controls.length).toBe(1);
  });

});
{'fraction_non_alphanumeric': 0.18045387994143486, 'fraction_numerical': 0.006588579795021962, 'mean_word_length': 3.50990099009901, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 26, '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': '925809', 'n_tokens_mistral': 803, 'n_tokens_neox': 757, 'n_words': 137}