added 260907 version of worker toolkit
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import { run } from '@ember/runloop';
|
||||
|
||||
export default function destroyApp(application) {
|
||||
run(application, 'destroy');
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { module } from 'qunit';
|
||||
import startApp from '../helpers/start-app';
|
||||
import destroyApp from '../helpers/destroy-app';
|
||||
import Ember from 'ember';
|
||||
|
||||
const { RSVP: { Promise } } = Ember;
|
||||
|
||||
export default function(name, options = {}) {
|
||||
module(name, {
|
||||
beforeEach() {
|
||||
this.application = startApp();
|
||||
|
||||
if (options.beforeEach) {
|
||||
return options.beforeEach.apply(this, arguments);
|
||||
}
|
||||
},
|
||||
|
||||
afterEach() {
|
||||
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
|
||||
return Promise.resolve(afterEach).then(() => destroyApp(this.application));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import Resolver from '../../resolver';
|
||||
import config from '../../config/environment';
|
||||
|
||||
const resolver = Resolver.create();
|
||||
|
||||
resolver.namespace = {
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix
|
||||
};
|
||||
|
||||
export default resolver;
|
||||
@@ -0,0 +1,16 @@
|
||||
import Application from '../../app';
|
||||
import config from '../../config/environment';
|
||||
import { merge } from '@ember/polyfills';
|
||||
import { run } from '@ember/runloop';
|
||||
|
||||
export default function startApp(attrs) {
|
||||
let attributes = merge({}, config.APP);
|
||||
attributes.autoboot = true;
|
||||
attributes = merge(attributes, attrs); // use defaults, but you can override;
|
||||
|
||||
return run(() => {
|
||||
let application = Application.create(attributes);
|
||||
application.setupForTesting();
|
||||
application.injectTestHelpers();
|
||||
});
|
||||
}
|
||||
33
worker-toolkit-flaredown/repo/frontend/tests/index.html
Normal file
33
worker-toolkit-flaredown/repo/frontend/tests/index.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Flaredown Tests</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{content-for "head"}}
|
||||
{{content-for "test-head"}}
|
||||
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/flaredown.css">
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
|
||||
|
||||
{{content-for "head-footer"}}
|
||||
{{content-for "test-head-footer"}}
|
||||
</head>
|
||||
<body>
|
||||
{{content-for "body"}}
|
||||
{{content-for "test-body"}}
|
||||
|
||||
<script src="{{rootURL}}testem.js" integrity=""></script>
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
<script src="{{rootURL}}assets/test-support.js"></script>
|
||||
<script src="{{rootURL}}assets/flaredown.js"></script>
|
||||
<script src="{{rootURL}}assets/tests.js"></script>
|
||||
|
||||
{{content-for "body-footer"}}
|
||||
{{content-for "test-body-footer"}}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,26 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('add-reminder', 'Integration | Component | add reminder', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{add-reminder}}`);
|
||||
|
||||
let response = this.$().text().trim().replace(/\s{2,}/g,' ').match(/Don't remind me/)[0];
|
||||
|
||||
assert.equal(response, "Don't remind me");
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#add-reminder}}
|
||||
template block text
|
||||
{{/add-reminder}}
|
||||
`);
|
||||
|
||||
assert.equal(response, "Don't remind me");
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('additional-info', 'Integration | Component | additional info', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{additional-info}}`);
|
||||
|
||||
assert.equal(this.$().text().trim().replace(/\s{2,}/g,', '), 'Design your health profile, Track symptoms and treatments, Share you story');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#additional-info}}
|
||||
template block text
|
||||
{{/additional-info}}
|
||||
`);
|
||||
|
||||
|
||||
|
||||
assert.equal(this.$().text().trim().replace(/\s{2,}/g,', '), 'Design your health profile, Track symptoms and treatments, Share you story');
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('at-js-autocomplete', 'Integration | Component | at js autocomplete', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
this.set('ajax', {
|
||||
session: {
|
||||
data: {
|
||||
authenticated: {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
request() {
|
||||
return {
|
||||
then() {
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{at-js-autocomplete ajax=ajax}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('birth-date', 'Integration | Component | birth date', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
const result = "Year, Month, Day";
|
||||
|
||||
this.render(hbs`{{birth-date}}`);
|
||||
|
||||
assert.equal(this.$().text().trim().replace(/\s{2,}/g,', '), result);
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#birth-date}}
|
||||
template block text
|
||||
{{/birth-date}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim().replace(/\s{2,}/g,', '), result);
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('checkin-treatment', 'Integration | Component | checkin treatment', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });"
|
||||
|
||||
this.render(hbs`{{checkin-treatment}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('checkin/promotion-step', 'Integration | Component | checkin/promotion step', {
|
||||
integration: true,
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{checkin/promotion-step}}`);
|
||||
|
||||
let result = 'How likely is it that you would recommend Flaredown to a friend';
|
||||
|
||||
assert.equal(this.$().text().trim().match(result)[0], result);
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#checkin/promotion-step}}
|
||||
template block text
|
||||
{{/checkin/promotion-step}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim().match(result)[0], result);
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
import Ember from 'ember';
|
||||
|
||||
moduleForComponent('checkin/summary-posts', 'Integration | Component | checkin/summary posts', {
|
||||
integration: true,
|
||||
beforeEach: function() {
|
||||
this.register('service:store', Ember.Service.extend({
|
||||
query(){}
|
||||
}));
|
||||
// Calling inject puts the service instance in the context of the test,
|
||||
// making it accessible as "locationService" within each test
|
||||
this.inject.service('store', { as: 'store' });
|
||||
}
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{checkin/summary-posts}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'Your daily digest');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#checkin/summary-posts}}
|
||||
template block text
|
||||
{{/checkin/summary-posts}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'Your daily digest');
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('checkin/weather-step', 'Integration | Component | checkin/weather step', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{checkin/weather-step}}`);
|
||||
|
||||
assert.equal(
|
||||
this.$().text().trim().replace(/\s+/g, ' '),
|
||||
'Weather To enable weather tracking, enter your location below Submit'
|
||||
);
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('custom-pick-a-time', 'Integration | Component | custom pick a time', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{custom-pick-a-time}}`);
|
||||
|
||||
assert.equal(this.$().text().trim().split(' ')[0], '12:00');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#custom-pick-a-time}}
|
||||
template block text
|
||||
{{/custom-pick-a-time}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim().split('\n')[0], 'template block text');
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('data-export-initiator', 'Integration | Component | data export initiator', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{data-export-initiator}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'Download my data');
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('emoji-reaction', 'Integration | Component | emoji reaction', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{emoji-reaction}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('fb-share-btn', 'Integration | Component | fb share btn', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{fb-share-btn}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#fb-share-btn}}
|
||||
template block text
|
||||
{{/fb-share-btn}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
@@ -0,0 +1,24 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('form-for', 'Integration | Component | form for', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });"
|
||||
|
||||
this.render(hbs`{{form-for}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:"
|
||||
this.render(hbs`
|
||||
{{#form-for}}
|
||||
template block text
|
||||
{{/form-for}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('join-footer', 'Integration | Component | join footer', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{join-footer}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'Join Flaredown');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#join-footer}}
|
||||
template block text
|
||||
{{/join-footer}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'Join Flaredown');
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('label-switch', 'Integration | Component | label switch', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });"
|
||||
|
||||
this.render(hbs`{{label-switch}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('nav/discussions-unread', 'Integration | Component | nav/discussions unread', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
const re = /CHAT/;
|
||||
|
||||
this.render(hbs`{{nav/discussions-unread}}`);
|
||||
|
||||
assert.deepEqual(re.exec(this.$().text().trim()), ['CHAT']);
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#nav/discussions-unread}}
|
||||
template block text
|
||||
{{/nav/discussions-unread}}
|
||||
`);
|
||||
|
||||
assert.deepEqual(re.exec(this.$().text().trim()), ['CHAT']);
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('navigation-bar', 'Integration | Component | navigation bar', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });"
|
||||
|
||||
this.render(hbs`{{navigation-bar}}`);
|
||||
|
||||
assert.equal(this.$().text().trim().replace(/\s{2,}/g,' '), 'Checkins History Settings');
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('navigation-links', 'Integration | Component | navigation links', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{navigation-links}}`);
|
||||
|
||||
assert.equal(this.$().text().trim().replace(/\s{2,}/g,', '), 'Join our awesome community!');
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('notifications-form', 'Integration | Component | notifications form', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{notifications-form}}`);
|
||||
let notifyPostsText = "Email me when someone responds to my posts";
|
||||
// let notifyWeeklyPostsText = "Email me about weekly top posts";
|
||||
|
||||
let result = this.$().text().trim();
|
||||
|
||||
assert.equal(result.match(notifyPostsText)[0], notifyPostsText);
|
||||
// assert.equal(result.match(notifyWeeklyPostsText)[0], notifyWeeklyPostsText);
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#notifications-form}}
|
||||
template block text
|
||||
{{/notifications-form}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), result);
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('onboarding-dialog', 'Integration | Component | onboarding dialog', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });"
|
||||
|
||||
this.render(hbs`{{onboarding-dialog}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('onboarding/reminder-step', 'Integration | Component | onboarding/reminder step', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{onboarding/reminder-step}}`);
|
||||
|
||||
let response = this.$().text().trim().replace(/\s{2,}/g,' ').match(/Don't remind me/)[0];
|
||||
|
||||
assert.equal(response, "Don't remind me");
|
||||
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#onboarding/reminder-step}}
|
||||
template block text
|
||||
{{/onboarding/reminder-step}}
|
||||
`);
|
||||
|
||||
assert.equal(response, "Don't remind me");
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('posts/activity-notification', 'Integration | Component | posts/activity notification', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.set('notification', {
|
||||
kind: 'reaction',
|
||||
notificateableType: 'post'
|
||||
});
|
||||
const content = 'undefined person reacted to undefined';
|
||||
|
||||
this.render(hbs`{{posts/activity-notification notification=notification}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), content);
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#posts/activity-notification}}
|
||||
template block text
|
||||
{{/posts/activity-notification}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), content);
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('posts/post-comment', 'Integration | Component | posts/post comment', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{posts/post-comment}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#posts/post-comment}}
|
||||
template block text
|
||||
{{/posts/post-comment}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('posts/post-topics', 'Integration | Component | posts/post topics', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{posts/post-topics}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('posts/profile-picture', 'Integration | Component | posts/profile picture', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
this.render(hbs`{{posts/profile-picture}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('posts/topic-comment', 'Integration | Component | posts/topic comment', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{posts/topic-comment}}`);
|
||||
|
||||
const templateText = 'Responded to';
|
||||
|
||||
assert.equal(this.$().text().trim(), templateText);
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#posts/topic-comment}}
|
||||
template block text
|
||||
{{/posts/topic-comment}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), templateText);
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('posts/topic-post', 'Integration | Component | posts/topic post', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
const templateText = '';
|
||||
|
||||
this.render(hbs`{{posts/topic-post}}`);
|
||||
|
||||
assert.equal(this.$().text().trim().replace(/\s{2,}/g,', '), templateText);
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('promotion-score', 'Integration | Component | promotion score', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{promotion-score}}`);
|
||||
|
||||
let result = 'How can we do it better';
|
||||
|
||||
assert.equal(this.$().text().trim().match(result)[0], result);
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#promotion-score}}
|
||||
template block text
|
||||
{{/promotion-score}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim().match(result)[0], result);
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('scroll-to-anchor', 'Integration | Component | scroll to anchor', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{scroll-to-anchor}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#scroll-to-anchor}}
|
||||
template block text
|
||||
{{/scroll-to-anchor}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('share-socials', 'Integration | Component | share socials', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{share-socials}}`);
|
||||
|
||||
assert.equal(this.$().text().trim().replace(/\s{2,}/g,', '), 'Share, Tweet');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#share-socials}}
|
||||
template block text
|
||||
{{/share-socials}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim().replace(/\s{2,}/g,', '), 'Share, Tweet');
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('step-controls', 'Integration | Component | step controls', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });"
|
||||
|
||||
this.render(hbs`{{step-controls}}`);
|
||||
|
||||
assert.ok(/Continue/.test(this.$().text().trim()));
|
||||
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('toggle-logo', 'Integration | Component | toggle logo', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{toggle-logo}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#toggle-logo}}
|
||||
template block text
|
||||
{{/toggle-logo}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('tracked-level', 'Integration | Component | tracked level', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });"
|
||||
|
||||
this.render(hbs`{{tracked-level}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('twitter-share-btn', 'Integration | Component | twitter share btn', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{twitter-share-btn}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#twitter-share-btn}}
|
||||
template block text
|
||||
{{/twitter-share-btn}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
10
worker-toolkit-flaredown/repo/frontend/tests/test-helper.js
Normal file
10
worker-toolkit-flaredown/repo/frontend/tests/test-helper.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import resolver from './helpers/resolver';
|
||||
import Application from '../app';
|
||||
import config from '../config/environment';
|
||||
import { setApplication, setResolver } from '@ember/test-helpers';
|
||||
import { start } from 'ember-qunit';
|
||||
|
||||
setApplication(Application.create(config.APP));
|
||||
setResolver(resolver);
|
||||
|
||||
start();
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('adapter:reaction', 'Unit | Adapter | reaction', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:session']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let adapter = this.subject();
|
||||
assert.ok(adapter);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('controller:notifications', 'Unit | Controller | notifications', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let controller = this.subject();
|
||||
assert.ok(controller);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('controller:oracle/index', 'Unit | Controller | oracle/index', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll'],
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let controller = this.subject();
|
||||
assert.ok(controller);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('controller:posts/followings', 'Unit | Controller | posts/followings', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let controller = this.subject();
|
||||
assert.ok(controller);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('controller:posts/index', 'Unit | Controller | posts/index', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let controller = this.subject();
|
||||
assert.ok(controller);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('controller:posts/new', 'Unit | Controller | posts/new', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let controller = this.subject();
|
||||
assert.ok(controller);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('controller:posts/profile', 'Unit | Controller | posts/profile', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session', 'service:notifications']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let controller = this.subject();
|
||||
assert.ok(controller);
|
||||
});
|
||||
@@ -0,0 +1,24 @@
|
||||
import Ember from 'ember';
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
const {
|
||||
run,
|
||||
} = Ember;
|
||||
|
||||
moduleFor('controller:posts/show', 'Unit | Controller | posts/show', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session', 'service:ajax', 'service:notifications']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
run.begin();
|
||||
|
||||
let controller = this.subject();
|
||||
|
||||
controller.set('model', {});
|
||||
|
||||
assert.ok(controller);
|
||||
|
||||
run.end();
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('controller:posts/topic', 'Unit | Controller | posts/topic', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session', 'service:ajax', 'service:notifications']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let controller = this.subject();
|
||||
assert.ok(controller);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('controller:settings', 'Unit | Controller | settings', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let controller = this.subject();
|
||||
assert.ok(controller);
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
import { includes } from 'flaredown/helpers/includes';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Helper | includes');
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
assert.notOk(includes([42]));
|
||||
assert.notOk(includes([42, 43]));
|
||||
assert.ok(includes([42, 42]));
|
||||
assert.ok(includes([42, 42, 43]));
|
||||
assert.ok(includes([42, 43, 42]));
|
||||
});
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import Ember from 'ember';
|
||||
import { initialize } from 'flaredown/instance-initializers/emojis';
|
||||
import { module, test } from 'qunit';
|
||||
import destroyApp from '../../helpers/destroy-app';
|
||||
|
||||
module('Unit | Instance Initializer | emojis', {
|
||||
beforeEach() {
|
||||
Ember.run(() => {
|
||||
this.application = Ember.Application.create();
|
||||
this.appInstance = this.application.buildInstance();
|
||||
});
|
||||
},
|
||||
afterEach() {
|
||||
Ember.run(this.appInstance, 'destroy');
|
||||
destroyApp(this.application);
|
||||
}
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
initialize(this.appInstance);
|
||||
|
||||
// you would normally confirm the results of the initializer here
|
||||
assert.ok(true);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import Ember from 'ember';
|
||||
import AddMetaTagsMixin from 'flaredown/mixins/add-meta-tags';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Mixin | add meta tags');
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
let AddMetaTagsObject = Ember.Object.extend(AddMetaTagsMixin);
|
||||
let subject = AddMetaTagsObject.create();
|
||||
assert.ok(subject);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import Ember from 'ember';
|
||||
import BackNavigateableMixin from 'flaredown/mixins/back-navigateable';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Mixin | back navigateable');
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
let BackNavigateableObject = Ember.Object.extend(BackNavigateableMixin);
|
||||
let subject = BackNavigateableObject.create();
|
||||
assert.ok(subject);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import Ember from 'ember';
|
||||
import BodyFormatableMixin from 'flaredown/mixins/body-formatable';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Mixin | body formatable');
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
let BodyFormatableObject = Ember.Object.extend(BodyFormatableMixin);
|
||||
let subject = BodyFormatableObject.create();
|
||||
assert.ok(subject);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import Ember from 'ember';
|
||||
import FieldsByUnitsMixin from 'flaredown/mixins/fields-by-units';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Mixin | fields by units');
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
let FieldsByUnitsObject = Ember.Object.extend(FieldsByUnitsMixin);
|
||||
let subject = FieldsByUnitsObject.create();
|
||||
assert.ok(subject);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import Ember from 'ember';
|
||||
import HistoryTrackableMixin from 'flaredown/mixins/history-trackable';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Mixin | history trackable');
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
let HistoryTrackableObject = Ember.Object.extend(HistoryTrackableMixin);
|
||||
let subject = HistoryTrackableObject.create();
|
||||
assert.ok(subject);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import Ember from 'ember';
|
||||
import NavbarSearchableMixin from 'flaredown/mixins/navbar-searchable';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Mixin | navbar searcheable');
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
let NavbarSearchableObject = Ember.Object.extend(NavbarSearchableMixin);
|
||||
let subject = NavbarSearchableObject.create();
|
||||
assert.ok(subject);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import Ember from 'ember';
|
||||
import PostableGetableMixin from 'flaredown/mixins/postable-getable';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Mixin | postable getable');
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
let PostableGetableObject = Ember.Object.extend(PostableGetableMixin);
|
||||
let subject = PostableGetableObject.create();
|
||||
assert.ok(subject);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import Ember from 'ember';
|
||||
import ToggleHeaderLogoMixin from 'flaredown/mixins/toggle-header-logo';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Mixin | toggle header logo');
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
let ToggleHeaderLogoObject = Ember.Object.extend(ToggleHeaderLogoMixin);
|
||||
let subject = ToggleHeaderLogoObject.create();
|
||||
assert.ok(subject);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import Ember from 'ember';
|
||||
import TopicableMixin from 'flaredown/mixins/topicable';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Mixin | topicable');
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
let TopicableObject = Ember.Object.extend(TopicableMixin);
|
||||
let subject = TopicableObject.create();
|
||||
assert.ok(subject);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import Ember from 'ember';
|
||||
import TypeableMixin from 'flaredown/mixins/typeable';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Mixin | typeable');
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
let TypeableObject = Ember.Object.extend(TypeableMixin);
|
||||
let subject = TypeableObject.create();
|
||||
assert.ok(subject);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import Ember from 'ember';
|
||||
import UpdateNotificationsMixin from 'flaredown/mixins/update-notifications';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Mixin | update notifications');
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
let UpdateNotificationsObject = Ember.Object.extend(UpdateNotificationsMixin);
|
||||
let subject = UpdateNotificationsObject.create();
|
||||
assert.ok(subject);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import Ember from 'ember';
|
||||
import UserNameableMixin from 'flaredown/mixins/user-nameable';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Mixin | user nameable');
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it works', function(assert) {
|
||||
let UserNameableObject = Ember.Object.extend(UserNameableMixin);
|
||||
let subject = UserNameableObject.create();
|
||||
assert.ok(subject);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('chart-list', 'Unit | Model | chart list', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: []
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('comment', 'Unit | Model | comment', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['model:post', 'model:reaction']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('food', 'Unit | Model | food', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: []
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('harvey-bradshaw-index', 'Unit | Model | harvey bradshaw index', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['model:checkin']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('notification', 'Unit | Model | notification', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: []
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('oracle-request', 'Unit | Model | oracle request', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['model:sex', 'model:symptom']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('pattern', 'Unit | Model | pattern', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: []
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('post', 'Unit | Model | post', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['model:tag', 'model:symptom', 'model:comment', 'model:condition', 'model:treatment', 'model:reaction']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('postable', 'Unit | Model | postable', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['model:post', 'model:comment']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('reactable', 'Unit | Model | reactable', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['model:reaction']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('reaction', 'Unit | Model | reaction', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: []
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('session', 'Unit | Model | session', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: []
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('topic-following', 'Unit | Model | topic following', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['model:tag', 'model:symptom', 'model:comment', 'model:condition', 'model:treatment']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('user', 'Unit | Model | user', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['model:profile', 'model:topic-following']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('weather', 'Unit | Model | weather', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: []
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let model = this.subject();
|
||||
// let store = this.store();
|
||||
assert.ok(!!model);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('route:notifications', 'Unit | Route | notifications', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session', 'service:ajax', 'service:notifications']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.subject();
|
||||
assert.ok(route);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('route:oracle', 'Unit | Route | oracle', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session', 'service:ajax', 'service:notifications', 'service:logo-visiability']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.subject();
|
||||
assert.ok(route);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('route:oracle/index', 'Unit | Route | oracle/index', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.subject();
|
||||
assert.ok(route);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('route:oracle/result', 'Unit | Route | oracle/result', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.subject();
|
||||
assert.ok(route);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('route:posts', 'Unit | Route | posts', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session', 'service:ajax', 'service:notifications', 'service:logo-visiability']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.subject();
|
||||
assert.ok(route);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('route:posts/followings', 'Unit | Route | posts/followings', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session', 'service:ajax', 'service:notifications']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.subject();
|
||||
assert.ok(route);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('route:posts/index', 'Unit | Route | posts/index', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session', 'service:ajax', 'service:notifications', 'service:logo-visiability']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.subject();
|
||||
assert.ok(route);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('route:posts/new', 'Unit | Route | posts/new', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session', 'service:ajax', 'service:notifications', 'service:logo-visiability']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.subject();
|
||||
assert.ok(route);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('route:posts/profile', 'Unit | Route | posts/profile', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session', 'service:ajax', 'service:notifications', 'service:logo-visiability']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.subject();
|
||||
assert.ok(route);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('route:posts/show', 'Unit | Route | posts/show', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session', 'service:ajax', 'service:notifications', 'service:logo-visiability']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.subject();
|
||||
assert.ok(route);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('route:posts/topic', 'Unit | Route | posts/topic', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session', 'service:ajax', 'service:notifications', 'service:logo-visiability']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.subject();
|
||||
assert.ok(route);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('route:settings', 'Unit | Route | settings', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:router-scroll', 'service:route-history', 'service:session', 'service:ajax', 'service:notifications', 'service:logo-visiability']
|
||||
});
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.subject();
|
||||
assert.ok(route);
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
import { moduleForModel, test } from 'ember-qunit';
|
||||
|
||||
moduleForModel('post', 'Unit | Serializer | post', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: [
|
||||
'serializer:post',
|
||||
'model:tag',
|
||||
'model:symptom',
|
||||
'model:comment',
|
||||
'model:condition',
|
||||
'model:treatment',
|
||||
'model:reaction',
|
||||
]
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it serializes records', function(assert) {
|
||||
let record = this.subject();
|
||||
|
||||
let serializedRecord = record.serialize();
|
||||
|
||||
assert.ok(serializedRecord);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('service:ajax', 'Unit | Service | ajax', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:session']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let service = this.subject();
|
||||
assert.ok(service);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('service:emojis', 'Unit | Service | emojis', {
|
||||
// Specify the other units that are required for this test.
|
||||
// needs: ['service:foo']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let service = this.subject();
|
||||
assert.ok(service);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('service:logo-visiability', 'Unit | Service | logo visiability', {
|
||||
// Specify the other units that are required for this test.
|
||||
// needs: ['service:foo']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let service = this.subject();
|
||||
assert.ok(service);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('service:notifications', 'Unit | Service | notifications', {
|
||||
// Specify the other units that are required for this test.
|
||||
needs: ['service:session']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let service = this.subject();
|
||||
assert.ok(service);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('service:route-history', 'Unit | Service | route history', {
|
||||
// Specify the other units that are required for this test.
|
||||
// needs: ['service:foo']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let service = this.subject();
|
||||
assert.ok(service);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('transform:raw', 'Unit | Transform | raw', {
|
||||
// Specify the other units that are required for this test.
|
||||
// needs: ['serializer:foo']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let transform = this.subject();
|
||||
assert.ok(transform);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('transform:time-zone-name', 'Unit | Transform | time zone name', {
|
||||
// Specify the other units that are required for this test.
|
||||
// needs: ['serializer:foo']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let transform = this.subject();
|
||||
assert.ok(transform);
|
||||
});
|
||||
Reference in New Issue
Block a user