<commit_before>import Ember from 'ember';
import tHelper from 'ember-i18n/helper';
import hbs from 'htmlbars-inline-precompile';
import localeConfig from 'ember-i18n/config/en';
import { test, moduleForComponent } from 'ember-qunit';

moduleForComponent('project-list', 'Integration | Component | project list', {
  unit: true,
  needs: [
    'service:i18n',
    'locale:en/translations',
    'locale:en/config',
    'util:i18n/missing-message',
    'util:i18n/compile-template',
    'config:environment'
  ],
  beforeEach() {
    // set the locale and the config
    Ember.getOwner(this).lookup('service:i18n').set('locale', 'en');
    this.register('locale:en/config', localeConfig);

    // register t helper
    this.register('helper:t', tHelper);
  }
});

test('it renders', function(assert) {
  assert.expect(1);
  this.render(hbs("{{vnc-viewer}}"));
  return assert.equal(this.$().text().trim(), "no project!!You haven't uploaded any project yetYou can upload a new project by clicking on Upload App above and start scanning");
});

test('tapping button fires an external action', function(assert) {
  assert.expect(7);
  var component = this.subject();
  Ember.run(function() {
    assert.equal(component.newProjectsObserver(), 1, "Project Observer");
    assert.deepEqual(component.get("sortProperties"), ["lastFileCreatedOn:desc"], "Sort Properties/Desc");
    component.set("sortingReversed", false);
    assert.deepEqual(component.get("sortProperties"), ["lastFileCreatedOn"], "Sort Properties");
    assert.equal(component.resetOffset(), 0, "Reset Offset");
    assert.deepEqual(component.offsetResetter(), [undefined, undefined, undefined, undefined], "Offset Resetter");
    assert.deepEqual(component.get("extraQueryStrings"), "{\"platform\":-1,\"query\":\"\",\"reverse\":false,\"sortingKey\":\"lastFileCreatedOn\"}", "Extra Query Strings");
    // assert.deepEqual(component.get("sortingKeyObjects"),
    //   [
    //     { "key": "lastFileCreatedOn", "reverse": true, "text": "Date Updated (Most Recent First)" },
    //     { "key": "lastFileCreatedOn", "reverse": false, "text": "Date Updated (Oldest First)" },
    //     { "key": "createdOn", "reverse": true, "text": "Date Created (Most Recent First)"},
    //     { "key": "createdOn", "reverse": false, "text": "Date Created (Oldest First)"},
    //     { "key": "name", "reverse": true, "text": "Project Name(Z -> A)"},
    //     { "key": "name", "reverse": false, "text": "Project Name(A -> Z)"},
    //     { "key": "packageName", "reverse": true, "text": "Package Name(Z -> A)"},
    //     { "key": "packageName", "reverse": false, "text": "Package Name(A -> Z)"}
    //   ], "Sorting Key Objects");
  });
});<commit_msg>fix: only 6 test cases<commit_after>import Ember from 'ember';
import tHelper from 'ember-i18n/helper';
import hbs from 'htmlbars-inline-precompile';
import localeConfig from 'ember-i18n/config/en';
import { test, moduleForComponent } from 'ember-qunit';

moduleForComponent('project-list', 'Integration | Component | project list', {
  unit: true,
  needs: [
    'service:i18n',
    'locale:en/translations',
    'locale:en/config',
    'util:i18n/missing-message',
    'util:i18n/compile-template',
    'config:environment'
  ],
  beforeEach() {
    // set the locale and the config
    Ember.getOwner(this).lookup('service:i18n').set('locale', 'en');
    this.register('locale:en/config', localeConfig);

    // register t helper
    this.register('helper:t', tHelper);
  }
});

test('it renders', function(assert) {
  assert.expect(1);
  this.render(hbs("{{vnc-viewer}}"));
  return assert.equal(this.$().text().trim(), "no project!!You haven't uploaded any project yetYou can upload a new project by clicking on Upload App above and start scanning");
});

test('tapping button fires an external action', function(assert) {
  assert.expect(6);
  var component = this.subject();
  Ember.run(function() {
    assert.equal(component.newProjectsObserver(), 1, "Project Observer");
    assert.deepEqual(component.get("sortProperties"), ["lastFileCreatedOn:desc"], "Sort Properties/Desc");
    component.set("sortingReversed", false);
    assert.deepEqual(component.get("sortProperties"), ["lastFileCreatedOn"], "Sort Properties");
    assert.equal(component.resetOffset(), 0, "Reset Offset");
    assert.deepEqual(component.offsetResetter(), [undefined, undefined, undefined, undefined], "Offset Resetter");
    assert.deepEqual(component.get("extraQueryStrings"), "{\"platform\":-1,\"query\":\"\",\"reverse\":false,\"sortingKey\":\"lastFileCreatedOn\"}", "Extra Query Strings");
    // assert.deepEqual(component.get("sortingKeyObjects"),
    //   [
    //     { "key": "lastFileCreatedOn", "reverse": true, "text": "Date Updated (Most Recent First)" },
    //     { "key": "lastFileCreatedOn", "reverse": false, "text": "Date Updated (Oldest First)" },
    //     { "key": "createdOn", "reverse": true, "text": "Date Created (Most Recent First)"},
    //     { "key": "createdOn", "reverse": false, "text": "Date Created (Oldest First)"},
    //     { "key": "name", "reverse": true, "text": "Project Name(Z -> A)"},
    //     { "key": "name", "reverse": false, "text": "Project Name(A -> Z)"},
    //     { "key": "packageName", "reverse": true, "text": "Package Name(Z -> A)"},
    //     { "key": "packageName", "reverse": false, "text": "Package Name(A -> Z)"}
    //   ], "Sorting Key Objects");
  });
});
{'fraction_non_alphanumeric': 0.1955678670360111, 'fraction_numerical': 0.006463527239150508, 'mean_word_length': 4.2839024390243905, 'pattern_counts': {'":': 56, '<': 3, '<?xml version=': 0, '>': 11, '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': '6433223', 'n_tokens_mistral': 1691, 'n_tokens_neox': 1657, 'n_words': 394}