<commit_before>import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import setupRouter from '../../helpers/setup-router';
import wait from 'ember-test-helpers/wait';

moduleForComponent('manage-users-summary', 'Integration | Component | manage users summary', {
  integration: true,
  setup(){
    setupRouter(this);
  }
});

test('it renders', function(assert) {
  this.render(hbs`{{manage-users-summary}}`);

  assert.equal(this.$('h2').text().trim(), 'Ilios Users (View All)');
  assert.equal(this.$('a:eq(0)').text().trim(), 'View All');
  assert.notEqual(this.$('a:eq(0)').prop('href').search(/\/users$/), -1, `${this.$('a:eq(0)').prop('href')} links to /users`);
  assert.equal(this.$('a:eq(1)').text().trim(), 'Add User');
  assert.notEqual(this.$('a:eq(1)').prop('href').search(/\/users\?addUser=true$/), -1, `${this.$('a:eq(1)').prop('href')} links to /users?addUser=true`);
  assert.equal(this.$('a:eq(2)').text().trim(), 'Add Multiple Users');
  assert.notEqual(this.$('a:eq(2)').prop('href').search(/\/users\?addUsers=true$/), -1, `${this.$('a:eq(2)').prop('href')} links to /users?addUsers=true`);
});

test('show more input prompt', function(assert) {
  this.render(hbs`{{manage-users-summary}}`);

  const userSearch = '.user-search input';
  const results = '.user-search .results li';

  this.$(userSearch).val('12');
  this.$(userSearch).trigger('keyup');

  return wait().then(()=>{
    assert.equal(this.$(results).length, 1);
    assert.equal(this.$(results).text().trim(), 'keep typing...');
  });
});<commit_msg>Fix test strings for correct manage user button names<commit_after>import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import setupRouter from '../../helpers/setup-router';
import wait from 'ember-test-helpers/wait';

moduleForComponent('manage-users-summary', 'Integration | Component | manage users summary', {
  integration: true,
  setup(){
    setupRouter(this);
  }
});

test('it renders', function(assert) {
  this.render(hbs`{{manage-users-summary}}`);

  assert.equal(this.$('h2').text().trim(), 'Ilios Users (View All)');
  assert.equal(this.$('a:eq(0)').text().trim(), 'View All');
  assert.notEqual(this.$('a:eq(0)').prop('href').search(/\/users$/), -1, `${this.$('a:eq(0)').prop('href')} links to /users`);
  assert.equal(this.$('a:eq(1)').text().trim(), 'Create New User');
  assert.notEqual(this.$('a:eq(1)').prop('href').search(/\/users\?addUser=true$/), -1, `${this.$('a:eq(1)').prop('href')} links to /users?addUser=true`);
  assert.equal(this.$('a:eq(2)').text().trim(), 'Upload Multiple Users');
  assert.notEqual(this.$('a:eq(2)').prop('href').search(/\/users\?addUsers=true$/), -1, `${this.$('a:eq(2)').prop('href')} links to /users?addUsers=true`);
});

test('show more input prompt', function(assert) {
  this.render(hbs`{{manage-users-summary}}`);

  const userSearch = '.user-search input';
  const results = '.user-search .results li';

  this.$(userSearch).val('12');
  this.$(userSearch).trigger('keyup');

  return wait().then(()=>{
    assert.equal(this.$(results).length, 1);
    assert.equal(this.$(results).text().trim(), 'keep typing...');
  });
});
{'fraction_non_alphanumeric': 0.2604101926662523, 'fraction_numerical': 0.009944064636420136, 'mean_word_length': 5.262645914396887, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5828850', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1121, 'n_words': 185}