refactor: 💡 upgrade ui/admin to Ember 3.24
This commit is contained in:
43 files changed
+340
-266
No files matched your search
@@ -13,6 +13,7 @@
|
||||
# misc
|
||||
/coverage/
|
||||
!.*
|
||||
.eslintcache
|
||||
|
||||
# ember-try
|
||||
/.node_modules.ember-try/
|
||||
|
||||
+21
-15
@@ -7,47 +7,53 @@ 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-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',
|
||||
},
|
||||
rules: {},
|
||||
overrides: [
|
||||
// node files
|
||||
{
|
||||
files: [
|
||||
'.eslintrc.js',
|
||||
'.prettierrc.js',
|
||||
'.template-lintrc.js',
|
||||
'ember-cli-build.js',
|
||||
'testem.js',
|
||||
'blueprints/*/index.js',
|
||||
'config/**/*.js',
|
||||
'lib/*/index.js',
|
||||
'server/**/*.js'
|
||||
'server/**/*.js',
|
||||
],
|
||||
parserOptions: {
|
||||
sourceType: 'script'
|
||||
sourceType: 'script',
|
||||
},
|
||||
env: {
|
||||
browser: false,
|
||||
node: true
|
||||
node: true,
|
||||
},
|
||||
plugins: ['node'],
|
||||
extends: ['plugin:node/recommended'],
|
||||
rules: {
|
||||
// this can be removed once the following is fixed
|
||||
// https://github.com/mysticatea/eslint-plugin-node/issues/77
|
||||
'node/no-unpublished-require': 'off'
|
||||
}
|
||||
}
|
||||
]
|
||||
'node/no-unpublished-require': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -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,
|
||||
};
|
||||
@@ -4,7 +4,17 @@ module.exports = {
|
||||
extends: 'octane',
|
||||
rules: {
|
||||
'no-bare-strings': true,
|
||||
'no-curly-component-invocation': { allow: ['app-name', 'company-name', 'company-copyright'] },
|
||||
'no-implicit-this': { allow: ['app-name', 'company-name', 'company-copyright', 'doc-url', 'is-loading'] }
|
||||
}
|
||||
'no-curly-component-invocation': {
|
||||
allow: ['app-name', 'company-name', 'company-copyright'],
|
||||
},
|
||||
'no-implicit-this': {
|
||||
allow: [
|
||||
'app-name',
|
||||
'company-name',
|
||||
'company-copyright',
|
||||
'doc-url',
|
||||
'is-loading',
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -2,7 +2,7 @@
|
||||
id={{this.id}}
|
||||
class="copyable"
|
||||
{{did-insert this.register}}
|
||||
{{will-destroy this.destroy}}
|
||||
{{will-destroy this.tearDown}}
|
||||
>
|
||||
|
||||
{{#if this.copied}}
|
||||
|
||||
@@ -36,6 +36,7 @@ export default class CopyableComponent extends Component {
|
||||
this.copied = true;
|
||||
yield timeout(1000);
|
||||
this.copied = false;
|
||||
/* eslint-disable-next-line prettier/prettier */
|
||||
}).drop() confirmCopyTimer;
|
||||
|
||||
/**
|
||||
@@ -53,7 +54,7 @@ export default class CopyableComponent extends Component {
|
||||
*/
|
||||
@action
|
||||
register() {
|
||||
this.destroy();
|
||||
this.tearDown();
|
||||
/* istanbul ignore next */
|
||||
this.clipboard = new ClipboardJS(`#${this.copyableButtonId}`, {
|
||||
text: () => this.args.text,
|
||||
@@ -69,7 +70,7 @@ export default class CopyableComponent extends Component {
|
||||
* Destroy ClipboardJS library instance and cancel icon timer.
|
||||
*/
|
||||
@action
|
||||
destroy() {
|
||||
tearDown() {
|
||||
this.clipboard?.destroy();
|
||||
this.clipboard = null;
|
||||
this.confirmCopyTimer.cancelAll();
|
||||
|
||||
@@ -70,6 +70,7 @@ export default class ScopesScopeRoute extends Route {
|
||||
// Update the controller (if exists), since setupController is only
|
||||
// called once the first time the route is activated. It is not called
|
||||
// again on route refreshes.
|
||||
/* eslint-disable-next-line ember/no-controller-access-in-routes */
|
||||
if (this.controller) this.setControllerProperties(this.scopes);
|
||||
}
|
||||
|
||||
@@ -87,6 +88,7 @@ export default class ScopesScopeRoute extends Route {
|
||||
* @param {array} scopes
|
||||
*/
|
||||
setControllerProperties(scopes) {
|
||||
/* eslint-disable-next-line ember/no-controller-access-in-routes */
|
||||
this.controller.setProperties({ scopes });
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -2,10 +2,7 @@ import Route from '@ember/routing/route';
|
||||
import { action } from '@ember/object';
|
||||
import { inject as service } from '@ember/service';
|
||||
import loading from 'ember-loading/decorator';
|
||||
import {
|
||||
notifySuccess,
|
||||
notifyError,
|
||||
} from 'core/decorators/notify';
|
||||
import { notifySuccess, notifyError } from 'core/decorators/notify';
|
||||
|
||||
export default class ScopesScopeAuthMethodsAuthMethodAccountsAccountSettingsRoute extends Route {
|
||||
// =services
|
||||
|
||||
@@ -5,8 +5,8 @@ export default class ScopesScopeAuthMethodsNewRoute extends Route {
|
||||
|
||||
queryParams = {
|
||||
type: {
|
||||
refreshModel: true
|
||||
}
|
||||
refreshModel: true,
|
||||
},
|
||||
};
|
||||
|
||||
// =methods
|
||||
|
||||
@@ -37,12 +37,10 @@ export default class ScopesScopeAuthenticateMethodRoute extends Route {
|
||||
const authMethod = this.modelFor('scopes.scope.authenticate.method');
|
||||
const authenticatorName = `authenticator:${authMethod.type}`;
|
||||
const requestCookies = false;
|
||||
await this.session.authenticate(
|
||||
authenticatorName,
|
||||
creds,
|
||||
requestCookies,
|
||||
{ scope, authMethod }
|
||||
);
|
||||
await this.session.authenticate(authenticatorName, creds, requestCookies, {
|
||||
scope,
|
||||
authMethod,
|
||||
});
|
||||
this.transitionTo('index');
|
||||
}
|
||||
}
|
||||
+1
-4
@@ -3,10 +3,7 @@ import { inject as service } from '@ember/service';
|
||||
import { action } from '@ember/object';
|
||||
import { hash } from 'rsvp';
|
||||
import loading from 'ember-loading/decorator';
|
||||
import {
|
||||
notifySuccess,
|
||||
notifyError,
|
||||
} from 'core/decorators/notify';
|
||||
import { notifySuccess, notifyError } from 'core/decorators/notify';
|
||||
|
||||
export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetAddHostsRoute extends Route {
|
||||
// =services
|
||||
|
||||
+1
-4
@@ -2,10 +2,7 @@ import Route from '@ember/routing/route';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { action } from '@ember/object';
|
||||
import loading from 'ember-loading/decorator';
|
||||
import {
|
||||
notifySuccess,
|
||||
notifyError,
|
||||
} from 'core/decorators/notify';
|
||||
import { notifySuccess, notifyError } from 'core/decorators/notify';
|
||||
|
||||
export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetCreateAndAddHostRoute extends Route {
|
||||
// =services
|
||||
|
||||
+1
-4
@@ -4,10 +4,7 @@ import { action } from '@ember/object';
|
||||
import { inject as service } from '@ember/service';
|
||||
import loading from 'ember-loading/decorator';
|
||||
import { confirm } from 'core/decorators/confirm';
|
||||
import {
|
||||
notifySuccess,
|
||||
notifyError,
|
||||
} from 'core/decorators/notify';
|
||||
import { notifySuccess, notifyError } from 'core/decorators/notify';
|
||||
|
||||
export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetHostsRoute extends Route {
|
||||
// =services
|
||||
|
||||
@@ -19,7 +19,7 @@ export default class ScopesScopeRolesRoleIndexRoute extends Route {
|
||||
subScopes,
|
||||
},
|
||||
];
|
||||
this.set('grantScopes', grantScopes);
|
||||
this.grantScopes = grantScopes;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,6 +34,7 @@ export default class ScopesScopeSessionsRoute extends Route {
|
||||
yield timeout(POLL_TIMEOUT_SECONDS * 1000);
|
||||
yield this.refresh();
|
||||
}
|
||||
/* eslint-disable-next-line prettier/prettier */
|
||||
}).drop() poller;
|
||||
|
||||
// =methods
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "ember-cli",
|
||||
"version": "3.20.2",
|
||||
"version": "3.24.0",
|
||||
"blueprints": [
|
||||
{
|
||||
"name": "app",
|
||||
|
||||
@@ -81,8 +81,8 @@ module.exports = function (environment) {
|
||||
},
|
||||
|
||||
'ember-cli-mirage': {
|
||||
directory: '../../addons/api/mirage'
|
||||
}
|
||||
directory: '../../addons/api/mirage',
|
||||
},
|
||||
};
|
||||
|
||||
// Unsafe policy is necessary in development and test environments, but should
|
||||
|
||||
@@ -5,7 +5,7 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
||||
module.exports = function (defaults) {
|
||||
let app = new EmberApp(defaults, {
|
||||
'ember-cli-babel': {
|
||||
includeExternalHelpers: true
|
||||
includeExternalHelpers: true,
|
||||
},
|
||||
babel: {
|
||||
sourceMaps: 'inline',
|
||||
@@ -22,10 +22,8 @@ module.exports = function (defaults) {
|
||||
importCss: false,
|
||||
},
|
||||
svg: {
|
||||
paths: [
|
||||
'../../addons/core/public'
|
||||
]
|
||||
}
|
||||
paths: ['../../addons/core/public'],
|
||||
},
|
||||
});
|
||||
|
||||
// Only import when in development or test mode
|
||||
|
||||
+27
-19
@@ -13,13 +13,16 @@
|
||||
"doc:toc": "doctoc README.md",
|
||||
"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-all format:*",
|
||||
"format:js": "prettier --write '{app,config,stories,tests}/**/*.js' *.js",
|
||||
"format:sass": "prettier --write app/**/*.scss",
|
||||
"lint:js:fix": "eslint . --fix",
|
||||
"start": "ember serve",
|
||||
"clean:coverage": "rm -rf coverage_*",
|
||||
"pretest": "yarn clean:coverage",
|
||||
@@ -29,10 +32,11 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.9.6",
|
||||
"@ember/optional-features": "^1.3.0",
|
||||
"@ember/optional-features": "^2.0.0",
|
||||
"@ember/render-modifiers": "^1.0.2",
|
||||
"@glimmer/component": "^1.0.1",
|
||||
"@glimmer/tracking": "^1.0.0",
|
||||
"@ember/test-helpers": "^2.1.4",
|
||||
"@glimmer/component": "^1.0.3",
|
||||
"@glimmer/tracking": "^1.0.3",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-loader": "^8.1.0",
|
||||
"broccoli-asset-rev": "^3.0.0",
|
||||
@@ -40,41 +44,45 @@
|
||||
"core": "*",
|
||||
"doctoc": "^1.4.0",
|
||||
"ember-a11y-testing": "^3.0.0",
|
||||
"ember-auto-import": "^1.6.0",
|
||||
"ember-auto-import": "^1.10.1",
|
||||
"ember-breadcrumbs": "^0.2.3",
|
||||
"ember-cli": "~3.20.2",
|
||||
"ember-cli-app-version": "^3.2.0",
|
||||
"ember-cli-babel": "^7.21.0",
|
||||
"ember-cli": "~3.24.0",
|
||||
"ember-cli-app-version": "^4.0.0",
|
||||
"ember-cli-babel": "^7.23.0",
|
||||
"ember-cli-code-coverage": "^1.0.2",
|
||||
"ember-cli-content-security-policy": "^1.1.1",
|
||||
"ember-cli-dependency-checker": "^3.2.0",
|
||||
"ember-cli-htmlbars": "^5.2.0",
|
||||
"ember-cli-htmlbars": "^5.3.1",
|
||||
"ember-cli-inject-live-reload": "^2.0.2",
|
||||
"ember-cli-sass": "^10.0.1",
|
||||
"ember-cli-sri": "^2.1.1",
|
||||
"ember-cli-template-lint": "^2.0.2",
|
||||
"ember-cli-uglify": "^3.0.0",
|
||||
"ember-cli-terser": "^4.0.1",
|
||||
"ember-cli-update": "^0.54.6",
|
||||
"ember-concurrency": "^1.3.0",
|
||||
"ember-exam": "^6.0.1",
|
||||
"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": "^2.1.1",
|
||||
"ember-notify": "^6.0.0",
|
||||
"ember-qunit": "^4.6.0",
|
||||
"ember-resolver": "^8.0.0",
|
||||
"ember-source": "~3.20.2",
|
||||
"ember-template-lint": "^2.14.0",
|
||||
"eslint": "^7.5.0",
|
||||
"eslint-plugin-ember": "^8.9.1",
|
||||
"ember-page-title": "^6.0.3",
|
||||
"ember-qunit": "^5.1.1",
|
||||
"ember-resolver": "^8.0.2",
|
||||
"ember-source": "~3.24.0",
|
||||
"ember-template-lint": "^2.15.0",
|
||||
"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",
|
||||
"faker": "^5.1.0",
|
||||
"loader.js": "^4.7.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.1.2",
|
||||
"qunit-dom": "^1.2.0",
|
||||
"prettier": "^2.2.1",
|
||||
"qunit": "^2.13.0",
|
||||
"qunit-dom": "^1.6.0",
|
||||
"rose": "*",
|
||||
"sass": "^1.29.0",
|
||||
"sass-lint": "^1.13.1",
|
||||
|
||||
@@ -79,8 +79,8 @@ module('Acceptance | accounts', function (hooks) {
|
||||
test('can update an account and save changes', async function (assert) {
|
||||
assert.expect(1);
|
||||
await visit(urls.account);
|
||||
await click('form [type="button"]', 'Activate edit mode');
|
||||
await fillIn('[name="name"]', 'update name');
|
||||
await click('form [type="button"]');
|
||||
await click('form [type="submit"]:not(:disabled)');
|
||||
assert.equal(this.server.db.accounts[0].name, 'update name');
|
||||
});
|
||||
@@ -175,8 +175,8 @@ module('Acceptance | accounts', function (hooks) {
|
||||
);
|
||||
});
|
||||
await visit(urls.account);
|
||||
await click('form [type="button"]', 'Activate edit mode');
|
||||
await fillIn('[name="name"]', 'save account');
|
||||
await click('form [type="button"]');
|
||||
await click('form [type="submit"]');
|
||||
await a11yAudit();
|
||||
assert.ok(
|
||||
|
||||
@@ -161,8 +161,8 @@ module('Acceptance | auth methods', function (hooks) {
|
||||
);
|
||||
});
|
||||
await visit(urls.authMethod);
|
||||
await click('form [type="button"]', 'Activate edit mode');
|
||||
await fillIn('[name="name"]', 'save auth method');
|
||||
await click('form [type="button"]');
|
||||
await click('form [type="submit"]');
|
||||
await a11yAudit();
|
||||
assert.ok(
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import Application from '../app';
|
||||
import config from '../config/environment';
|
||||
import Application from 'admin/app';
|
||||
import config from 'admin/config/environment';
|
||||
import * as QUnit from 'qunit';
|
||||
import { setApplication } from '@ember/test-helpers';
|
||||
import { setup } from 'qunit-dom';
|
||||
//import { start } from 'ember-qunit';
|
||||
import start from 'ember-exam/test-support/start';
|
||||
|
||||
setApplication(Application.create(config.APP));
|
||||
|
||||
setup(QUnit.assert);
|
||||
|
||||
start();
|
||||
@@ -1,16 +1,17 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Controller | scopes/scope/auth-methods/auth-method', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Controller | scopes/scope/auth-methods/auth-method',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/auth-methods/auth-method'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
});
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/auth-methods/auth-method'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,16 +1,17 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Controller | scopes/scope/groups/group/add-members', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Controller | scopes/scope/groups/group/add-members',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/groups/group/add-members'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
});
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/groups/group/add-members'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,16 +1,17 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Controller | scopes/scope/groups/group/members', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Controller | scopes/scope/groups/group/members',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/groups/group/members'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
});
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/groups/group/members'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,16 +1,17 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Controller | scopes/scope/host-catalogs/host-catalog', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Controller | scopes/scope/host-catalogs/host-catalog',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/host-catalogs/host-catalog'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
});
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/host-catalogs/host-catalog'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,16 +1,17 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Controller | scopes/scope/roles/role/add-principals', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Controller | scopes/scope/roles/role/add-principals',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/roles/role/add-principals'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
});
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/roles/role/add-principals'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,16 +1,17 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Controller | scopes/scope/roles/role/principals', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Controller | scopes/scope/roles/role/principals',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/roles/role/principals'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
});
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/roles/role/principals'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,16 +1,17 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Controller | scopes/scope/targets/target/host-sets', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Controller | scopes/scope/targets/target/host-sets',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/targets/target/host-sets'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
});
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/targets/target/host-sets'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,16 +1,17 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Controller | scopes/scope/users/user/accounts', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Controller | scopes/scope/users/user/accounts',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/users/user/accounts'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
});
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/users/user/accounts'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,16 +1,17 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Controller | scopes/scope/users/user/add-accounts', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Controller | scopes/scope/users/user/add-accounts',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/users/user/add-accounts'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
});
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:scopes/scope/users/user/add-accounts'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,15 +1,16 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Route | scopes/scope/auth-methods/auth-method', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Route | scopes/scope/auth-methods/auth-method',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/auth-methods/auth-method'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/auth-methods/auth-method'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,15 +1,16 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Route | scopes/scope/auth-methods/auth-method/index', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Route | scopes/scope/auth-methods/auth-method/index',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/auth-methods/auth-method/index'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/auth-methods/auth-method/index'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,15 +1,16 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Route | scopes/scope/groups/group/add-members', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Route | scopes/scope/groups/group/add-members',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/groups/group/add-members'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/groups/group/add-members'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,15 +1,16 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Route | scopes/scope/host-catalogs/host-catalog', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Route | scopes/scope/host-catalogs/host-catalog',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/host-catalogs/host-catalog'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/host-catalogs/host-catalog'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,15 +1,16 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Route | scopes/scope/roles/role/add-principals', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Route | scopes/scope/roles/role/add-principals',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/roles/role/add-principals'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/roles/role/add-principals'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,15 +1,16 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Route | scopes/scope/targets/target/add-host-sets', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Route | scopes/scope/targets/target/add-host-sets',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/targets/target/add-host-sets'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/targets/target/add-host-sets'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -1,15 +1,16 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Route | scopes/scope/targets/target/host-sets', function (
|
||||
hooks
|
||||
) {
|
||||
setupTest(hooks);
|
||||
module(
|
||||
'Unit | Route | scopes/scope/targets/target/host-sets',
|
||||
function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/targets/target/host-sets'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup(
|
||||
'route:scopes/scope/targets/target/host-sets'
|
||||
);
|
||||
assert.ok(route);
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -2,7 +2,7 @@
|
||||
id={{this.id}}
|
||||
class="copyable"
|
||||
{{did-insert this.register}}
|
||||
{{will-destroy this.destroy}}
|
||||
{{will-destroy this.tearDown}}
|
||||
>
|
||||
|
||||
{{#if this.copied}}
|
||||
|
||||
@@ -66,7 +66,7 @@ export default class CopyableComponent extends Component {
|
||||
*/
|
||||
@action
|
||||
register() {
|
||||
this.destroy();
|
||||
this.tearDown();
|
||||
/* istanbul ignore next */
|
||||
this.clipboard = new ClipboardJS(`#${this.copyableButtonId}`, {
|
||||
text: () => this.args.text,
|
||||
@@ -89,7 +89,7 @@ export default class CopyableComponent extends Component {
|
||||
* Destroy ClipboardJS library instance and cancel icon timer.
|
||||
*/
|
||||
@action
|
||||
destroy() {
|
||||
tearDown() {
|
||||
this.clipboard?.destroy();
|
||||
this.clipboard = null;
|
||||
this.confirmCopyTimer.cancelAll();
|
||||
|
||||
@@ -8573,6 +8573,14 @@ ember-cli-app-version@^3.2.0:
|
||||
ember-cli-babel "^6.12.0"
|
||||
git-repo-version "^1.0.2"
|
||||
|
||||
ember-cli-app-version@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ember-cli-app-version/-/ember-cli-app-version-4.0.0.tgz#033057ec5fe4d3ecdf5ac5380d442e2dc9f7526a"
|
||||
integrity sha512-YRH1r4vjA9ZIgTVJ38zWxhtt4SCzIHb0ppEsO/z+JV0ZTQlS3+2dT5RhJWz7O3dyw5FWnlIng+gPRoQEz1umHA==
|
||||
dependencies:
|
||||
ember-cli-babel "^7.22.1"
|
||||
git-repo-info "^2.1.1"
|
||||
|
||||
ember-cli-babel-plugin-helpers@^1.0.0, ember-cli-babel-plugin-helpers@^1.1.0, ember-cli-babel-plugin-helpers@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ember-cli-babel-plugin-helpers/-/ember-cli-babel-plugin-helpers-1.1.1.tgz#5016b80cdef37036c4282eef2d863e1d73576879"
|
||||
|
||||
Reference in new issue
Block a user