added 260907 version of worker toolkit
This commit is contained in:
@@ -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');
|
||||
});
|
||||
Reference in New Issue
Block a user