initial github commit
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
embertest: true
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
/*eslint no-unused-vars: "off"*/
|
||||
import Ember from 'ember';
|
||||
import Resolver from './resolver';
|
||||
import loadInitializers from 'ember-load-initializers';
|
||||
import config from './config/environment';
|
||||
import translations from 'dummy/i18n/translations';
|
||||
|
||||
let App;
|
||||
|
||||
Ember.MODEL_FACTORY_INJECTIONS = true;
|
||||
|
||||
App = Ember.Application.extend({
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix,
|
||||
Resolver
|
||||
});
|
||||
|
||||
loadInitializers(App, config.modulePrefix);
|
||||
|
||||
export default App;
|
||||
@@ -0,0 +1,10 @@
|
||||
import Ember from 'ember'
|
||||
|
||||
export default Ember.Controller.extend
|
||||
scenario_classification_options: ['B1', 'B2']
|
||||
scenario_classification_objects: [
|
||||
{id: "B1", grumpy: "Cool name for B1!"}
|
||||
{id: "B2", grumpy: "Cool name for B2!"}
|
||||
]
|
||||
|
||||
a: 3
|
||||
@@ -0,0 +1,62 @@
|
||||
window.$translations =
|
||||
en:
|
||||
application_name: 'ember-cli-dunlop Dummy app'
|
||||
total: 'Total'
|
||||
user:
|
||||
sign_out: 'Uitloggen'
|
||||
dunlop:
|
||||
module:
|
||||
wba_mailbox: 'WBA Mailbox'
|
||||
kbt_endpoint: 'KBT endpoint'
|
||||
general:
|
||||
save: 'Save'
|
||||
rollback: 'Cancel'
|
||||
destroy:
|
||||
are_you_sure: 'Weet je dit zeker?'
|
||||
button: 'Delete'
|
||||
close: 'Close'
|
||||
confirm:
|
||||
cancel: 'Cancel'
|
||||
confirm: 'Yes'
|
||||
modals:
|
||||
edit_project:
|
||||
title: "Edit ${models.project} %{name}"
|
||||
edit_organization:
|
||||
title: "Edit ${models.organization} %{name}"
|
||||
edit_tracker_subject:
|
||||
title: "Edit ${models.tracker_subject} %{name}"
|
||||
edit_tracker_group:
|
||||
title: "Edit ${models.tracker_group} %{name}"
|
||||
|
||||
confirm: 'Ja'
|
||||
action:
|
||||
new_model: "New %{model}"
|
||||
select_model: 'Select %{model}'
|
||||
add_model: 'Add %{model}'
|
||||
|
||||
date:
|
||||
today: 'Today'
|
||||
this_week: 'This week'
|
||||
this_month: 'This month'
|
||||
unit:
|
||||
second: 'second'
|
||||
minute: 'minute'
|
||||
businessday: 'business day'
|
||||
day: 'day'
|
||||
week: 'week'
|
||||
year: 'year'
|
||||
plural:
|
||||
second: 'seconds'
|
||||
minute: 'minutes'
|
||||
businessday: 'business days'
|
||||
day: 'days'
|
||||
week: 'weeks'
|
||||
year: 'years'
|
||||
week_day:
|
||||
monday: 'Maandag'
|
||||
tuesday: 'Dinsdag'
|
||||
wednesday: 'Woensdag'
|
||||
thursday: 'Donderdag'
|
||||
friday: 'Vrijdag'
|
||||
saturday: 'Zaterdag'
|
||||
sunday: 'Zondag'
|
||||
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Dummy</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{content-for "head"}}
|
||||
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/dummy.css">
|
||||
|
||||
{{content-for "head-footer"}}
|
||||
</head>
|
||||
<body>
|
||||
{{content-for "body"}}
|
||||
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
<script src="{{rootURL}}assets/dummy.js"></script>
|
||||
|
||||
{{content-for "body-footer"}}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,3 @@
|
||||
import Resolver from 'ember-resolver';
|
||||
|
||||
export default Resolver;
|
||||
@@ -0,0 +1,16 @@
|
||||
import Ember from 'ember'
|
||||
import config from './config/environment'
|
||||
|
||||
Router = Ember.Router.extend
|
||||
location: config.locationType
|
||||
rootURL: config.rootURL
|
||||
|
||||
Router.map ->
|
||||
@route 'test1'
|
||||
@route 'table-filters', ->
|
||||
@route 'test1'
|
||||
@route 'test2'
|
||||
@route 'helpers', ->
|
||||
@route 'number-to-xls-header'
|
||||
|
||||
export default Router
|
||||
@@ -0,0 +1,28 @@
|
||||
import Ember from 'ember'
|
||||
import PagedArray from 'ember-cli-pagination/local/paged-array'
|
||||
|
||||
export default_filter = Ember.Object.create
|
||||
name: ''
|
||||
target_week: ''
|
||||
target_date_gteq: moment()
|
||||
target_date_lteq: null
|
||||
s: 'name asc'
|
||||
|
||||
export default Ember.Route.extend
|
||||
queryParams:
|
||||
q:
|
||||
refreshModel: true
|
||||
setupController: (controller, model) ->
|
||||
controller.set 'filters', default_filter
|
||||
controller.set 'option_buttons_options', [1, 'two']
|
||||
@_super arguments...
|
||||
|
||||
model: (params) ->
|
||||
#@store.findAll('epots/migration-window-planning')
|
||||
otherParams = {q: default_filter.toProperties()}
|
||||
result = PagedArray.create [], perPage: 7
|
||||
result.setOtherParam = (param, q) ->
|
||||
window.last_set_param ||= {}
|
||||
window.last_set_param[param] = q # all is allowed for the purpose of testing and time conservation :devil:
|
||||
result
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
@import './semantic-ui-additions';
|
||||
@@ -0,0 +1,48 @@
|
||||
.ui.main
|
||||
padding-top: 40px
|
||||
|
||||
.hide
|
||||
display: none
|
||||
|
||||
.pull-right
|
||||
float: right
|
||||
|
||||
.right.floated.buttons
|
||||
margin-top: -0.5rem
|
||||
|
||||
.menu.fixed
|
||||
.header.item
|
||||
padding: 0 1rem
|
||||
.grid
|
||||
margin-top: -1rem
|
||||
margin-left: 0
|
||||
|
||||
.ui.header
|
||||
.push-action.icon
|
||||
padding: 0.6rem
|
||||
margin-right: 0
|
||||
|
||||
.ui.segment.title-box
|
||||
padding-top: 3rem
|
||||
.unpadded
|
||||
padding: 0 !important
|
||||
|
||||
.ui.table
|
||||
td
|
||||
&.compact
|
||||
padding: 0.5em 0.7em
|
||||
&.compact
|
||||
pre
|
||||
margin: 0
|
||||
|
||||
input:disabled
|
||||
background-color: #ccc !important
|
||||
|
||||
// .ui.grid might end up with columns having a negative bottom margin that captures the click event of the svg below it
|
||||
.without-bottom-margin
|
||||
margin-bottom: 0 !important
|
||||
|
||||
body .ui.popup
|
||||
z-index: 9021
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
= flash-message
|
||||
= partial 'global/top-menu'
|
||||
.ui.main
|
||||
/bread-crumbs linkable=false
|
||||
/= bread-crumbs tagName='ul' outputStyle='foundation' linkable=false as |component rrr|
|
||||
= bread-crumb route=rrr breadCrumbs=component
|
||||
span= rrr.title
|
||||
= outlet 'error-handling'
|
||||
if globals.flash.alert
|
||||
.ui.negative.floating.message
|
||||
i.close.icon{action (mut globals.flash.alert) ''}
|
||||
= globals.flash.alert
|
||||
if globals.flash.notice
|
||||
.ui.floating.info.message
|
||||
i.close.icon{action (mut globals.flash.notice) ''}
|
||||
= globals.flash.notice
|
||||
= outlet
|
||||
/if globals.preload_resources_fulfilled
|
||||
/ = outlet
|
||||
/else
|
||||
/ .ui.icon.message
|
||||
/ i.notched.circle.loading.icon
|
||||
/ .content
|
||||
/ .header Preloading resources...
|
||||
/ p Loading resources globally required before continuing with the application.
|
||||
/button.basic.button{ action 'debug'} debug
|
||||
= outlet 'modal'
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
.ui.inverted.menu.fixed
|
||||
/.ui.container
|
||||
= link-to 'index' class='header item'
|
||||
span ember-cli-dunlop dummy
|
||||
= link-to 'table-filters.test1' class='item'
|
||||
span Filters
|
||||
= link-to 'helpers' class='item'
|
||||
span Helpers
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
= page-title 'Helpers'
|
||||
.ui.grid.manual
|
||||
.four.wide.column.nav-column
|
||||
ui-sticky
|
||||
.ui.vertical.menu
|
||||
/.header.item= link-to 'user-manual': span= t 'manual.title'
|
||||
.item= link-to 'number-to-xls-header' 'helpers.number-to-xls-header'
|
||||
/.item= link-to 'Hi there' 'user-manual.attribute-mapping'
|
||||
.twelve.wide.column= outlet
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
= page-title 'number-to-xls-header'
|
||||
/code number-to-xls-header 4
|
||||
table.ui.compact.celled.definition.table
|
||||
tr
|
||||
td 0
|
||||
td= number-to-xls-header 0
|
||||
tr
|
||||
td 7
|
||||
td= number-to-xls-header 7
|
||||
tr
|
||||
td 16
|
||||
td= number-to-xls-header '16'
|
||||
tr
|
||||
td 77
|
||||
td= number-to-xls-header 77
|
||||
@@ -0,0 +1,4 @@
|
||||
.ui.two.item.stackable.tabs.menu
|
||||
= link-to 'table-filters.test1' class='item': span Filters Test1
|
||||
= link-to 'table-filters.test2' class='item': span Filters Test2
|
||||
= outlet
|
||||
@@ -0,0 +1,36 @@
|
||||
table.ui.celled.striped.compact.table
|
||||
thead
|
||||
tr
|
||||
th input
|
||||
th option-buttons
|
||||
th date-range
|
||||
th select-multiple
|
||||
th select-multiple-modal
|
||||
th CUSTOM
|
||||
th number-range
|
||||
th dropdown-select
|
||||
th dropdown-select objects
|
||||
table-filters content=model filters=filters as |filter|
|
||||
= filter.input key='name'
|
||||
= filter.option-buttons key='number_of_migration_windows' options=option_buttons_options
|
||||
= filter.date-range key='target_date' expandingTime=true weekSelector=true
|
||||
.ui.horizontal.divider custom
|
||||
.item
|
||||
button.ui.mini.primary.button{action 'set_filter_target_date_today'}= t 'date.today'
|
||||
'
|
||||
button.ui.mini.primary.button{action 'set_filter_target_date_this_week'}= t 'date.this_week'
|
||||
'
|
||||
button.ui.mini.primary.button{action 'set_filter_target_date_next_fifteen_weeks'} Nu ↔ 15 weken
|
||||
th
|
||||
th
|
||||
th class=filters.target_week:active-filter
|
||||
if filters.target_week
|
||||
|
|
||||
span= filters.target_week
|
||||
i.close.icon.clear-target-week-filter{action 'clear_filter' 'target_week'}
|
||||
= filter.number-range key='age' inclusive=true
|
||||
= filter.dropdown-select key='location_planning_scenario_classification' options=scenario_classification_options
|
||||
= filter.dropdown-select key='location_planning_scenario_classification' options=scenario_classification_objects labelPath='grumpy'
|
||||
|
||||
tbody
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
h1 Test222
|
||||
@@ -0,0 +1,50 @@
|
||||
/* eslint-env node */
|
||||
|
||||
module.exports = function(environment) {
|
||||
var ENV = {
|
||||
modulePrefix: 'dummy',
|
||||
environment: environment,
|
||||
rootURL: '/app/',
|
||||
locationType: 'auto',
|
||||
EmberENV: {
|
||||
FEATURES: {
|
||||
// Here you can enable experimental features on an ember canary build
|
||||
// e.g. 'with-controller': true
|
||||
},
|
||||
EXTEND_PROTOTYPES: {
|
||||
// Prevent Ember Data from overriding Date.parse.
|
||||
Date: false
|
||||
}
|
||||
},
|
||||
|
||||
APP: {
|
||||
// Here you can pass flags/options to your application instance
|
||||
// when it is created
|
||||
}
|
||||
};
|
||||
|
||||
if (environment === 'development') {
|
||||
// ENV.APP.LOG_RESOLVER = true;
|
||||
// ENV.APP.LOG_ACTIVE_GENERATION = true;
|
||||
// ENV.APP.LOG_TRANSITIONS = true;
|
||||
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
|
||||
// ENV.APP.LOG_VIEW_LOOKUPS = true;
|
||||
}
|
||||
|
||||
if (environment === 'test') {
|
||||
// Testem prefers this...
|
||||
ENV.locationType = 'none';
|
||||
|
||||
// keep test console output quieter
|
||||
ENV.APP.LOG_ACTIVE_GENERATION = false;
|
||||
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
||||
|
||||
ENV.APP.rootElement = '#ember-testing';
|
||||
}
|
||||
|
||||
if (environment === 'production') {
|
||||
|
||||
}
|
||||
|
||||
return ENV;
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
|
||||
<cross-domain-policy>
|
||||
<!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
|
||||
|
||||
<!-- Most restrictive policy: -->
|
||||
<site-control permitted-cross-domain-policies="none"/>
|
||||
|
||||
<!-- Least restrictive policy: -->
|
||||
<!--
|
||||
<site-control permitted-cross-domain-policies="all"/>
|
||||
<allow-access-from domain="*" to-ports="*" secure="false"/>
|
||||
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>
|
||||
-->
|
||||
</cross-domain-policy>
|
||||
@@ -0,0 +1,3 @@
|
||||
# http://www.robotstxt.org
|
||||
User-agent: *
|
||||
Disallow:
|
||||
@@ -0,0 +1,5 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default function destroyApp(application) {
|
||||
Ember.run(application, 'destroy');
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { module } from 'qunit';
|
||||
import Ember from 'ember';
|
||||
import startApp from '../helpers/start-app';
|
||||
import destroyApp from '../helpers/destroy-app';
|
||||
|
||||
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,15 @@
|
||||
import Ember from 'ember';
|
||||
import Application from '../../app';
|
||||
import config from '../../config/environment';
|
||||
|
||||
export default function startApp(attrs) {
|
||||
let attributes = Ember.merge({}, config.APP);
|
||||
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
|
||||
|
||||
return Ember.run(() => {
|
||||
let application = Application.create(attributes);
|
||||
application.setupForTesting();
|
||||
application.injectTestHelpers();
|
||||
return application;
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Dummy 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/dummy.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="/testem.js" integrity=""></script>
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
<script src="{{rootURL}}assets/test-support.js"></script>
|
||||
<script src="{{rootURL}}assets/dummy.js"></script>
|
||||
<script src="{{rootURL}}assets/tests.js"></script>
|
||||
|
||||
{{content-for "body-footer"}}
|
||||
{{content-for "test-body-footer"}}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { test, moduleForComponent } from 'ember-qunit'
|
||||
import hbs from 'htmlbars-inline-precompile'
|
||||
|
||||
moduleForComponent 'collapsible-content', 'Integration | Component | collapsible content', {
|
||||
integration: true
|
||||
}
|
||||
|
||||
test 'it renders', (assert) ->
|
||||
assert.expect 2
|
||||
|
||||
# Set any properties with @set 'myProperty', 'value'
|
||||
# Handle any actions with @on 'myAction', (val) ->
|
||||
|
||||
@render hbs """{{collapsible-content}}"""
|
||||
|
||||
assert.equal @$().text().trim(), ''
|
||||
|
||||
# Template block usage:
|
||||
@render hbs """
|
||||
{{#collapsible-content}}
|
||||
template block text
|
||||
{{/collapsible-content}}
|
||||
"""
|
||||
|
||||
assert.equal @$().text().trim(), 'template block text'
|
||||
@@ -0,0 +1,25 @@
|
||||
import { test, moduleForComponent } from 'ember-qunit'
|
||||
import hbs from 'htmlbars-inline-precompile'
|
||||
|
||||
moduleForComponent 'editable-attribute', 'Integration | Component | editable attribute', {
|
||||
integration: true
|
||||
}
|
||||
|
||||
test 'it renders', (assert) ->
|
||||
assert.expect 2
|
||||
|
||||
# Set any properties with @set 'myProperty', 'value'
|
||||
# Handle any actions with @on 'myAction', (val) ->
|
||||
|
||||
@render hbs """{{editable-attribute}}"""
|
||||
|
||||
assert.equal @$().text().trim(), ''
|
||||
|
||||
# Template block usage:
|
||||
@render hbs """
|
||||
{{#editable-attribute}}
|
||||
template block text
|
||||
{{/editable-attribute}}
|
||||
"""
|
||||
|
||||
assert.equal @$().text().trim(), 'template block text'
|
||||
@@ -0,0 +1,25 @@
|
||||
import { test, moduleForComponent } from 'ember-qunit'
|
||||
import hbs from 'htmlbars-inline-precompile'
|
||||
|
||||
moduleForComponent 'error-handling', 'Integration | Component | error handling', {
|
||||
integration: true
|
||||
}
|
||||
|
||||
test 'it renders', (assert) ->
|
||||
assert.expect 2
|
||||
|
||||
# Set any properties with @set 'myProperty', 'value'
|
||||
# Handle any actions with @on 'myAction', (val) ->
|
||||
|
||||
@render hbs """{{error-handling}}"""
|
||||
|
||||
assert.equal @$().text().trim(), ''
|
||||
|
||||
# Template block usage:
|
||||
@render hbs """
|
||||
{{#error-handling}}
|
||||
template block text
|
||||
{{/error-handling}}
|
||||
"""
|
||||
|
||||
assert.equal @$().text().trim(), 'template block text'
|
||||
@@ -0,0 +1,25 @@
|
||||
import { test, moduleForComponent } from 'ember-qunit'
|
||||
import hbs from 'htmlbars-inline-precompile'
|
||||
|
||||
moduleForComponent 'number-input', 'Integration | Component | number input', {
|
||||
integration: true
|
||||
}
|
||||
|
||||
test 'it renders', (assert) ->
|
||||
assert.expect 2
|
||||
|
||||
# Set any properties with @set 'myProperty', 'value'
|
||||
# Handle any actions with @on 'myAction', (val) ->
|
||||
|
||||
@render hbs """{{number-input}}"""
|
||||
|
||||
assert.equal @$().text().trim(), ''
|
||||
|
||||
# Template block usage:
|
||||
@render hbs """
|
||||
{{#number-input}}
|
||||
template block text
|
||||
{{/number-input}}
|
||||
"""
|
||||
|
||||
assert.equal @$().text().trim(), 'template block text'
|
||||
@@ -0,0 +1,25 @@
|
||||
import { test, moduleForComponent } from 'ember-qunit'
|
||||
import hbs from 'htmlbars-inline-precompile'
|
||||
|
||||
moduleForComponent 'pagination-progress', 'Integration | Component | pagination progress', {
|
||||
integration: true
|
||||
}
|
||||
|
||||
test 'it renders', (assert) ->
|
||||
assert.expect 2
|
||||
|
||||
# Set any properties with @set 'myProperty', 'value'
|
||||
# Handle any actions with @on 'myAction', (val) ->
|
||||
|
||||
@render hbs """{{pagination-progress}}"""
|
||||
|
||||
assert.equal @$().text().trim(), ''
|
||||
|
||||
# Template block usage:
|
||||
@render hbs """
|
||||
{{#pagination-progress}}
|
||||
template block text
|
||||
{{/pagination-progress}}
|
||||
"""
|
||||
|
||||
assert.equal @$().text().trim(), 'template block text'
|
||||
@@ -0,0 +1,25 @@
|
||||
import { test, moduleForComponent } from 'ember-qunit'
|
||||
import hbs from 'htmlbars-inline-precompile'
|
||||
|
||||
moduleForComponent 'push-action', 'Integration | Component | push action', {
|
||||
integration: true
|
||||
}
|
||||
|
||||
test 'it renders', (assert) ->
|
||||
assert.expect 2
|
||||
|
||||
# Set any properties with @set 'myProperty', 'value'
|
||||
# Handle any actions with @on 'myAction', (val) ->
|
||||
|
||||
@render hbs """{{push-action}}"""
|
||||
|
||||
assert.equal @$().text().trim(), ''
|
||||
|
||||
# Template block usage:
|
||||
@render hbs """
|
||||
{{#push-action}}
|
||||
template block text
|
||||
{{/push-action}}
|
||||
"""
|
||||
|
||||
assert.equal @$().text().trim(), 'template block text'
|
||||
@@ -0,0 +1,25 @@
|
||||
import { test, moduleForComponent } from 'ember-qunit'
|
||||
import hbs from 'htmlbars-inline-precompile'
|
||||
|
||||
moduleForComponent 'ui-calendar-moment', 'Integration | Component | ui calendar moment', {
|
||||
integration: true
|
||||
}
|
||||
|
||||
test 'it renders', (assert) ->
|
||||
assert.expect 2
|
||||
|
||||
# Set any properties with @set 'myProperty', 'value'
|
||||
# Handle any actions with @on 'myAction', (val) ->
|
||||
|
||||
@render hbs """{{ui-calendar-moment}}"""
|
||||
|
||||
assert.equal @$().text().trim(), ''
|
||||
|
||||
# Template block usage:
|
||||
@render hbs """
|
||||
{{#ui-calendar-moment}}
|
||||
template block text
|
||||
{{/ui-calendar-moment}}
|
||||
"""
|
||||
|
||||
assert.equal @$().text().trim(), 'template block text'
|
||||
@@ -0,0 +1,25 @@
|
||||
import { test, moduleForComponent } from 'ember-qunit'
|
||||
import hbs from 'htmlbars-inline-precompile'
|
||||
|
||||
moduleForComponent 'ui-markdown-popup', 'Integration | Component | ui markdown popup', {
|
||||
integration: true
|
||||
}
|
||||
|
||||
test 'it renders', (assert) ->
|
||||
assert.expect 2
|
||||
|
||||
# Set any properties with @set 'myProperty', 'value'
|
||||
# Handle any actions with @on 'myAction', (val) ->
|
||||
|
||||
@render hbs """{{ui-markdown-popup}}"""
|
||||
|
||||
assert.equal @$().text().trim(), ''
|
||||
|
||||
# Template block usage:
|
||||
@render hbs """
|
||||
{{#ui-markdown-popup}}
|
||||
template block text
|
||||
{{/ui-markdown-popup}}
|
||||
"""
|
||||
|
||||
assert.equal @$().text().trim(), 'template block text'
|
||||
@@ -0,0 +1,6 @@
|
||||
import resolver from './helpers/resolver';
|
||||
import {
|
||||
setResolver
|
||||
} from 'ember-qunit';
|
||||
|
||||
setResolver(resolver);
|
||||
@@ -0,0 +1,10 @@
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Test helpers | Utility | freeze moment'
|
||||
test 'freezeMoment', (assert) ->
|
||||
freezeMoment '2016-12-21T14:22:00Z', ->
|
||||
assert.equal moment().toISOString().substring(0, 19), '2016-12-21T14:22:00' # check if the specially for this case developed freezeMoment function
|
||||
|
||||
assert.notEqual moment().toISOString().substring(0, 10), '2016-12-21'
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import { anyPermissionStartsWith } from 'dummy/helpers/any-permission-starts-with'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Unit | Helper | any permission starts with'
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works', (assert) ->
|
||||
result = anyPermissionStartsWith 42
|
||||
assert.ok result
|
||||
@@ -0,0 +1,9 @@
|
||||
import { date } from 'dummy/helpers/date'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Unit | Helper | date'
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works', (assert) ->
|
||||
result = date 42
|
||||
assert.ok result
|
||||
@@ -0,0 +1,9 @@
|
||||
import { dunlopCan } from 'dummy/helpers/dunlop-can'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Unit | Helper | dunlop can'
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works', (assert) ->
|
||||
result = dunlopCan 42
|
||||
assert.ok result
|
||||
@@ -0,0 +1,9 @@
|
||||
import { hasPermissionOfType } from 'dummy/helpers/has-permission-of-type'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Unit | Helper | has permission of type'
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works', (assert) ->
|
||||
result = hasPermissionOfType 42
|
||||
assert.ok result
|
||||
@@ -0,0 +1,9 @@
|
||||
import { minuteOfDay } from 'dummy/helpers/minute-of-day'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Unit | Helper | minute of day'
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works', (assert) ->
|
||||
result = minuteOfDay 42
|
||||
assert.ok result
|
||||
@@ -0,0 +1,9 @@
|
||||
import { numberToXlsHeader } from 'dummy/helpers/number-to-xls-header'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Unit | Helper | number to xls header'
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works', (assert) ->
|
||||
result = numberToXlsHeader 42
|
||||
assert.ok result
|
||||
@@ -0,0 +1,9 @@
|
||||
import { t } from 'dummy/helpers/t'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Unit | Helper | t'
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works', (assert) ->
|
||||
result = t 42
|
||||
assert.ok result
|
||||
@@ -0,0 +1,20 @@
|
||||
import Ember from 'ember'
|
||||
import { initialize } from 'dummy/initializers/ember-cli-dunlop-overrides'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
application = null
|
||||
registry = null
|
||||
|
||||
module 'Unit | Initializer | ember cli dunlop overrides',
|
||||
beforeEach: ->
|
||||
Ember.run ->
|
||||
application = Ember.Application.create()
|
||||
registry = application.registry
|
||||
application.deferReadiness()
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works', (assert) ->
|
||||
initialize registry, application
|
||||
|
||||
# you would normally confirm the results of the initializer here
|
||||
assert.ok true
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleForModel, test } from 'ember-qunit'
|
||||
|
||||
moduleForModel 'dunlop-user', 'Unit | Model | dunlop user', {
|
||||
# Specify the other units that are required for this test.
|
||||
needs: []
|
||||
}
|
||||
|
||||
test 'it exists', (assert) ->
|
||||
model = @subject()
|
||||
# store = @store()
|
||||
assert.ok !!model
|
||||
@@ -0,0 +1,13 @@
|
||||
import { moduleForModel, test } from 'ember-qunit'
|
||||
|
||||
moduleForModel 'create-and-update', 'Unit | Serializer | create and update',
|
||||
# Specify the other units that are required for this test.
|
||||
needs: ['serializer:create-and-update']
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it serializes records', (assert) ->
|
||||
record = @subject()
|
||||
|
||||
serializedRecord = record.serialize()
|
||||
|
||||
assert.ok serializedRecord
|
||||
@@ -0,0 +1,11 @@
|
||||
import { moduleFor, test } from 'ember-qunit'
|
||||
|
||||
moduleFor 'transform:moment', 'Unit | Transform | moment', {
|
||||
# Specify the other units that are required for this test.
|
||||
# needs: ['serializer:foo']
|
||||
}
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it exists', (assert) ->
|
||||
transform = @subject()
|
||||
assert.ok transform
|
||||
@@ -0,0 +1,9 @@
|
||||
import dateSort from '../../../utils/date-sort'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Unit | Utility | date sort'
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works', (assert) ->
|
||||
result = dateSort()
|
||||
assert.ok result
|
||||
@@ -0,0 +1,13 @@
|
||||
import getMaxSuffix from 'ember-cli-dunlop/utils/get-max-suffix'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Unit | Utility | get max suffix'
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works as module', (assert) ->
|
||||
result = getMaxSuffix(["Asdzo-AAV2-4", "Asdzo-AAV2", "Asdzo-AAV3"])
|
||||
assert.equal result, 4
|
||||
|
||||
test 'it works globally', (assert) ->
|
||||
result = get_max_suffix(["Asdzo-AAV2-4", "Asdzo-AAV2", "Asdzo-AAV3"])
|
||||
assert.equal result, 4
|
||||
@@ -0,0 +1,9 @@
|
||||
import integerToString from '../../../utils/integer-to-string'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Unit | Utility | integer to string'
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works', (assert) ->
|
||||
result = integerToString()
|
||||
assert.ok result
|
||||
@@ -0,0 +1,9 @@
|
||||
import mergeObjects from '../../../utils/merge-objects'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Unit | Utility | merge objects'
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works', (assert) ->
|
||||
result = mergeObjects()
|
||||
assert.ok result
|
||||
@@ -0,0 +1,9 @@
|
||||
import RangeParser from 'ember-cli-dunlop/utils/range-parser'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Unit | Utility | range parser'
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works sunny', (assert) ->
|
||||
result = RangeParser.parse(' 3, 5 - 9 , 17-19, 29')
|
||||
assert.deepEqual result, [3, 5, 6, 7, 8, 9, 17, 18, 19, 29]
|
||||
@@ -0,0 +1,9 @@
|
||||
import sortNumeric from '../../../utils/sort-numeric'
|
||||
import { module, test } from 'qunit'
|
||||
|
||||
module 'Unit | Utility | sort numeric'
|
||||
|
||||
# Replace this with your real tests.
|
||||
test 'it works', (assert) ->
|
||||
result = sortNumeric()
|
||||
assert.ok result
|
||||
@@ -0,0 +1,7 @@
|
||||
import { module, test } from 'qunit'
|
||||
import validateConditionalPresence from 'frontend/validators/conditional-presence'
|
||||
|
||||
module('Unit | Validator | conditional-presence')
|
||||
|
||||
test "it exists", (assert) ->
|
||||
assert.ok validateConditionalPresence()
|
||||
Reference in New Issue
Block a user