From e3366998c5116616f37b2c16484cb3ccf63a5ed6 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Wed, 16 Sep 2020 14:32:03 -0400 Subject: [PATCH] style: format addons/rose --- .../addon/components/rose/list/key-value.js | 2 +- .../components/rose/list/key-value/item.js | 2 +- .../rose/components/dropdown/_index.scss | 2 +- .../styles/rose/components/form/_input.scss | 3 +-- .../rose/components/header/_dropdown.scss | 5 +++-- .../styles/rose/components/table/_index.scss | 2 +- .../app/components/rose/dropdown/button.js | 2 +- .../rose/app/components/rose/dropdown/link.js | 2 +- .../app/components/rose/form/helper-text.js | 2 +- .../app/components/rose/form/input/input.js | 2 +- addons/rose/app/components/rose/form/label.js | 2 +- .../components/rose/form/textarea/textarea.js | 2 +- .../rose/app/components/rose/list/key-value.js | 2 +- .../app/components/rose/list/key-value/item.js | 2 +- .../components/rose/dropdown/button-test.js | 2 +- .../components/rose/dropdown/link-test.js | 2 +- .../components/rose/form/checkbox-test.js | 14 +++++++++++--- .../components/rose/form/helper-text-test.js | 2 +- .../components/rose/form/input-test.js | 5 ++++- .../components/rose/form/label-test.js | 7 ++----- .../components/rose/list/key-value-test.js | 18 +++++++++++++----- 21 files changed, 49 insertions(+), 33 deletions(-) diff --git a/addons/rose/addon/components/rose/list/key-value.js b/addons/rose/addon/components/rose/list/key-value.js index 0d173250c..279a84e82 100644 --- a/addons/rose/addon/components/rose/list/key-value.js +++ b/addons/rose/addon/components/rose/list/key-value.js @@ -3,5 +3,5 @@ import layout from '../../../templates/components/rose/list/key-value'; export default Component.extend({ layout, - tagName: '' + tagName: '', }); diff --git a/addons/rose/addon/components/rose/list/key-value/item.js b/addons/rose/addon/components/rose/list/key-value/item.js index 291e1b9da..37c30217d 100644 --- a/addons/rose/addon/components/rose/list/key-value/item.js +++ b/addons/rose/addon/components/rose/list/key-value/item.js @@ -4,5 +4,5 @@ import ComponentAutoId from '../../../../mixins/component-auto-id'; export default Component.extend(ComponentAutoId, { layout, - tagName: '' + tagName: '', }); diff --git a/addons/rose/addon/styles/rose/components/dropdown/_index.scss b/addons/rose/addon/styles/rose/components/dropdown/_index.scss index 665c33f0f..bb5b6e91f 100644 --- a/addons/rose/addon/styles/rose/components/dropdown/_index.scss +++ b/addons/rose/addon/styles/rose/components/dropdown/_index.scss @@ -1,3 +1,3 @@ @import 'dropdown'; @import 'button'; -@import 'link'; \ No newline at end of file +@import 'link'; diff --git a/addons/rose/addon/styles/rose/components/form/_input.scss b/addons/rose/addon/styles/rose/components/form/_input.scss index 4b898f4ef..bdfd5fff9 100644 --- a/addons/rose/addon/styles/rose/components/form/_input.scss +++ b/addons/rose/addon/styles/rose/components/form/_input.scss @@ -16,8 +16,7 @@ background-color: var(--subtle); border: sizing.rems(xxxxs) solid var(--ui-gray-subtler-2); border-radius: sizing.rems(xxxs); - box-shadow: inset 0px 3px 1px - rgba(var(--stark-components), var(--opacity-4)); + box-shadow: inset 0px 3px 1px rgba(var(--stark-components), var(--opacity-4)); &.error { color: var(--failure); diff --git a/addons/rose/addon/styles/rose/components/header/_dropdown.scss b/addons/rose/addon/styles/rose/components/header/_dropdown.scss index 8dfe39547..fc81fdf23 100644 --- a/addons/rose/addon/styles/rose/components/header/_dropdown.scss +++ b/addons/rose/addon/styles/rose/components/header/_dropdown.scss @@ -3,7 +3,7 @@ $chevron: "data:image/svg+xml;utf-8,"; -.rose-header { +.rose-header { .rose-dropdown { &, &[open] { @@ -33,7 +33,8 @@ $chevron: "data:image/svg+xml;utf-8,`); - assert.equal(await find('.rose-form-checkbox-label-text').textContent.trim(), 'Label'); - assert.equal(await find('.rose-form-checkbox-label-description').textContent.trim(), 'Hello world'); + await render( + hbs`` + ); + assert.equal( + await find('.rose-form-checkbox-label-text').textContent.trim(), + 'Label' + ); + assert.equal( + await find('.rose-form-checkbox-label-description').textContent.trim(), + 'Hello world' + ); assert.ok(await find('input')); }); diff --git a/addons/rose/tests/integration/components/rose/form/helper-text-test.js b/addons/rose/tests/integration/components/rose/form/helper-text-test.js index 277b6f2b6..76aef0308 100644 --- a/addons/rose/tests/integration/components/rose/form/helper-text-test.js +++ b/addons/rose/tests/integration/components/rose/form/helper-text-test.js @@ -3,7 +3,7 @@ import { setupRenderingTest } from 'ember-qunit'; import { render, find } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -module('Integration | Component | rose/form/helper-text', function(hooks) { +module('Integration | Component | rose/form/helper-text', function (hooks) { setupRenderingTest(hooks); test('it renders', async function (assert) { diff --git a/addons/rose/tests/integration/components/rose/form/input-test.js b/addons/rose/tests/integration/components/rose/form/input-test.js index edea0f7aa..2f6c6cc56 100644 --- a/addons/rose/tests/integration/components/rose/form/input-test.js +++ b/addons/rose/tests/integration/components/rose/form/input-test.js @@ -80,7 +80,10 @@ module('Integration | Component | rose/form/input', function (hooks) { `); - assert.notOk(find('.rose-form-input'), 'The form field wrapper element is not present in contextual mode'); + assert.notOk( + find('.rose-form-input'), + 'The form field wrapper element is not present in contextual mode' + ); assert.ok(find('.rose-form-label.error')); assert.ok(find('.rose-form-helper-text.error')); assert.ok(find('.rose-form-input-field.error')); diff --git a/addons/rose/tests/integration/components/rose/form/label-test.js b/addons/rose/tests/integration/components/rose/form/label-test.js index 3a5298fb6..ac74b210c 100644 --- a/addons/rose/tests/integration/components/rose/form/label-test.js +++ b/addons/rose/tests/integration/components/rose/form/label-test.js @@ -3,7 +3,7 @@ import { setupRenderingTest } from 'ember-qunit'; import { render, find } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -module('Integration | Component | rose/form/label', function(hooks) { +module('Integration | Component | rose/form/label', function (hooks) { setupRenderingTest(hooks); test('it renders', async function (assert) { @@ -14,9 +14,6 @@ module('Integration | Component | rose/form/label', function(hooks) { `); assert.ok(find('.rose-form-label')); - assert.equal( - find('.rose-form-label').textContent.trim(), - 'Form Label' - ); + assert.equal(find('.rose-form-label').textContent.trim(), 'Form Label'); }); }); diff --git a/addons/rose/tests/integration/components/rose/list/key-value-test.js b/addons/rose/tests/integration/components/rose/list/key-value-test.js index 086bf9b64..38e10c345 100644 --- a/addons/rose/tests/integration/components/rose/list/key-value-test.js +++ b/addons/rose/tests/integration/components/rose/list/key-value-test.js @@ -3,10 +3,10 @@ import { setupRenderingTest } from 'ember-qunit'; import { render, find, findAll } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; -module('Integration | Component | rose/list/key-value', function(hooks) { +module('Integration | Component | rose/list/key-value', function (hooks) { setupRenderingTest(hooks); - test('it renders', async function(assert) { + test('it renders', async function (assert) { assert.expect(2); await render(hbs` @@ -20,10 +20,18 @@ module('Integration | Component | rose/list/key-value', function(hooks) { `); - const itemLabelledBy = find('.rose-list-key-value-item:first-child').getAttribute('aria-labelledby'); - assert.equal(findAll('.rose-list-key-value-item').length, 2, 'it has two items'); + const itemLabelledBy = find( + '.rose-list-key-value-item:first-child' + ).getAttribute('aria-labelledby'); + assert.equal( + findAll('.rose-list-key-value-item').length, + 2, + 'it has two items' + ); assert.ok( - find(`.rose-list-key-value-item:first-child > .rose-list-key-value-item-cell:first-child#${itemLabelledBy}`), + find( + `.rose-list-key-value-item:first-child > .rose-list-key-value-item-cell:first-child#${itemLabelledBy}` + ), 'The key cell has an ID associated with the `aria-labelledby` attribute of its parent item element' ); });