bootstrap-bookingsync-sass 1.0.5 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.editorconfig +0 -14
- data/.eslintignore +20 -0
- data/.eslintrc.js +105 -0
- data/.gitignore +15 -7
- data/.npmignore +30 -15
- data/.template-lintrc.js +5 -0
- data/.travis.yml +84 -0
- data/CHANGELOG.md +11 -0
- data/CONTRIBUTING.md +26 -0
- data/LICENSE.md +9 -0
- data/README.md +5 -6
- data/addon/components/bsy-alert.js +6 -8
- data/addon/components/bsy-annotated-section.js +4 -4
- data/addon/components/bsy-annotated-section/annotation.js +4 -4
- data/addon/components/bsy-annotated-section/content.js +4 -4
- data/addon/components/bsy-button.js +16 -21
- data/addon/components/bsy-button/close.js +7 -6
- data/addon/components/bsy-checkbox.js +12 -4
- data/addon/components/bsy-icon.js +33 -0
- data/addon/components/bsy-input-addon.js +10 -2
- data/addon/components/bsy-input-addon/addon.js +4 -4
- data/addon/components/bsy-input-addon/input.js +7 -4
- data/addon/components/bsy-input.js +25 -17
- data/addon/components/bsy-modal.js +5 -5
- data/addon/components/bsy-modal/body.js +4 -4
- data/addon/components/bsy-modal/close.js +3 -3
- data/addon/components/bsy-modal/footer.js +4 -4
- data/addon/components/bsy-modal/header.js +4 -4
- data/addon/components/bsy-nav.js +2 -2
- data/addon/components/bsy-nav/item.js +4 -13
- data/addon/components/bsy-nav/link.js +4 -13
- data/addon/components/bsy-popover.js +5 -0
- data/addon/components/bsy-radio-buttons.js +2 -2
- data/addon/components/bsy-radio-buttons/button.js +8 -10
- data/addon/components/bsy-radio.js +5 -5
- data/addon/components/bsy-select-multiple.js +4 -4
- data/addon/components/bsy-select.js +4 -4
- data/addon/components/bsy-sheet.js +2 -2
- data/addon/components/bsy-sheet/header.js +2 -2
- data/addon/components/bsy-switch.js +15 -0
- data/addon/components/bsy-textarea.js +7 -5
- data/addon/templates/components/bsy-alert.hbs +1 -1
- data/addon/templates/components/bsy-button.hbs +9 -1
- data/addon/templates/components/bsy-checkbox.hbs +4 -3
- data/addon/templates/components/bsy-input-addon/input.hbs +3 -3
- data/addon/templates/components/bsy-input.hbs +3 -3
- data/addon/templates/components/bsy-modal.hbs +2 -2
- data/addon/templates/components/bsy-modal/close.hbs +1 -1
- data/addon/templates/components/bsy-modal/header.hbs +1 -1
- data/addon/templates/components/bsy-nav/item.hbs +1 -1
- data/addon/templates/components/bsy-radio-buttons/button.hbs +5 -4
- data/addon/templates/components/bsy-radio.hbs +5 -4
- data/addon/templates/components/bsy-select-multiple.hbs +1 -1
- data/addon/templates/components/bsy-select.hbs +1 -1
- data/addon/templates/components/bsy-switch.hbs +9 -0
- data/addon/templates/components/bsy-textarea.hbs +2 -2
- data/app/components/bsy-alert.js +1 -1
- data/app/components/bsy-icon.js +1 -0
- data/app/components/bsy-popover.js +1 -0
- data/app/components/bsy-sheet.js +1 -1
- data/app/components/bsy-sheet/header.js +1 -1
- data/app/components/bsy-switch.js +1 -0
- data/assets/javascripts/bookingsync/form.js +15 -15
- data/assets/stylesheets/_bootstrap-bookingsync.scss +2 -0
- data/assets/stylesheets/bookingsync/_buttons.scss +6 -0
- data/assets/stylesheets/bookingsync/_ember-toggle.scss +13 -0
- data/assets/stylesheets/bookingsync/_ember-tooltips.scss +15 -0
- data/assets/stylesheets/bookingsync/_form.scss +20 -1
- data/assets/stylesheets/bookingsync/_icons.scss +521 -98
- data/assets/stylesheets/bookingsync/_menu.scss +25 -4
- data/assets/stylesheets/bookingsync/_variables.scss +100 -36
- data/blueprints/ember-cli-bootstrap-bookingsync-sass/index.js +5 -4
- data/config/ember-try.js +82 -35
- data/config/environment.js +13 -3
- data/docs/content/brand/iconography.md +30 -0
- data/docs/public/ember/fonts/bookingsync/bookingsync-icons.svg +24 -1
- data/docs/public/ember/fonts/bookingsync/bookingsync-icons.ttf +0 -0
- data/docs/public/ember/fonts/bookingsync/bookingsync-icons.woff +0 -0
- data/docs/public/ember/fonts/bookingsync/bookingsync-icons.woff2 +0 -0
- data/ember-cli-build.js +4 -5
- data/index.js +13 -39
- data/lib/bootstrap/bookingsync/engine.rb +4 -2
- data/lib/bootstrap/bookingsync/version.rb +1 -1
- data/package-lock.json +20985 -0
- data/package.json +64 -44
- data/testem.js +25 -0
- data/tests/dummy/app/app.js +2 -6
- data/tests/dummy/app/components/navbar/component.js +5 -0
- data/tests/dummy/app/{templates/navbar.hbs → components/navbar/template.hbs} +0 -0
- data/tests/dummy/app/components/sidebar/component.js +5 -0
- data/tests/dummy/app/{templates/sidebar.hbs → components/sidebar/template.hbs} +0 -0
- data/tests/dummy/app/controllers/index.js +24 -12
- data/tests/dummy/app/index.html +4 -4
- data/tests/dummy/app/router.js +4 -3
- data/tests/dummy/app/templates/application.hbs +3 -2
- data/tests/dummy/app/templates/index.hbs +106 -70
- data/tests/dummy/config/environment.js +12 -7
- data/tests/dummy/config/optional-features.json +3 -0
- data/tests/dummy/config/targets.js +18 -0
- data/tests/{unit → helpers}/.gitkeep +0 -0
- data/tests/index.html +8 -9
- data/tests/integration/components/bsy-alert-test.js +18 -16
- data/tests/integration/components/bsy-button-test.js +18 -16
- data/tests/integration/components/bsy-checkbox-test.js +77 -0
- data/tests/integration/components/bsy-input-test.js +120 -0
- data/tests/integration/components/bsy-nav-test.js +18 -16
- data/tests/integration/components/bsy-nav/item-test.js +18 -16
- data/tests/integration/components/bsy-nav/link-test.js +18 -16
- data/tests/integration/components/bsy-popover-test.js +28 -0
- data/tests/integration/components/bsy-sheet-test.js +18 -16
- data/tests/integration/components/bsy-sheet/header-test.js +18 -16
- data/tests/integration/components/bsy-switch-test.js +21 -0
- data/tests/integration/components/bsy-textarea-test.js +13 -0
- data/tests/test-helper.js +7 -5
- metadata +32 -19
- data/.bowerrc +0 -4
- data/.travis.yaml +0 -34
- data/bower.json +0 -14
- data/testem.json +0 -12
- data/tests/.jshintrc +0 -52
- data/tests/dummy/public/crossdomain.xml +0 -15
- data/tests/helpers/destroy-app.js +0 -5
- data/tests/helpers/module-for-acceptance.js +0 -23
- data/tests/helpers/start-app.js +0 -18
- data/tests/integration/components/bsy-sheet.header-test.js +0 -24
- data/yarn.lock +0 -5356
@@ -1,15 +1,19 @@
|
|
1
|
-
|
1
|
+
'use strict';
|
2
2
|
|
3
3
|
module.exports = function(environment) {
|
4
|
-
|
4
|
+
let ENV = {
|
5
5
|
modulePrefix: 'dummy',
|
6
|
-
environment
|
7
|
-
|
6
|
+
environment,
|
7
|
+
rootURL: '/',
|
8
8
|
locationType: 'auto',
|
9
9
|
EmberENV: {
|
10
10
|
FEATURES: {
|
11
11
|
// Here you can enable experimental features on an ember canary build
|
12
|
-
// e.g.
|
12
|
+
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
|
13
|
+
},
|
14
|
+
EXTEND_PROTOTYPES: {
|
15
|
+
// Prevent Ember Data from overriding Date.parse.
|
16
|
+
Date: false
|
13
17
|
}
|
14
18
|
},
|
15
19
|
|
@@ -29,7 +33,7 @@ module.exports = function(environment) {
|
|
29
33
|
|
30
34
|
if (environment === 'test') {
|
31
35
|
// Testem prefers this...
|
32
|
-
ENV.
|
36
|
+
ENV.rootURL = '/';
|
33
37
|
ENV.locationType = 'none';
|
34
38
|
|
35
39
|
// keep test console output quieter
|
@@ -37,10 +41,11 @@ module.exports = function(environment) {
|
|
37
41
|
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
38
42
|
|
39
43
|
ENV.APP.rootElement = '#ember-testing';
|
44
|
+
ENV.APP.autoboot = false;
|
40
45
|
}
|
41
46
|
|
42
47
|
if (environment === 'production') {
|
43
|
-
ENV.
|
48
|
+
ENV.rootURL = '/ember';
|
44
49
|
}
|
45
50
|
|
46
51
|
return ENV;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const browsers = [
|
4
|
+
'last 1 Chrome versions',
|
5
|
+
'last 1 Firefox versions',
|
6
|
+
'last 1 Safari versions'
|
7
|
+
];
|
8
|
+
|
9
|
+
const isCI = !!process.env.CI;
|
10
|
+
const isProduction = process.env.EMBER_ENV === 'production';
|
11
|
+
|
12
|
+
if (isCI || isProduction) {
|
13
|
+
browsers.push('ie 11');
|
14
|
+
}
|
15
|
+
|
16
|
+
module.exports = {
|
17
|
+
browsers
|
18
|
+
};
|
File without changes
|
data/tests/index.html
CHANGED
@@ -10,9 +10,9 @@
|
|
10
10
|
{{content-for "head"}}
|
11
11
|
{{content-for "test-head"}}
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="assets/vendor.css">
|
14
|
-
<link rel="stylesheet" href="assets/dummy.css">
|
15
|
-
<link rel="stylesheet" href="assets/test-support.css">
|
13
|
+
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
14
|
+
<link rel="stylesheet" href="{{rootURL}}assets/dummy.css">
|
15
|
+
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
|
16
16
|
|
17
17
|
{{content-for "head-footer"}}
|
18
18
|
{{content-for "test-head-footer"}}
|
@@ -21,12 +21,11 @@
|
|
21
21
|
{{content-for "body"}}
|
22
22
|
{{content-for "test-body"}}
|
23
23
|
|
24
|
-
<script src="testem.js" integrity=""></script>
|
25
|
-
<script src="assets/vendor.js"></script>
|
26
|
-
<script src="assets/test-support.js"></script>
|
27
|
-
<script src="assets/dummy.js"></script>
|
28
|
-
<script src="assets/tests.js"></script>
|
29
|
-
<script src="assets/test-loader.js"></script>
|
24
|
+
<script src="/testem.js" integrity=""></script>
|
25
|
+
<script src="{{rootURL}}assets/vendor.js"></script>
|
26
|
+
<script src="{{rootURL}}assets/test-support.js"></script>
|
27
|
+
<script src="{{rootURL}}assets/dummy.js"></script>
|
28
|
+
<script src="{{rootURL}}assets/tests.js"></script>
|
30
29
|
|
31
30
|
{{content-for "body-footer"}}
|
32
31
|
{{content-for "test-body-footer"}}
|
@@ -1,24 +1,26 @@
|
|
1
|
-
import {
|
1
|
+
import { module, test } from 'qunit';
|
2
|
+
import { setupRenderingTest } from 'ember-qunit';
|
3
|
+
import { render } from '@ember/test-helpers';
|
2
4
|
import hbs from 'htmlbars-inline-precompile';
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
-
});
|
6
|
+
module('Integration | Component | bsy alert', function(hooks) {
|
7
|
+
setupRenderingTest(hooks);
|
7
8
|
|
8
|
-
test('it renders', function(assert) {
|
9
|
-
|
10
|
-
|
9
|
+
test('it renders', async function(assert) {
|
10
|
+
// Set any properties with this.set('myProperty', 'value');
|
11
|
+
// Handle any actions with this.on('myAction', function(val) { ... });"
|
11
12
|
|
12
|
-
|
13
|
+
await render(hbs`{{bsy-alert}}`);
|
13
14
|
|
14
|
-
|
15
|
+
assert.dom().hasText('');
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
// Template block usage:"
|
18
|
+
await render(hbs`
|
19
|
+
{{#bsy-alert}}
|
20
|
+
template block text
|
21
|
+
{{/bsy-alert}}
|
22
|
+
`);
|
22
23
|
|
23
|
-
|
24
|
+
assert.dom().hasText('template block text');
|
25
|
+
});
|
24
26
|
});
|
@@ -1,24 +1,26 @@
|
|
1
|
-
import {
|
1
|
+
import { module, test } from 'qunit';
|
2
|
+
import { setupRenderingTest } from 'ember-qunit';
|
3
|
+
import { render } from '@ember/test-helpers';
|
2
4
|
import hbs from 'htmlbars-inline-precompile';
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
-
});
|
6
|
+
module('Integration | Component | bsy button', function(hooks) {
|
7
|
+
setupRenderingTest(hooks);
|
7
8
|
|
8
|
-
test('it renders', function(assert) {
|
9
|
-
|
10
|
-
|
9
|
+
test('it renders', async function(assert) {
|
10
|
+
// Set any properties with this.set('myProperty', 'value');
|
11
|
+
// Handle any actions with this.on('myAction', function(val) { ... });"
|
11
12
|
|
12
|
-
|
13
|
+
await render(hbs`{{bsy-button}}`);
|
13
14
|
|
14
|
-
|
15
|
+
assert.dom().hasText('');
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
// Template block usage:"
|
18
|
+
await render(hbs`
|
19
|
+
{{#bsy-button}}
|
20
|
+
template block text
|
21
|
+
{{/bsy-button}}
|
22
|
+
`);
|
22
23
|
|
23
|
-
|
24
|
+
assert.dom().hasText('template block text');
|
25
|
+
});
|
24
26
|
});
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import { module, test } from 'qunit';
|
2
|
+
import { setupRenderingTest } from 'ember-qunit';
|
3
|
+
import { click, render } from '@ember/test-helpers';
|
4
|
+
import hbs from 'htmlbars-inline-precompile';
|
5
|
+
|
6
|
+
module('Integration | Component | bsy-checkbox', function(hooks) {
|
7
|
+
setupRenderingTest(hooks);
|
8
|
+
|
9
|
+
test('It renders a checkbox', async function(assert) {
|
10
|
+
await render(hbs`{{bsy-checkbox}}`);
|
11
|
+
assert.dom('input[type="checkbox"]').exists('Checkbox is rendered');
|
12
|
+
});
|
13
|
+
|
14
|
+
test('It sets the checked value', async function(assert) {
|
15
|
+
await render(hbs`{{bsy-checkbox}}`);
|
16
|
+
assert.dom('input').isNotChecked('Checkbox is not checked');
|
17
|
+
|
18
|
+
await render(hbs`{{bsy-checkbox checked=true}}`);
|
19
|
+
assert.dom('input').isChecked('Checkbox is checked');
|
20
|
+
|
21
|
+
await render(hbs`{{bsy-checkbox checked=false}}`);
|
22
|
+
assert.dom('input').isNotChecked('Checkbox is not checked');
|
23
|
+
});
|
24
|
+
|
25
|
+
test('The first positional param is checked', async function(assert) {
|
26
|
+
await render(hbs`{{bsy-checkbox true}}`);
|
27
|
+
assert.dom('input').isChecked('Checkbox is checked');
|
28
|
+
});
|
29
|
+
|
30
|
+
test('Clicking the checkbox triggers the update action', async function(assert) {
|
31
|
+
await render(hbs`{{bsy-checkbox value update=(action (mut value))}}`);
|
32
|
+
await click('input');
|
33
|
+
assert.equal(this.get('value'), true);
|
34
|
+
|
35
|
+
await click('input');
|
36
|
+
assert.equal(this.get('value'), false);
|
37
|
+
});
|
38
|
+
|
39
|
+
test('It can accept an outside toggle of checked', async function(assert) {
|
40
|
+
await render(hbs`{{bsy-checkbox checked=checked update=(action (mut checked))}}`);
|
41
|
+
|
42
|
+
await click('input');
|
43
|
+
this.set('checked', false);
|
44
|
+
await click('input');
|
45
|
+
|
46
|
+
assert.strictEqual(this.get('checked'), true);
|
47
|
+
});
|
48
|
+
|
49
|
+
test('It can accept an outside toggle of checked - using positional param', async function(assert) {
|
50
|
+
await render(hbs`{{bsy-checkbox checked update=(action (mut checked))}}`);
|
51
|
+
|
52
|
+
await click('input');
|
53
|
+
this.set('checked', false);
|
54
|
+
await click('input');
|
55
|
+
|
56
|
+
assert.strictEqual(this.get('checked'), true);
|
57
|
+
});
|
58
|
+
|
59
|
+
test('Outside value of null', async function(assert) {
|
60
|
+
this.set('checked', true);
|
61
|
+
await render(hbs`{{bsy-checkbox checked}}`);
|
62
|
+
this.set('checked', null);
|
63
|
+
assert.dom('input').isNotChecked('Checkbox is not checked');
|
64
|
+
});
|
65
|
+
|
66
|
+
test('Outside value of undefined', async function(assert) {
|
67
|
+
this.set('checked', true);
|
68
|
+
await render(hbs`{{bsy-checkbox checked}}`);
|
69
|
+
this.set('checked', undefined);
|
70
|
+
assert.dom('input').isNotChecked('Checkbox is not checked');
|
71
|
+
});
|
72
|
+
|
73
|
+
test('classNames is not passed as an html attribute', async function(assert) {
|
74
|
+
await render(hbs`{{bsy-checkbox classNames="testing"}}`);
|
75
|
+
assert.dom('input').hasNoAttribute('classnames');
|
76
|
+
});
|
77
|
+
});
|
@@ -0,0 +1,120 @@
|
|
1
|
+
import { run } from '@ember/runloop';
|
2
|
+
import { module, test } from 'qunit';
|
3
|
+
import { setupRenderingTest } from 'ember-qunit';
|
4
|
+
import { fillIn, blur, render } from '@ember/test-helpers';
|
5
|
+
import hbs from 'htmlbars-inline-precompile';
|
6
|
+
|
7
|
+
module('Integration | Component | bsy-input', function(hooks) {
|
8
|
+
setupRenderingTest(hooks);
|
9
|
+
|
10
|
+
hooks.beforeEach(function() {
|
11
|
+
this.actions = {};
|
12
|
+
this.send = (actionName, ...args) => this.actions[actionName].apply(this, args);
|
13
|
+
});
|
14
|
+
|
15
|
+
test('It renders an input', async function(assert) {
|
16
|
+
await render(hbs`{{bsy-input}}`);
|
17
|
+
assert.dom('input').exists('Input is rendered');
|
18
|
+
});
|
19
|
+
|
20
|
+
test('The default type of the input is "text"', async function(assert) {
|
21
|
+
await render(hbs`{{bsy-input}}`);
|
22
|
+
assert.dom('input[type="text"]').exists('Input type is text');
|
23
|
+
});
|
24
|
+
|
25
|
+
test('The type param changes the type of the input', async function(assert) {
|
26
|
+
await render(hbs`{{bsy-input type="password"}}`);
|
27
|
+
assert.dom('input[type="password"]').exists('Input type is password');
|
28
|
+
});
|
29
|
+
|
30
|
+
test('It puts the value into the input', async function(assert) {
|
31
|
+
await render(hbs`{{bsy-input value="test"}}`);
|
32
|
+
assert.dom('input').hasValue('test', 'input\'s value is \'test\'');
|
33
|
+
});
|
34
|
+
|
35
|
+
test('Changing the value updates the input', async function(assert) {
|
36
|
+
this.set('value', 'foo');
|
37
|
+
await render(hbs`{{bsy-input value}}`);
|
38
|
+
assert.dom('input').hasValue('foo', 'Input\'s value is \'foo\'');
|
39
|
+
this.set('value', 'bar');
|
40
|
+
assert.dom('input').hasValue('bar', 'Input\'s value is \'bar\'');
|
41
|
+
});
|
42
|
+
|
43
|
+
test('Value can be the first positional param', async function(assert) {
|
44
|
+
await render(hbs`{{bsy-input "test"}}`);
|
45
|
+
assert.dom('input').hasValue('test', 'input\'s value is \'test\'');
|
46
|
+
});
|
47
|
+
|
48
|
+
test('Outside positional param value of null', async function(assert) {
|
49
|
+
this.set('value', 'hello world');
|
50
|
+
await render(hbs`{{bsy-input value}}`);
|
51
|
+
this.set('value', null);
|
52
|
+
assert.dom('input').hasValue('');
|
53
|
+
});
|
54
|
+
|
55
|
+
test('Outside positional param value of undefined', async function(assert) {
|
56
|
+
this.set('value', 'hello world');
|
57
|
+
await render(hbs`{{bsy-input value}}`);
|
58
|
+
this.set('value', undefined);
|
59
|
+
assert.dom('input').hasValue('');
|
60
|
+
});
|
61
|
+
|
62
|
+
test('Typing in the input triggers the update action', async function(assert) {
|
63
|
+
await render(hbs`{{bsy-input value update=(action (mut value))}}`);
|
64
|
+
await fillIn('input', 'foo');
|
65
|
+
assert.equal(this.get('value'), 'foo', 'Value is updated to \'foo\'');
|
66
|
+
});
|
67
|
+
|
68
|
+
test('Changing the input value triggers the update action', async function(assert) {
|
69
|
+
await render(hbs`{{bsy-input value update=(action (mut value))}}`);
|
70
|
+
await fillIn('input', 'foo');
|
71
|
+
await blur('input');
|
72
|
+
assert.equal(this.get('value'), 'foo', 'Value is updated to \'foo\'');
|
73
|
+
});
|
74
|
+
|
75
|
+
test('Updating the value binding does not send an update action', async function(assert) {
|
76
|
+
assert.expect(1);
|
77
|
+
let fired = false;
|
78
|
+
this.actions.update = () => fired = true;
|
79
|
+
this.set('value', 'hey');
|
80
|
+
await render(hbs`{{bsy-input value update=(action 'update')}}`);
|
81
|
+
this.set('value', 'ho');
|
82
|
+
assert.equal(fired, false, 'The update action should not have fired');
|
83
|
+
});
|
84
|
+
|
85
|
+
test('Does not throw an error updating an number input', async function(assert) {
|
86
|
+
assert.expect(0);
|
87
|
+
this.set('value', 1);
|
88
|
+
|
89
|
+
await render(hbs`{{bsy-input value update=(action (mut value))}}`);
|
90
|
+
|
91
|
+
fillIn('input', '12');
|
92
|
+
});
|
93
|
+
|
94
|
+
test('Can bind the placeholder attribute', async function(assert) {
|
95
|
+
await render(hbs`{{bsy-input placeholder="testing"}}`);
|
96
|
+
assert.dom('input').hasAttribute('placeholder', 'testing');
|
97
|
+
});
|
98
|
+
|
99
|
+
test('positionalParamValue is not passed as an html attribute', async function(assert) {
|
100
|
+
await render(hbs`{{bsy-input "testing"}}`);
|
101
|
+
assert.dom('input').hasNoAttribute('positionalparamvalue');
|
102
|
+
});
|
103
|
+
|
104
|
+
test('classNames is not passed as an html attribute', async function(assert) {
|
105
|
+
await render(hbs`{{bsy-input classNames="testing"}}`);
|
106
|
+
assert.dom('input').hasNoAttribute('classnames');
|
107
|
+
});
|
108
|
+
|
109
|
+
test('update is not passed as an html attribute', async function(assert) {
|
110
|
+
await render(hbs`{{bsy-input update=(action (mut value))}}`);
|
111
|
+
assert.dom('input').hasNoAttribute('update');
|
112
|
+
});
|
113
|
+
|
114
|
+
test('Does not update value when it is destroyed', async function(assert) {
|
115
|
+
this.set('value', 'foo');
|
116
|
+
await render(hbs`{{bsy-input value update=(action (mut value))}}`);
|
117
|
+
run(() => this.clearRender());
|
118
|
+
assert.equal(this.get('value'), 'foo', 'Value is still foo');
|
119
|
+
});
|
120
|
+
});
|
@@ -1,24 +1,26 @@
|
|
1
|
-
import {
|
1
|
+
import { module, test } from 'qunit';
|
2
|
+
import { setupRenderingTest } from 'ember-qunit';
|
3
|
+
import { render } from '@ember/test-helpers';
|
2
4
|
import hbs from 'htmlbars-inline-precompile';
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
-
});
|
6
|
+
module('Integration | Component | bsy nav', function(hooks) {
|
7
|
+
setupRenderingTest(hooks);
|
7
8
|
|
8
|
-
test('it renders', function(assert) {
|
9
|
-
|
10
|
-
|
9
|
+
test('it renders', async function(assert) {
|
10
|
+
// Set any properties with this.set('myProperty', 'value');
|
11
|
+
// Handle any actions with this.on('myAction', function(val) { ... });"
|
11
12
|
|
12
|
-
|
13
|
+
await render(hbs`{{bsy-nav}}`);
|
13
14
|
|
14
|
-
|
15
|
+
assert.dom().hasText('');
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
// Template block usage:"
|
18
|
+
await render(hbs`
|
19
|
+
{{#bsy-nav}}
|
20
|
+
template block text
|
21
|
+
{{/bsy-nav}}
|
22
|
+
`);
|
22
23
|
|
23
|
-
|
24
|
+
assert.dom().hasText('template block text');
|
25
|
+
});
|
24
26
|
});
|
@@ -1,24 +1,26 @@
|
|
1
|
-
import {
|
1
|
+
import { module, test } from 'qunit';
|
2
|
+
import { setupRenderingTest } from 'ember-qunit';
|
3
|
+
import { render } from '@ember/test-helpers';
|
2
4
|
import hbs from 'htmlbars-inline-precompile';
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
-
});
|
6
|
+
module('Integration | Component | bsy nav/item', function(hooks) {
|
7
|
+
setupRenderingTest(hooks);
|
7
8
|
|
8
|
-
test('it renders', function(assert) {
|
9
|
-
|
10
|
-
|
9
|
+
test('it renders', async function(assert) {
|
10
|
+
// Set any properties with this.set('myProperty', 'value');
|
11
|
+
// Handle any actions with this.on('myAction', function(val) { ... });"
|
11
12
|
|
12
|
-
|
13
|
+
await render(hbs`{{bsy-nav/item}}`);
|
13
14
|
|
14
|
-
|
15
|
+
assert.dom().hasText('');
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
// Template block usage:"
|
18
|
+
await render(hbs`
|
19
|
+
{{#bsy-nav/item}}
|
20
|
+
template block text
|
21
|
+
{{/bsy-nav/item}}
|
22
|
+
`);
|
22
23
|
|
23
|
-
|
24
|
+
assert.dom().hasText('template block text');
|
25
|
+
});
|
24
26
|
});
|