<commit_before>import Ember from 'ember';
import layout from './template';

export default Ember.Component.extend({
  layout: layout,
  tagName: 'div',
  classNames: 'dropdown-menu',
  classNameBindings: 'alignComputed',
  attributeBindings: ['aria-labelledby'],

  // Defaults
  prefixClass: 'dropdown-menu-',
  align: null,

  // Constructors
  alignments: ['left', 'right'],

  // Accessibility
  'aria-labelledby': null,

  // Computed
  alignComputed: Ember.computed('align', function(){
    var alignments = this.get('alignments');
    var align = this.get('align');

    if (!align) {
      return null;
    }

    if (alignments.indexOf(align) === -1) {
      Ember.Logger.warn('rui-dropdown-menu: You specified and unsupported `align` property so we`ve defaulted to the standard left alignment. Choose from `left` or `right.`');
      return null;
    }

    return this.get('prefixClass') + align;
  })
});
<commit_msg>Adds data-test-id to dropdown menu component<commit_after>import Ember from 'ember';
import layout from './template';

export default Ember.Component.extend({
  layout: layout,
  tagName: 'div',
  classNames: 'dropdown-menu',
  classNameBindings: 'alignComputed',
  attributeBindings: [
    'aria-labelledby',
    'data-test-id'
  ],

  // Defaults
  prefixClass: 'dropdown-menu-',
  align: null,

  // Constructors
  alignments: ['left', 'right'],

  // Accessibility
  'aria-labelledby': null,

  // Computed
  alignComputed: Ember.computed('align', function(){
    var alignments = this.get('alignments');
    var align = this.get('align');

    if (!align) {
      return null;
    }

    if (alignments.indexOf(align) === -1) {
      Ember.Logger.warn('rui-dropdown-menu: You specified and unsupported `align` property so we`ve defaulted to the standard left alignment. Choose from `left` or `right.`');
      return null;
    }

    return this.get('prefixClass') + align;
  })
});

{'fraction_non_alphanumeric': 0.1486697965571205, 'fraction_numerical': 0.0010432968179447052, 'mean_word_length': 3.4918032786885247, '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': '7145260', 'n_tokens_mistral': 613, 'n_tokens_neox': 589, 'n_words': 156}