refactor: 💡 upgrade addons/rose to Ember 3.24
This commit is contained in:
56 files changed
+252
-165
No files matched your search
@@ -15,6 +15,7 @@
|
||||
main.js
|
||||
/coverage/
|
||||
!.*
|
||||
.eslintcache
|
||||
|
||||
# ember-try
|
||||
/.node_modules.ember-try/
|
||||
|
||||
+20
-15
@@ -7,51 +7,56 @@ module.exports = {
|
||||
ecmaVersion: 2018,
|
||||
sourceType: 'module',
|
||||
ecmaFeatures: {
|
||||
legacyDecorators: true
|
||||
}
|
||||
legacyDecorators: true,
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
'ember'
|
||||
],
|
||||
plugins: ['ember'],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:ember/recommended'
|
||||
'plugin:ember/recommended',
|
||||
'plugin:prettier/recommended',
|
||||
],
|
||||
env: {
|
||||
browser: true
|
||||
browser: true,
|
||||
},
|
||||
rules: {
|
||||
'ember/no-jquery': 'error',
|
||||
'ember/no-new-mixins': 0
|
||||
'ember/no-new-mixins': 0,
|
||||
'ember/no-get': 'off',
|
||||
'ember/no-get-with-default': 'off',
|
||||
'ember/no-computed-properties-in-native-classes': 'off',
|
||||
'ember/no-assignment-of-untracked-properties-used-in-tracking-contexts':
|
||||
'off',
|
||||
},
|
||||
overrides: [
|
||||
// node files
|
||||
{
|
||||
files: [
|
||||
'.eslintrc.js',
|
||||
'.prettierrc.js',
|
||||
'.template-lintrc.js',
|
||||
'ember-cli-build.js',
|
||||
'index.js',
|
||||
'testem.js',
|
||||
'blueprints/*/index.js',
|
||||
'config/**/*.js',
|
||||
'tests/dummy/config/**/*.js'
|
||||
'tests/dummy/config/**/*.js',
|
||||
],
|
||||
excludedFiles: [
|
||||
'addon/**',
|
||||
'addon-test-support/**',
|
||||
'app/**',
|
||||
'tests/dummy/app/**'
|
||||
'tests/dummy/app/**',
|
||||
],
|
||||
parserOptions: {
|
||||
sourceType: 'script'
|
||||
sourceType: 'script',
|
||||
},
|
||||
env: {
|
||||
browser: false,
|
||||
node: true
|
||||
node: true,
|
||||
},
|
||||
plugins: ['node'],
|
||||
extends: ['plugin:node/recommended']
|
||||
}
|
||||
]
|
||||
extends: ['plugin:node/recommended'],
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -10,6 +10,7 @@
|
||||
/.editorconfig
|
||||
/.ember-cli
|
||||
/.env*
|
||||
/.eslintcache
|
||||
/.eslintignore
|
||||
/.eslintrc.js
|
||||
/.git/
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# unconventional js
|
||||
/blueprints/*/files/
|
||||
/vendor/
|
||||
|
||||
# compiled output
|
||||
/dist/
|
||||
/tmp/
|
||||
|
||||
# dependencies
|
||||
/bower_components/
|
||||
/node_modules/
|
||||
|
||||
# misc
|
||||
/coverage/
|
||||
!.*
|
||||
.eslintcache
|
||||
|
||||
# ember-try
|
||||
/.node_modules.ember-try/
|
||||
/bower.json.ember-try
|
||||
/package.json.ember-try
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
singleQuote: true,
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
extends: 'octane'
|
||||
extends: 'octane',
|
||||
};
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
language: node_js
|
||||
node_js:
|
||||
# we recommend testing addons with the same minimum supported node version as Ember CLI
|
||||
# so that your addon works for all apps
|
||||
- "10"
|
||||
|
||||
dist: xenial
|
||||
|
||||
addons:
|
||||
chrome: stable
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.npm
|
||||
|
||||
env:
|
||||
global:
|
||||
# See https://git.io/vdao3 for details.
|
||||
- JOBS=1
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
# npm version tags
|
||||
- /^v\d+\.\d+\.\d+/
|
||||
|
||||
jobs:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- env: EMBER_TRY_SCENARIO=ember-canary
|
||||
|
||||
include:
|
||||
# runs linting and tests with current locked deps
|
||||
- stage: "Tests"
|
||||
name: "Tests"
|
||||
script:
|
||||
- npm run lint
|
||||
- npm run test:ember
|
||||
|
||||
- stage: "Additional Tests"
|
||||
name: "Floating Dependencies"
|
||||
install:
|
||||
- npm install --no-package-lock
|
||||
script:
|
||||
- npm run test:ember
|
||||
|
||||
# we recommend new addons test the current and previous LTS
|
||||
# as well as latest stable release (bonus points to beta/canary)
|
||||
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
|
||||
- env: EMBER_TRY_SCENARIO=ember-lts-3.20
|
||||
- env: EMBER_TRY_SCENARIO=ember-release
|
||||
- env: EMBER_TRY_SCENARIO=ember-beta
|
||||
- env: EMBER_TRY_SCENARIO=ember-canary
|
||||
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
|
||||
- env: EMBER_TRY_SCENARIO=ember-classic
|
||||
|
||||
script:
|
||||
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
|
||||
@@ -3,7 +3,6 @@ import { generateComponentID } from '../../../utilities/component-auto-id';
|
||||
import { action } from '@ember/object';
|
||||
|
||||
export default class RoseDialogComponent extends Component {
|
||||
|
||||
// =attributes
|
||||
|
||||
/**
|
||||
@@ -23,5 +22,4 @@ export default class RoseDialogComponent extends Component {
|
||||
dismiss(fn) {
|
||||
fn();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,6 @@ import Component from '@glimmer/component';
|
||||
import { computed, action } from '@ember/object';
|
||||
|
||||
export default class RoseDropdownComponent extends Component {
|
||||
|
||||
// =attributes
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,12 +3,10 @@ import { generateComponentID } from '../../../../utilities/component-auto-id';
|
||||
import { action } from '@ember/object';
|
||||
|
||||
export default class RoseDialogComponent extends Component {
|
||||
|
||||
// =attributes
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
id = generateComponentID();
|
||||
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
import Component from '@glimmer/component';
|
||||
|
||||
export default class RoseFooterCopyrightComponent extends Component {
|
||||
|
||||
// =attributes
|
||||
currentYear = new Date().getFullYear();
|
||||
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import { computed } from '@ember/object';
|
||||
* @cancel=(fn @cancel) />
|
||||
*/
|
||||
export default class RoseFormActionsComponent extends Component {
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
|
||||
@@ -2,9 +2,7 @@ import Component from '@glimmer/component';
|
||||
import { generateComponentID } from '../../../../utilities/component-auto-id';
|
||||
|
||||
export default class RoseFormCheckboxComponent extends Component {
|
||||
|
||||
// =attributes
|
||||
|
||||
id = generateComponentID();
|
||||
|
||||
}
|
||||
@@ -3,7 +3,6 @@ import { tracked } from '@glimmer/tracking';
|
||||
import { computed, action } from '@ember/object';
|
||||
|
||||
export default class RoseFormComponent extends Component {
|
||||
|
||||
// =attributes
|
||||
|
||||
/**
|
||||
@@ -57,9 +56,7 @@ export default class RoseFormComponent extends Component {
|
||||
// Since submit is allowed to fail in this context and we don't want
|
||||
// unhandled rejection warnings, we have a no-op catch.
|
||||
if (submitResult?.then) {
|
||||
submitResult
|
||||
.then(() => this.isEditable = false)
|
||||
.catch(() => {});
|
||||
submitResult.then(() => (this.isEditable = false)).catch(() => {});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -89,5 +86,4 @@ export default class RoseFormComponent extends Component {
|
||||
disableEdit() {
|
||||
this.isEditable = false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,9 +2,7 @@ import Component from '@glimmer/component';
|
||||
import { generateComponentID } from '../../../../utilities/component-auto-id';
|
||||
|
||||
export default class RoseFormInputComponent extends Component {
|
||||
|
||||
// =attributes
|
||||
|
||||
id = generateComponentID();
|
||||
|
||||
}
|
||||
@@ -2,9 +2,7 @@ import Component from '@glimmer/component';
|
||||
import { generateComponentID } from '../../../../../utilities/component-auto-id';
|
||||
|
||||
export default class RoseFormRadioRadioComponent extends Component {
|
||||
|
||||
// =attributes
|
||||
|
||||
id = generateComponentID();
|
||||
|
||||
}
|
||||
@@ -2,9 +2,7 @@ import Component from '@glimmer/component';
|
||||
import { generateComponentID } from '../../../../utilities/component-auto-id';
|
||||
|
||||
export default class RoseFormSelectComponent extends Component {
|
||||
|
||||
// =attributes
|
||||
|
||||
id = generateComponentID();
|
||||
|
||||
}
|
||||
@@ -2,9 +2,7 @@ import Component from '@glimmer/component';
|
||||
import { generateComponentID } from '../../../../utilities/component-auto-id';
|
||||
|
||||
export default class RoseFormTextareaComponent extends Component {
|
||||
|
||||
// =attributes
|
||||
|
||||
id = generateComponentID();
|
||||
|
||||
}
|
||||
@@ -2,9 +2,7 @@ import Component from '@glimmer/component';
|
||||
import { generateComponentID } from '../../../../../utilities/component-auto-id';
|
||||
|
||||
export default class RoseListKeyValueItemComponent extends Component {
|
||||
|
||||
// =attributes
|
||||
|
||||
id = generateComponentID();
|
||||
|
||||
}
|
||||
@@ -2,9 +2,7 @@ import Component from '@glimmer/component';
|
||||
import { generateComponentID } from '../../../../utilities/component-auto-id';
|
||||
|
||||
export default class RoseNavSidebarComponent extends Component {
|
||||
|
||||
// =attributes
|
||||
|
||||
id = generateComponentID();
|
||||
|
||||
}
|
||||
@@ -2,7 +2,6 @@ import Component from '@glimmer/component';
|
||||
import { computed } from '@ember/object';
|
||||
|
||||
export default class RoseNotificationComponent extends Component {
|
||||
|
||||
/**
|
||||
* Returns an icon name based on the notification style.
|
||||
* @type {string}
|
||||
@@ -25,5 +24,4 @@ export default class RoseNotificationComponent extends Component {
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -140,7 +140,7 @@ $xxxxs: sizing.rems(xxxxs); // 1
|
||||
}
|
||||
// overlay
|
||||
.rose-dialog-modal-overlay {
|
||||
content: " ";
|
||||
content: ' ';
|
||||
background-color: var(--black);
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
$xxxs: sizing.rems(xxxs); // 2
|
||||
|
||||
.rose-card-link {
|
||||
|
||||
--background-color-light: transparent;
|
||||
--background-color-dark: var(--ui-gray-subtler-6);
|
||||
|
||||
--background-color: var(--background-color-light);
|
||||
|
||||
|
||||
.ember-application.rose-theme-light & {
|
||||
--background-color: var(--background-color-light);
|
||||
}
|
||||
@@ -124,7 +123,7 @@ $xxxs: sizing.rems(xxxs); // 2
|
||||
margin: 0;
|
||||
|
||||
&::before {
|
||||
content: "ID";
|
||||
content: 'ID';
|
||||
color: var(--stark);
|
||||
padding-right: sizing.rems(xs);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
margin: 0;
|
||||
$line-height: 36 / 14;
|
||||
line-height: $line-height;
|
||||
color: var(--ui-gray)
|
||||
color: var(--ui-gray);
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,6 @@
|
||||
@import 'dropdown';
|
||||
|
||||
.rose-header {
|
||||
|
||||
--box-shadow-light: none;
|
||||
--box-shadow-dark: inset 0 -#{sizing.rems(xxxxs)} 0 var(--ui-border-subtler-1);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
[class*="rose-button"] {
|
||||
[class*='rose-button'] {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
@@ -7,23 +7,23 @@
|
||||
$size-coefficients: (
|
||||
xxl: 3,
|
||||
// 48
|
||||
xl: 2.25,
|
||||
xl: 2.25,
|
||||
// 36
|
||||
l: 1.5,
|
||||
l: 1.5,
|
||||
// 24
|
||||
m: 1,
|
||||
m: 1,
|
||||
// 16 - base
|
||||
s: 0.75,
|
||||
s: 0.75,
|
||||
// 12
|
||||
xs: 0.5,
|
||||
xs: 0.5,
|
||||
// 8
|
||||
off-xs: 0.3125,
|
||||
off-xs: 0.3125,
|
||||
// 5
|
||||
xxs: 0.25,
|
||||
xxs: 0.25,
|
||||
// 4
|
||||
xxxs: 0.125,
|
||||
xxxs: 0.125,
|
||||
// 2
|
||||
xxxxs: 0.0625,
|
||||
xxxxs: 0.0625,
|
||||
// 1
|
||||
);
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ $base-font-size: 16;
|
||||
$font-sizes: (
|
||||
xl: sizing.size(m) * 1.75,
|
||||
// 28
|
||||
l: sizing.size(m) * 1.25,
|
||||
l: sizing.size(m) * 1.25,
|
||||
// 20
|
||||
m: sizing.size(m),
|
||||
m: sizing.size(m),
|
||||
// 16
|
||||
s: sizing.size(m) * 0.875,
|
||||
s: sizing.size(m) * 0.875,
|
||||
// 14
|
||||
xs: sizing.size(m) * 0.75,
|
||||
xs: sizing.size(m) * 0.75,
|
||||
// 12
|
||||
h1: sizing.size(m) * 1.75,
|
||||
h1: sizing.size(m) * 1.75,
|
||||
// 28
|
||||
h2: sizing.size(m) * 1.25,
|
||||
h2: sizing.size(m) * 1.25,
|
||||
// 20
|
||||
h3: sizing.size(m),
|
||||
h3: sizing.size(m),
|
||||
// 16
|
||||
button: sizing.size(m) * 0.8125,
|
||||
button: sizing.size(m) * 0.8125,
|
||||
// 13
|
||||
);
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/dialog';
|
||||
export { default } from 'rose/components/rose/dialog';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/dialog/body';
|
||||
export { default } from 'rose/components/rose/dialog/body';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/dropdown/section';
|
||||
export { default } from 'rose/components/rose/dropdown/section';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/footer';
|
||||
export { default } from 'rose/components/rose/footer';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/footer/brand';
|
||||
export { default } from 'rose/components/rose/footer/brand';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/footer/copyright';
|
||||
export { default } from 'rose/components/rose/footer/copyright';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/footer/nav';
|
||||
export { default } from 'rose/components/rose/footer/nav';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/footer/nav/link';
|
||||
export { default } from 'rose/components/rose/footer/nav/link';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/footer/product';
|
||||
export { default } from 'rose/components/rose/footer/product';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/form/actions/edit-toggle';
|
||||
export { default } from 'rose/components/rose/form/actions/edit-toggle';
|
||||
@@ -6,14 +6,6 @@ module.exports = async function () {
|
||||
return {
|
||||
useYarn: true,
|
||||
scenarios: [
|
||||
{
|
||||
name: 'ember-lts-3.12',
|
||||
npm: {
|
||||
devDependencies: {
|
||||
'ember-source': '~3.12.0',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'ember-lts-3.16',
|
||||
npm: {
|
||||
@@ -26,9 +18,9 @@ module.exports = async function () {
|
||||
name: 'ember-lts-3.20',
|
||||
npm: {
|
||||
devDependencies: {
|
||||
'ember-source': '~3.20.5'
|
||||
}
|
||||
}
|
||||
'ember-source': '~3.20.5',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'ember-release',
|
||||
@@ -63,9 +55,9 @@ module.exports = async function () {
|
||||
},
|
||||
npm: {
|
||||
devDependencies: {
|
||||
'@ember/jquery': '^1.1.0'
|
||||
}
|
||||
}
|
||||
'@ember/jquery': '^1.1.0',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'ember-classic',
|
||||
|
||||
+29
-21
@@ -10,13 +10,16 @@
|
||||
"scripts": {
|
||||
"build:development": "ember build",
|
||||
"build": "ember build --environment=production",
|
||||
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
|
||||
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'",
|
||||
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
|
||||
"lint:hbs": "ember-template-lint .",
|
||||
"lint:hbs:fix": "ember-template-lint . --fix",
|
||||
"lint:js": "eslint .",
|
||||
"lint:sass": "sass-lint -v -q",
|
||||
"format": "npm run format:js && npm run format:sass",
|
||||
"format:js": "prettier --write '{addon,app,config,stories,tests}/**/*.js' *.js",
|
||||
"format:sass": "prettier --write addon/**/*.scss",
|
||||
"lint:js:fix": "eslint . --fix",
|
||||
"start": "ember serve",
|
||||
"test": "ember test",
|
||||
"test:ember-compatibility": "ember try:each",
|
||||
@@ -27,17 +30,18 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-loader": "^8.1.0",
|
||||
"ember-cli-babel": "^7.21.0",
|
||||
"ember-cli-htmlbars": "^5.2.0",
|
||||
"ember-cli-babel": "^7.23.0",
|
||||
"ember-cli-htmlbars": "^5.3.1",
|
||||
"ember-focus-trap": "^0.4.0",
|
||||
"ember-radio-button": "^2.0.1",
|
||||
"ember-uuid": "^2.1.0",
|
||||
"emberx-select": "github:adopted-ember-addons/emberx-select#bc5f774",
|
||||
"ember-focus-trap": "^0.4.0"
|
||||
"emberx-select": "github:adopted-ember-addons/emberx-select#bc5f774"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ember/optional-features": "^1.3.0",
|
||||
"@glimmer/component": "^1.0.1",
|
||||
"@glimmer/tracking": "^1.0.0",
|
||||
"@ember/optional-features": "^2.0.0",
|
||||
"@ember/test-helpers": "^2.1.4",
|
||||
"@glimmer/component": "^1.0.3",
|
||||
"@glimmer/tracking": "^1.0.3",
|
||||
"@hashicorp/structure-icons": "^1.8.1",
|
||||
"@storybook/addon-actions": "^6.0.26",
|
||||
"@storybook/addon-docs": "^6.0.26",
|
||||
@@ -47,33 +51,37 @@
|
||||
"babel-eslint": "^10.1.0",
|
||||
"broccoli-asset-rev": "^3.0.0",
|
||||
"doctoc": "^1.4.0",
|
||||
"ember-auto-import": "^1.6.0",
|
||||
"ember-cli": "~3.20.2",
|
||||
"ember-auto-import": "^1.10.1",
|
||||
"ember-cli": "~3.24.0",
|
||||
"ember-cli-dependency-checker": "^3.2.0",
|
||||
"ember-cli-inject-live-reload": "^2.0.2",
|
||||
"ember-cli-sass": "^10.0.1",
|
||||
"ember-cli-sri": "^2.1.1",
|
||||
"ember-cli-uglify": "^3.0.0",
|
||||
"ember-cli-terser": "^4.0.1",
|
||||
"ember-cli-update": "^0.54.6",
|
||||
"ember-disable-prototype-extensions": "^1.1.3",
|
||||
"ember-export-application-global": "^2.0.1",
|
||||
"ember-inline-svg": "^1.0.0",
|
||||
"ember-load-initializers": "^2.1.1",
|
||||
"ember-load-initializers": "^2.1.2",
|
||||
"ember-maybe-import-regenerator": "^0.1.6",
|
||||
"ember-modifier": "^1.0.3",
|
||||
"ember-qunit": "^4.6.0",
|
||||
"ember-resolver": "^8.0.0",
|
||||
"ember-source": "~3.20.2",
|
||||
"ember-source-channel-url": "^2.0.1",
|
||||
"ember-template-lint": "^2.9.1",
|
||||
"ember-page-title": "^6.0.3",
|
||||
"ember-qunit": "^5.1.1",
|
||||
"ember-resolver": "^8.0.2",
|
||||
"ember-source": "~3.24.0",
|
||||
"ember-source-channel-url": "^3.0.0",
|
||||
"ember-template-lint": "^2.15.0",
|
||||
"ember-try": "^1.4.0",
|
||||
"eslint": "^7.5.0",
|
||||
"eslint-plugin-ember": "^8.9.1",
|
||||
"eslint": "^7.17.0",
|
||||
"eslint-config-prettier": "^7.1.0",
|
||||
"eslint-plugin-ember": "^10.1.1",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-prettier": "^3.3.1",
|
||||
"loader.js": "^4.7.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.0.5",
|
||||
"qunit-dom": "^1.2.0",
|
||||
"prettier": "^2.2.1",
|
||||
"qunit": "^2.13.0",
|
||||
"qunit-dom": "^1.6.0",
|
||||
"sass": "^1.26.5",
|
||||
"sass-lint": "^1.13.1"
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "ember-cli",
|
||||
"version": "3.20.2",
|
||||
"version": "3.24.0",
|
||||
"blueprints": [
|
||||
{
|
||||
"name": "addon",
|
||||
|
||||
@@ -21,6 +21,13 @@
|
||||
{{content-for "body"}}
|
||||
{{content-for "test-body"}}
|
||||
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture">
|
||||
<div id="ember-testing-container">
|
||||
<div id="ember-testing"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/testem.js" integrity=""></script>
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
<script src="{{rootURL}}assets/test-support.js"></script>
|
||||
|
||||
@@ -41,7 +41,9 @@ module('Integration | Component | rose/card/link', function (hooks) {
|
||||
});
|
||||
|
||||
test('it renders with @icon', async function (assert) {
|
||||
await render(hbs`<Rose::Card::Link @title="foo" @icon="alert-circle-outline" />`);
|
||||
await render(
|
||||
hbs`<Rose::Card::Link @title="foo" @icon="alert-circle-outline" />`
|
||||
);
|
||||
assert.ok(find('.rose-icon'));
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find, click } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | rose/dialog', function(hooks) {
|
||||
module('Integration | Component | rose/dialog', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders and handles dismiss actions', async function (assert) {
|
||||
@@ -24,5 +24,4 @@ module('Integration | Component | rose/dialog', function(hooks) {
|
||||
assert.ok(find('.rose-dialog-footer'));
|
||||
await click('button');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -3,10 +3,10 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | rose/dialog/body', function(hooks) {
|
||||
module('Integration | Component | rose/dialog/body', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function(assert) {
|
||||
test('it renders', async function (assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | rose/dropdown/section', function(hooks) {
|
||||
module('Integration | Component | rose/dropdown/section', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function(assert) {
|
||||
test('it renders', async function (assert) {
|
||||
await render(hbs`
|
||||
<Rose::Dropdown::Section>
|
||||
template block text
|
||||
@@ -16,12 +16,15 @@ module('Integration | Component | rose/dropdown/section', function(hooks) {
|
||||
assert.equal(this.element.textContent.trim(), 'template block text');
|
||||
});
|
||||
|
||||
test('it renders with optional @title', async function(assert) {
|
||||
test('it renders with optional @title', async function (assert) {
|
||||
await render(hbs`
|
||||
<Rose::Dropdown::Section @title="Section Title">
|
||||
template block text
|
||||
</Rose::Dropdown::Section>
|
||||
`);
|
||||
assert.equal(find('.rose-dropdown-section-title').textContent.trim(), 'Section Title');
|
||||
assert.equal(
|
||||
find('.rose-dropdown-section-title').textContent.trim(),
|
||||
'Section Title'
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -3,9 +3,9 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | rose/footer', function(hooks) {
|
||||
module('Integration | Component | rose/footer', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
assert.expect(4);
|
||||
await render(hbs`<Rose::Footer />`);
|
||||
@@ -38,5 +38,4 @@ module('Integration | Component | rose/footer', function(hooks) {
|
||||
</Rose::Footer>`);
|
||||
assert.ok(find('.rose-footer-text'));
|
||||
});
|
||||
|
||||
});
|
||||
@@ -3,7 +3,7 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find, findAll } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | rose/footer/nav', function(hooks) {
|
||||
module('Integration | Component | rose/footer/nav', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
@@ -20,5 +20,4 @@ module('Integration | Component | rose/footer/nav', function(hooks) {
|
||||
</Rose::Footer::nav>`);
|
||||
assert.equal(findAll('a').length, 2);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -3,7 +3,7 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | rose/footer/nav/link', function(hooks) {
|
||||
module('Integration | Component | rose/footer/nav/link', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders with @href', async function (assert) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | rose/footer/text', function(hooks) {
|
||||
module('Integration | Component | rose/footer/text', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
|
||||
@@ -69,7 +69,10 @@ module('Integration | Component | rose/form', function (hooks) {
|
||||
test('it supports an editability toggle when @showEditToggle is true', async function (assert) {
|
||||
assert.expect(12);
|
||||
this.cancel = () => {
|
||||
assert.ok(true, 'cancel function may still be passed even for @showEditToggle');
|
||||
assert.ok(
|
||||
true,
|
||||
'cancel function may still be passed even for @showEditToggle'
|
||||
);
|
||||
};
|
||||
this.submit = () => {};
|
||||
await render(hbs`
|
||||
@@ -96,7 +99,10 @@ module('Integration | Component | rose/form', function (hooks) {
|
||||
assert.equal(findAll('input[disabled]').length, 0);
|
||||
assert.equal(findAll('button').length, 2);
|
||||
assert.equal(find('[type="submit"]').textContent.trim(), 'Save');
|
||||
assert.equal(find('button:not([type="submit"])').textContent.trim(), 'Cancel');
|
||||
assert.equal(
|
||||
find('button:not([type="submit"])').textContent.trim(),
|
||||
'Cancel'
|
||||
);
|
||||
// After canceling, fields are disabled again and the edit mode button is displayed
|
||||
await click('button:not([type="submit"])');
|
||||
assert.equal(findAll('input[disabled]').length, 1);
|
||||
@@ -131,13 +137,19 @@ module('Integration | Component | rose/form', function (hooks) {
|
||||
assert.equal(findAll('input[disabled]').length, 0);
|
||||
assert.equal(findAll('button').length, 2);
|
||||
assert.equal(find('[type="submit"]').textContent.trim(), 'Save');
|
||||
assert.equal(find('button:not([type="submit"])').textContent.trim(), 'Cancel');
|
||||
assert.equal(
|
||||
find('button:not([type="submit"])').textContent.trim(),
|
||||
'Cancel'
|
||||
);
|
||||
// After saving with failure, fields are enabled and save/cancel buttons are displayed
|
||||
this.submit = () => reject();
|
||||
assert.equal(findAll('input[disabled]').length, 0);
|
||||
assert.equal(findAll('button').length, 2);
|
||||
assert.equal(find('[type="submit"]').textContent.trim(), 'Save');
|
||||
assert.equal(find('button:not([type="submit"])').textContent.trim(), 'Cancel');
|
||||
assert.equal(
|
||||
find('button:not([type="submit"])').textContent.trim(),
|
||||
'Cancel'
|
||||
);
|
||||
// After saving with success, fields are disabled again and the edit mode button is displayed
|
||||
this.submit = () => resolve();
|
||||
await click('button[type="submit"]');
|
||||
|
||||
@@ -17,7 +17,9 @@ module('Integration | Component | rose/form/actions', function (hooks) {
|
||||
test('it can disable the buttons', async function (assert) {
|
||||
assert.expect(2);
|
||||
this.cancel = () => {};
|
||||
await render(hbs`{{rose/form/actions cancel=this.cancel submitDisabled=true cancelDisabled=true}}`);
|
||||
await render(
|
||||
hbs`{{rose/form/actions cancel=this.cancel submitDisabled=true cancelDisabled=true}}`
|
||||
);
|
||||
assert.ok(find('[type="submit"]:disabled'));
|
||||
assert.ok(find('button:not([type="submit"]):disabled'));
|
||||
});
|
||||
|
||||
@@ -3,20 +3,27 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find, click } from '@ember/test-helpers';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
module('Integration | Component | rose/form/actions/edit-toggle', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
module(
|
||||
'Integration | Component | rose/form/actions/edit-toggle',
|
||||
function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders a regular button', async function (assert) {
|
||||
assert.expect(1);
|
||||
this.enableEdit = () => {};
|
||||
await render(hbs`{{rose/form/actions/edit-toggle enableEdit=this.enableEdit}}`);
|
||||
assert.ok(find('button'));
|
||||
});
|
||||
test('it renders a regular button', async function (assert) {
|
||||
assert.expect(1);
|
||||
this.enableEdit = () => {};
|
||||
await render(
|
||||
hbs`{{rose/form/actions/edit-toggle enableEdit=this.enableEdit}}`
|
||||
);
|
||||
assert.ok(find('button'));
|
||||
});
|
||||
|
||||
test('it executes a function on button click', async function (assert) {
|
||||
assert.expect(1);
|
||||
this.enableEdit = () => assert.ok(true, 'edit was clicked');
|
||||
await render(hbs`{{rose/form/actions/edit-toggle enableEdit=this.enableEdit}}`);
|
||||
await click('button');
|
||||
});
|
||||
});
|
||||
test('it executes a function on button click', async function (assert) {
|
||||
assert.expect(1);
|
||||
this.enableEdit = () => assert.ok(true, 'edit was clicked');
|
||||
await render(
|
||||
hbs`{{rose/form/actions/edit-toggle enableEdit=this.enableEdit}}`
|
||||
);
|
||||
await click('button');
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,8 +1,12 @@
|
||||
import Application from 'dummy/app';
|
||||
import config from 'dummy/config/environment';
|
||||
import * as QUnit from 'qunit';
|
||||
import { setApplication } from '@ember/test-helpers';
|
||||
import { setup } from 'qunit-dom';
|
||||
import { start } from 'ember-qunit';
|
||||
|
||||
setApplication(Application.create(config.APP));
|
||||
|
||||
setup(QUnit.assert);
|
||||
|
||||
start();
|
||||
+2
-1
@@ -55,7 +55,8 @@
|
||||
"caniuse-lite": "^1.0.30001157",
|
||||
"immer": "^8.0.1",
|
||||
"node-notifier": "^8.0.1",
|
||||
"highlight.js": "^10.4.1"
|
||||
"highlight.js": "^10.4.1",
|
||||
"hoek": "~4.2.0"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
|
||||
@@ -9750,7 +9750,7 @@ ember-source@~3.24.0:
|
||||
semver "^6.1.1"
|
||||
silent-error "^1.1.1"
|
||||
|
||||
ember-template-lint@^2.0.1, ember-template-lint@^2.14.0, ember-template-lint@^2.9.1:
|
||||
ember-template-lint@^2.0.1, ember-template-lint@^2.14.0:
|
||||
version "2.18.0"
|
||||
resolved "https://registry.yarnpkg.com/ember-template-lint/-/ember-template-lint-2.18.0.tgz#cba7665c2ff3c34734285768d7bf41cdd08ffb3f"
|
||||
integrity sha512-4J1Dk2ZaMo/nqtP4QJF+25yYnKNOewE8xopSRNGjgQpNwaUFZmZCtzJtoSJF6+SRLcMDljnewXRezugok4ljug==
|
||||
@@ -12665,21 +12665,11 @@ hmac-drbg@^1.0.0:
|
||||
minimalistic-assert "^1.0.0"
|
||||
minimalistic-crypto-utils "^1.0.1"
|
||||
|
||||
hoek@2.x.x:
|
||||
version "2.16.3"
|
||||
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
|
||||
integrity sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=
|
||||
|
||||
hoek@4.x.x:
|
||||
hoek@2.x.x, hoek@4.x.x, hoek@6.x.x, hoek@~4.2.0:
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb"
|
||||
integrity sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==
|
||||
|
||||
hoek@6.x.x:
|
||||
version "6.1.3"
|
||||
resolved "https://registry.yarnpkg.com/hoek/-/hoek-6.1.3.tgz#73b7d33952e01fe27a38b0457294b79dd8da242c"
|
||||
integrity sha512-YXXAAhmF9zpQbC7LEcREFtXfGq5K1fmd+4PHkBq8NUqmzW3G+Dq10bI/i0KucLRwss3YYFQ0fSfoxBZYiGUqtQ==
|
||||
|
||||
hoist-non-react-statics@^3.3.0:
|
||||
version "3.3.2"
|
||||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
|
||||
@@ -17792,7 +17782,7 @@ prettier-linter-helpers@^1.0.0:
|
||||
dependencies:
|
||||
fast-diff "^1.1.2"
|
||||
|
||||
prettier@^2.0.5, prettier@^2.1.2, prettier@^2.2.1:
|
||||
prettier@^2.1.2, prettier@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
|
||||
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
|
||||
|
||||
Reference in new issue
Block a user