ui: chore upgrade to ember-qunit v5 (#14430)

* Refactor remaining `moduleFor`-tests

`moduleFor*` will be removed from ember-qunit v5

* Upgrade ember-qunit to v5

* Update how we use ember-sinon-qunit

With ember-qunit v5 we need to use ember-sinon-qunit differently.

* Fix submit-blank test

We can't click on disabled buttons with new test-helpers.
We need to adapt the test accordingly.

* Make sure we await fill-in with form yaml step

We need to await `fill-in`. This changes the reducer
function in the step to create a proper await
chain.

* Fix show-routing test

We need to await a tick before visiting again.

* Remove redundant `wait one tick`-step

* remove unneeded "next Tick" promise from form step

* Increase timeout show-routing feature

* Comment on pause hack for show-routing test
This commit is contained in:
Michael Klein 2022-09-01 17:37:37 +02:00 committed by GitHub
parent edbf845405
commit 39c5b91272
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 1214 additions and 1109 deletions

View File

@ -60,6 +60,7 @@
"@docfy/ember": "^0.4.1",
"@ember/optional-features": "^1.3.0",
"@ember/render-modifiers": "^1.0.2",
"@ember/test-helpers": "^2.1.4",
"@glimmer/component": "^1.0.0",
"@glimmer/tracking": "^1.0.0",
"@hashicorp/ember-cli-api-double": "^3.1.0",
@ -135,7 +136,7 @@
"ember-page-title": "^6.2.1",
"ember-power-select": "^4.0.5",
"ember-power-select-with-create": "^0.8.0",
"ember-qunit": "^4.6.0",
"ember-qunit": "^5.1.1",
"ember-ref-modifier": "^1.0.0",
"ember-render-helpers": "^0.2.0",
"ember-resolver": "^8.0.0",
@ -166,7 +167,7 @@
"pretender": "^3.2.0",
"prettier": "^1.10.2",
"pretty-ms": "^7.0.1",
"qunit-dom": "^1.0.0",
"qunit-dom": "^1.6.0",
"react-is": "^17.0.1",
"refractor": "^3.5.0",
"remark-autolink-headings": "^6.0.1",
@ -177,7 +178,8 @@
"tippy.js": "^6.2.7",
"torii": "^0.10.1",
"unist-util-visit": "^2.0.3",
"wayfarer": "^7.0.1"
"wayfarer": "^7.0.1",
"qunit": "^2.13.0"
},
"engines": {
"node": ">=10 <=14"

View File

@ -52,6 +52,13 @@ Feature: dc / services / show-routing: Show Routing for Service
service: service-1
---
And I see routing on the tabs
# something weird is going on with this test
# without waiting we issue a url reload that
# will make the test timeout.
# waiting will "fix" this - we should look into
# the underlying reason for this soon. This is
# only a quick-fix to land ember-qunit v5.
And pause for 1000
And I visit the service page for yaml
---
dc: dc1

View File

@ -10,7 +10,7 @@ Feature: submit-blank
dc: datacenter
---
Then the url should be /datacenter/[Slug]/create
And I submit
Then I don't see submitIsEnabled
Then the url should be /datacenter/[Slug]/create
Where:
--------------------------

View File

@ -16,6 +16,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>
{{content-for "body-footer"}}

View File

@ -1,13 +1,13 @@
import { module } from 'qunit';
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { clearRender, render, waitUntil } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import test from 'ember-sinon-qunit/test-support/test';
import Service, { inject as service } from '@ember/service';
import DataSourceComponent from 'consul-ui/components/data-source/index';
import { BlockingEventSource as RealEventSource } from 'consul-ui/utils/dom/event-source';
import sinon from 'sinon';
const createFakeBlockingEventSource = function() {
const EventSource = function(cb) {
@ -39,10 +39,10 @@ module('Integration | Component | data-source', function(hooks) {
// Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.set('myAction', function(val) { ... });
assert.expect(9);
const close = this.stub();
const open = this.stub();
const addEventListener = this.stub();
const removeEventListener = this.stub();
const close = sinon.stub();
const open = sinon.stub();
const addEventListener = sinon.stub();
const removeEventListener = sinon.stub();
let count = 0;
const fakeService = class extends Service {
close = close;
@ -98,8 +98,8 @@ module('Integration | Component | data-source', function(hooks) {
});
test('error actions are triggered when errors are dispatched', async function(assert) {
const source = new RealEventSource();
const error = this.stub();
const close = this.stub();
const error = sinon.stub();
const close = sinon.stub();
const fakeService = class extends Service {
close = close;
open(uri, obj) {

View File

@ -1,92 +1,94 @@
import { moduleFor, test } from 'ember-qunit';
import { setupTest } from 'ember-qunit';
import repo from 'consul-ui/tests/helpers/repo';
import { skip } from 'qunit';
import { module, skip, test } from 'qunit';
const NAME = 'auth-method';
moduleFor(`service:repository/${NAME}`, `Integration | Service | ${NAME}`, {
// Specify the other units that are required for this test.
integration: true,
});
const dc = 'dc-1';
const id = 'auth-method-name';
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findAllByDatacenter returns the correct data for list endpoint when nspace is ${nspace}`, function(assert) {
return repo(
'auth-method',
'findAllByDatacenter',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/acl/auth-methods?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_AUTH_METHOD_COUNT: '3',
}
);
},
function performTest(service) {
return service.findAllByDatacenter({
dc: dc,
nspace: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(function(item) {
module(`Integration | Service | auth-method`, function(hooks) {
setupTest(hooks);
const dc = 'dc-1';
const id = 'auth-method-name';
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findAllByDatacenter returns the correct data for list endpoint when nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/auth-method');
return repo(
'auth-method',
'findAllByDatacenter',
subject,
function retrieveStub(stub) {
return stub(
`/v1/acl/auth-methods?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_AUTH_METHOD_COUNT: '3',
}
);
},
function performTest(service) {
return service.findAllByDatacenter({
dc: dc,
nspace: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(function(item) {
return Object.assign({}, item, {
Datacenter: dc,
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.Name}"]`,
});
});
})
);
}
);
});
skip(`findBySlug returns the correct data for item endpoint when the nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/auth-method');
return repo(
'AuthMethod',
'findBySlug',
subject,
function retrieveStub(stub) {
return stub(
`/v1/acl/auth-method/${id}?dc=${dc}${
typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``
}`
);
},
function performTest(service) {
return service.findBySlug(id, dc, nspace || undefinedNspace);
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
const item = payload;
return Object.assign({}, item, {
Datacenter: dc,
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.Name}"]`,
uid: `["${item.Namespace || undefinedNspace}","${dc}","${item.Name}"]`,
meta: {
cacheControl: undefined,
cursor: undefined,
dc: dc,
nspace: item.Namespace || undefinedNspace,
},
});
});
})
);
}
);
});
skip(`findBySlug returns the correct data for item endpoint when the nspace is ${nspace}`, function(assert) {
return repo(
'AuthMethod',
'findBySlug',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/acl/auth-method/${id}?dc=${dc}${
typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``
}`
);
},
function performTest(service) {
return service.findBySlug(id, dc, nspace || undefinedNspace);
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
const item = payload;
return Object.assign({}, item, {
Datacenter: dc,
Namespace: item.Namespace || undefinedNspace,
uid: `["${item.Namespace || undefinedNspace}","${dc}","${item.Name}"]`,
meta: {
cacheControl: undefined,
cursor: undefined,
dc: dc,
nspace: item.Namespace || undefinedNspace,
},
});
})
);
}
);
})
);
}
);
});
});
});

View File

@ -1,68 +1,74 @@
import { moduleFor, test } from 'ember-qunit';
import { setupTest } from 'ember-qunit';
import { module, test } from 'qunit';
import repo from 'consul-ui/tests/helpers/repo';
import { get } from '@ember/object';
const NAME = 'coordinate';
moduleFor(`service:repository/${NAME}`, `Integration | Service | ${NAME}`, {
// Specify the other units that are required for this test.
integration: true,
});
const dc = 'dc-1';
const nspace = 'default';
const partition = 'default';
const now = new Date().getTime();
test('findAllByDatacenter returns the correct data for list endpoint', function(assert) {
get(this.subject(), 'store').serializerFor(NAME).timestamp = function() {
return now;
};
return repo(
'Coordinate',
'findAllByDatacenter',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/coordinate/nodes?dc=${dc}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_NODE_COUNT: '100',
}
module(`Integration | Service | coordinate`, function(hooks) {
setupTest(hooks);
test('findAllByDatacenter returns the correct data for list endpoint', function(assert) {
const subject = this.owner.lookup('service:repository/coordinate');
get(subject, 'store').serializerFor('coordinate').timestamp = function() {
return now;
};
return repo(
'Coordinate',
'findAllByDatacenter',
subject,
function retrieveStub(stub) {
return stub(
`/v1/coordinate/nodes?dc=${dc}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_NODE_COUNT: '100',
}
);
},
function performTest(service) {
return service.findAllByDatacenter({ dc, partition });
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(item =>
Object.assign({}, item, {
SyncTime: now,
Datacenter: dc,
Partition: partition,
// TODO: nspace isn't required here, once we've
// refactored out our Serializer this can go
uid: `["${partition}","${nspace}","${dc}","${item.Node}"]`,
})
);
})
);
}
);
});
test('findAllByNode calls findAllByDatacenter with the correct arguments', function(assert) {
assert.expect(3);
const datacenter = 'dc-1';
const conf = {
cursor: 1,
};
const service = this.owner.lookup('service:repository/coordinate');
service.findAllByDatacenter = function(params, configuration) {
assert.equal(
arguments.length,
2,
'Expected to be called with the correct number of arguments'
);
},
function performTest(service) {
return service.findAllByDatacenter({ dc, partition });
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(item =>
Object.assign({}, item, {
SyncTime: now,
Datacenter: dc,
Partition: partition,
// TODO: nspace isn't required here, once we've
// refactored out our Serializer this can go
uid: `["${partition}","${nspace}","${dc}","${item.Node}"]`,
})
);
})
);
}
);
});
test('findAllByNode calls findAllByDatacenter with the correct arguments', function(assert) {
assert.expect(3);
const datacenter = 'dc-1';
const conf = {
cursor: 1,
};
const service = this.subject();
service.findAllByDatacenter = function(params, configuration) {
assert.equal(arguments.length, 2, 'Expected to be called with the correct number of arguments');
assert.equal(params.dc, datacenter);
assert.deepEqual(configuration, conf);
return Promise.resolve([]);
};
return service.findAllByNode({ node: 'node-name', dc: datacenter }, conf);
assert.equal(params.dc, datacenter);
assert.deepEqual(configuration, conf);
return Promise.resolve([]);
};
return service.findAllByNode({ node: 'node-name', dc: datacenter }, conf);
});
});

View File

@ -1,30 +1,31 @@
import { moduleFor } from 'ember-qunit';
import { skip } from 'qunit';
import { setupTest } from 'ember-qunit';
import { module, skip } from 'qunit';
import repo from 'consul-ui/tests/helpers/repo';
const NAME = 'dc';
moduleFor(`service:repository/${NAME}`, `Integration | Service | ${NAME}`, {
// Specify the other units that are required for this test.
integration: true,
});
skip("findBySlug (doesn't interact with the API) but still needs an int test");
skip('findAll returns the correct data for list endpoint', function(assert) {
return repo(
'Dc',
'findAll',
this.subject(),
function retrieveStub(stub) {
return stub(`/v1/catalog/datacenters`, {
CONSUL_DATACENTER_COUNT: '100',
});
},
function performTest(service) {
return service.findAll();
},
function performAssertion(actual, expected) {
actual.forEach((item, i) => {
assert.equal(actual[i].Name, item.Name);
assert.equal(item.Local, i === 0);
});
}
);
module(`Integration | Service | dc`, function(hooks) {
setupTest(hooks);
skip("findBySlug (doesn't interact with the API) but still needs an int test");
skip('findAll returns the correct data for list endpoint', function(assert) {
const subject = this.owner.lookup('service:repository/dc');
return repo(
'Dc',
'findAll',
subject,
function retrieveStub(stub) {
return stub(`/v1/catalog/datacenters`, {
CONSUL_DATACENTER_COUNT: '100',
});
},
function performTest(service) {
return service.findAll();
},
function performAssertion(actual, expected) {
actual.forEach((item, i) => {
assert.equal(actual[i].Name, item.Name);
assert.equal(item.Local, i === 0);
});
}
);
});
});

View File

@ -1,42 +1,42 @@
import { moduleFor, test } from 'ember-qunit';
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import repo from 'consul-ui/tests/helpers/repo';
moduleFor('service:repository/discovery-chain', 'Integration | Service | discovery-chain', {
// Specify the other units that are required for this test.
integration: true,
});
const dc = 'dc-1';
const id = 'slug';
test('findBySlug returns the correct data for item endpoint', function(assert) {
return repo(
'Service',
'findBySlug',
this.subject(),
function retrieveStub(stub) {
return stub(`/v1/discovery-chain/${id}?dc=${dc}`, {
CONSUL_DISCOVERY_CHAIN_COUNT: 1,
});
},
function performTest(service) {
return service.findBySlug({ id, dc });
},
function performAssertion(actual, expected) {
const result = expected(function(payload) {
return Object.assign(
{},
{
Datacenter: dc,
uid: `["default","default","${dc}","${id}"]`,
meta: {
cacheControl: undefined,
cursor: undefined,
module('Integration | Service | discovery-chain', function(hooks) {
setupTest(hooks);
const dc = 'dc-1';
const id = 'slug';
test('findBySlug returns the correct data for item endpoint', function(assert) {
return repo(
'Service',
'findBySlug',
this.owner.lookup('service:repository/discovery-chain'),
function retrieveStub(stub) {
return stub(`/v1/discovery-chain/${id}?dc=${dc}`, {
CONSUL_DISCOVERY_CHAIN_COUNT: 1,
});
},
function performTest(service) {
return service.findBySlug({ id, dc });
},
function performAssertion(actual, expected) {
const result = expected(function(payload) {
return Object.assign(
{},
{
Datacenter: dc,
uid: `["default","default","${dc}","${id}"]`,
meta: {
cacheControl: undefined,
cursor: undefined,
},
},
},
payload
);
});
assert.equal(actual.Datacenter, result.Datacenter);
assert.equal(actual.uid, result.uid);
}
);
payload
);
});
assert.equal(actual.Datacenter, result.Datacenter);
assert.equal(actual.uid, result.uid);
}
);
});
});

View File

@ -1,90 +1,97 @@
import { moduleFor, test } from 'ember-qunit';
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import repo from 'consul-ui/tests/helpers/repo';
import { env } from '../../../../env';
import { get } from '@ember/object';
const NAME = 'kv';
moduleFor(`service:repository/${NAME}`, `Integration | Service | ${NAME}`, {
// Specify the other units that are required for this test.
integration: true,
});
const dc = 'dc-1';
const id = 'key-name';
const now = new Date().getTime();
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findAllBySlug returns the correct data for list endpoint when nspace is ${nspace}`, function(assert) {
get(this.subject(), 'store').serializerFor(NAME).timestamp = function() {
return now;
};
return repo(
'Kv',
'findAllBySlug',
this.subject(),
function retrieveTest(stub) {
return stub(
`/v1/kv/${id}?keys&dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_KV_COUNT: '1',
}
);
},
function performTest(service) {
return service.findAllBySlug({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
const expectedNspace = env('CONSUL_NSPACES_ENABLED')
? nspace || undefinedNspace
: 'default';
const expectedPartition = env('CONSUL_PARTITIONS_ENABLED')
? partition || undefinedPartition
: 'default';
actual.forEach(item => {
assert.equal(item.uid, `["${expectedPartition}","${expectedNspace}","${dc}","${item.Key}"]`);
assert.equal(item.Datacenter, dc);
});
}
);
});
test(`findBySlug returns the correct data for item endpoint when nspace is ${nspace}`, function(assert) {
return repo(
'Kv',
'findBySlug',
this.subject(),
function(stub) {
return stub(
`/v1/kv/${id}?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`
);
},
function(service) {
return service.findBySlug({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function(actual, expected) {
expected(
function(payload) {
module(`Integration | Service | kv`, function(hooks) {
setupTest(hooks);
const dc = 'dc-1';
const id = 'key-name';
const now = new Date().getTime();
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findAllBySlug returns the correct data for list endpoint when nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/kv');
get(subject, 'store').serializerFor('kv').timestamp = function() {
return now;
};
return repo(
'Kv',
'findAllBySlug',
subject,
function retrieveTest(stub) {
return stub(
`/v1/kv/${id}?keys&dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_KV_COUNT: '1',
}
);
},
function performTest(service) {
return service.findAllBySlug({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
const expectedNspace = env('CONSUL_NSPACES_ENABLED')
? nspace || undefinedNspace
: 'default';
const expectedPartition = env('CONSUL_PARTITIONS_ENABLED')
? partition || undefinedPartition
: 'default';
actual.forEach(item => {
assert.equal(
item.uid,
`["${expectedPartition}","${expectedNspace}","${dc}","${item.Key}"]`
);
assert.equal(item.Datacenter, dc);
});
}
);
});
test(`findBySlug returns the correct data for item endpoint when nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/kv');
return repo(
'Kv',
'findBySlug',
subject,
function(stub) {
return stub(
`/v1/kv/${id}?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`
);
},
function(service) {
return service.findBySlug({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function(actual, expected) {
expected(function(payload) {
const item = payload[0];
assert.equal(actual.uid, `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.Key}"]`);
assert.equal(
actual.uid,
`["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.Key}"]`
);
assert.equal(actual.Datacenter, dc);
}
);
}
);
});
}
);
});
});
});

View File

@ -1,64 +1,67 @@
import { moduleFor, test } from 'ember-qunit';
import { setupTest } from 'ember-qunit';
import { module, test } from 'qunit';
import repo from 'consul-ui/tests/helpers/repo';
import { get } from '@ember/object';
const NAME = 'node';
moduleFor(`service:repository/${NAME}`, `Integration | Service | ${NAME}`, {
// Specify the other units that are required for this test.
integration: true,
});
const dc = 'dc-1';
const id = 'token-name';
const now = new Date().getTime();
const nspace = 'default';
const partition = 'default';
test('findByDatacenter returns the correct data for list endpoint', function(assert) {
get(this.subject(), 'store').serializerFor(NAME).timestamp = function() {
return now;
};
return repo(
'Node',
'findAllByDatacenter',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/internal/ui/nodes?dc=${dc}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_NODE_COUNT: '100',
}
);
},
function performTest(service) {
return service.findAllByDatacenter({ dc, partition });
},
function performAssertion(actual, expected) {
actual.forEach(item => {
assert.equal(item.uid, `["${partition}","${nspace}","${dc}","${item.ID}"]`);
assert.equal(item.Datacenter, dc);
});
}
);
});
test('findBySlug returns the correct data for item endpoint', function(assert) {
return repo(
'Node',
'findBySlug',
this.subject(),
function(stub) {
return stub(
`/v1/internal/ui/node/${id}?dc=${dc}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`
);
},
function(service) {
return service.findBySlug({ id, dc, partition });
},
function(actual, expected) {
assert.equal(actual.uid, `["${partition}","${nspace}","${dc}","${actual.ID}"]`);
assert.equal(actual.Datacenter, dc);
}
);
module(`Integration | Service | node`, function(hooks) {
setupTest(hooks);
test('findByDatacenter returns the correct data for list endpoint', function(assert) {
const subject = this.owner.lookup('service:repository/node');
get(subject, 'store').serializerFor('node').timestamp = function() {
return now;
};
return repo(
'Node',
'findAllByDatacenter',
subject,
function retrieveStub(stub) {
return stub(
`/v1/internal/ui/nodes?dc=${dc}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_NODE_COUNT: '100',
}
);
},
function performTest(service) {
return service.findAllByDatacenter({ dc, partition });
},
function performAssertion(actual, expected) {
actual.forEach(item => {
assert.equal(item.uid, `["${partition}","${nspace}","${dc}","${item.ID}"]`);
assert.equal(item.Datacenter, dc);
});
}
);
});
test('findBySlug returns the correct data for item endpoint', function(assert) {
const subject = this.owner.lookup('service:repository/node');
return repo(
'Node',
'findBySlug',
subject,
function(stub) {
return stub(
`/v1/internal/ui/node/${id}?dc=${dc}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`
);
},
function(service) {
return service.findBySlug({ id, dc, partition });
},
function(actual, expected) {
assert.equal(actual.uid, `["${partition}","${nspace}","${dc}","${actual.ID}"]`);
assert.equal(actual.Datacenter, dc);
}
);
});
});

View File

@ -1,92 +1,95 @@
import { moduleFor, test, skip } from 'ember-qunit';
import { module, skip, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { get } from '@ember/object';
import repo from 'consul-ui/tests/helpers/repo';
const NAME = 'policy';
moduleFor(`service:repository/${NAME}`, `Integration | Service | ${NAME}`, {
// Specify the other units that are required for this test.
integration: true,
});
skip('translate returns the correct data for the translate endpoint');
const now = new Date().getTime();
const dc = 'dc-1';
const id = 'policy-name';
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findByDatacenter returns the correct data for list endpoint when nspace is ${nspace}`, function(assert) {
get(this.subject(), 'store').serializerFor(NAME).timestamp = function() {
return now;
};
return repo(
'Policy',
'findAllByDatacenter',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/acl/policies?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_POLICY_COUNT: '10',
}
);
},
function performTest(service) {
return service.findAllByDatacenter({
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(item =>
Object.assign({}, item, {
SyncTime: now,
Datacenter: dc,
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.ID}"]`,
})
);
})
);
}
);
});
test(`findBySlug returns the correct data for item endpoint when the nspace is ${nspace}`, function(assert) {
return repo(
'Policy',
'findBySlug',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/acl/policy/${id}?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`
);
},
function performTest(service) {
return service.findBySlug({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.equal(
actual.uid,
`["${partition || undefinedPartition}","${nspace || undefinedNspace}","${dc}","${
actual.ID
}"]`
);
assert.equal(actual.Datacenter, dc);
}
);
module(`Integration | Service | policy`, function(hooks) {
setupTest(hooks);
skip('translate returns the correct data for the translate endpoint');
const now = new Date().getTime();
const dc = 'dc-1';
const id = 'policy-name';
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findByDatacenter returns the correct data for list endpoint when nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/policy');
get(subject, 'store').serializerFor('policy').timestamp = function() {
return now;
};
return repo(
'Policy',
'findAllByDatacenter',
subject,
function retrieveStub(stub) {
return stub(
`/v1/acl/policies?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_POLICY_COUNT: '10',
}
);
},
function performTest(service) {
return service.findAllByDatacenter({
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(item =>
Object.assign({}, item, {
SyncTime: now,
Datacenter: dc,
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.ID}"]`,
})
);
})
);
}
);
});
test(`findBySlug returns the correct data for item endpoint when the nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/policy');
return repo(
'Policy',
'findBySlug',
subject,
function retrieveStub(stub) {
return stub(
`/v1/acl/policy/${id}?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`
);
},
function performTest(service) {
return service.findBySlug({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.equal(
actual.uid,
`["${partition || undefinedPartition}","${nspace || undefinedNspace}","${dc}","${
actual.ID
}"]`
);
assert.equal(actual.Datacenter, dc);
}
);
});
});
});

View File

@ -1,102 +1,105 @@
import { moduleFor, test, skip } from 'ember-qunit';
import { module, skip, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { get } from '@ember/object';
import repo from 'consul-ui/tests/helpers/repo';
import { createPolicies } from 'consul-ui/tests/helpers/normalizers';
const NAME = 'role';
moduleFor(`service:repository/${NAME}`, `Integration | Service | ${NAME}`, {
// Specify the other units that are required for this test.
integration: true,
});
const now = new Date().getTime();
const dc = 'dc-1';
const id = 'role-name';
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findByDatacenter returns the correct data for list endpoint when nspace is ${nspace}`, function(assert) {
get(this.subject(), 'store').serializerFor(NAME).timestamp = function() {
return now;
};
return repo(
'Role',
'findAllByDatacenter',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/acl/roles?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_ROLE_COUNT: '100',
}
);
},
function performTest(service) {
return service.findAllByDatacenter({
dc: dc,
nspace: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(item =>
Object.assign({}, item, {
SyncTime: now,
module(`Integration | Service | role`, function(hooks) {
setupTest(hooks);
const now = new Date().getTime();
const dc = 'dc-1';
const id = 'role-name';
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findByDatacenter returns the correct data for list endpoint when nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/role');
get(subject, 'store').serializerFor('role').timestamp = function() {
return now;
};
return repo(
'Role',
'findAllByDatacenter',
subject,
function retrieveStub(stub) {
return stub(
`/v1/acl/roles?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_ROLE_COUNT: '100',
}
);
},
function performTest(service) {
return service.findAllByDatacenter({
dc: dc,
nspace: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(item =>
Object.assign({}, item, {
SyncTime: now,
Datacenter: dc,
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.ID}"]`,
Policies: createPolicies(item),
})
);
})
);
}
);
});
// FIXME: For some reason this tries to initialize the metrics service?
skip(`findBySlug returns the correct data for item endpoint when the nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/role');
return repo(
'Role',
'findBySlug',
subject,
function retrieveStub(stub) {
return stub(
`/v1/acl/role/${id}?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`
);
},
function performTest(service) {
return service.findBySlug({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
const item = payload;
return Object.assign({}, item, {
Datacenter: dc,
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
uid: `["${partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.ID}"]`,
Policies: createPolicies(item),
})
);
})
);
}
);
});
// FIXME: For some reason this tries to initialize the metrics service?
skip(`findBySlug returns the correct data for item endpoint when the nspace is ${nspace}`, function(assert) {
return repo(
'Role',
'findBySlug',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/acl/role/${id}?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`
);
},
function performTest(service) {
return service.findBySlug({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
const item = payload;
return Object.assign({}, item, {
Datacenter: dc,
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.ID}"]`,
Policies: createPolicies(item),
});
})
);
}
);
});
})
);
}
);
});
});
});

View File

@ -1,69 +1,70 @@
import { moduleFor, test } from 'ember-qunit';
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import repo from 'consul-ui/tests/helpers/repo';
import { get } from '@ember/object';
const NAME = 'service';
moduleFor(`service:repository/${NAME}`, `Integration | Service | ${NAME}`, {
// Specify the other units that are required for this test.
integration: true,
});
const dc = 'dc-1';
const now = new Date().getTime();
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findGatewayBySlug returns the correct data for list endpoint when nspace is ${nspace}`, function(assert) {
get(this.subject(), 'store').serializerFor(NAME).timestamp = function() {
return now;
};
const gateway = 'gateway';
const conf = {
cursor: 1,
};
return repo(
'Service',
'findGatewayBySlug',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/internal/ui/gateway-services-nodes/${gateway}?dc=${dc}${
typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``
}${typeof partition !== 'undefined' ? `&partition=${partition}` : ``}`,
{
CONSUL_SERVICE_COUNT: '100',
}
);
},
function performTest(service) {
return service.findGatewayBySlug(
{
gateway,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
},
conf
);
},
function performAssertion(actual, expected) {
const result = expected(function(payload) {
return payload.map(item =>
Object.assign({}, item, {
SyncTime: now,
Datacenter: dc,
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.Name}"]`,
})
module(`Integration | Service | service`, function(hooks) {
setupTest(hooks);
const dc = 'dc-1';
const now = new Date().getTime();
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findGatewayBySlug returns the correct data for list endpoint when nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/service');
get(subject, 'store').serializerFor('service').timestamp = function() {
return now;
};
const gateway = 'gateway';
const conf = {
cursor: 1,
};
return repo(
'Service',
'findGatewayBySlug',
subject,
function retrieveStub(stub) {
return stub(
`/v1/internal/ui/gateway-services-nodes/${gateway}?dc=${dc}${
typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``
}${typeof partition !== 'undefined' ? `&partition=${partition}` : ``}`,
{
CONSUL_SERVICE_COUNT: '100',
}
);
});
assert.equal(actual[0].SyncTime, result[0].SyncTime);
assert.equal(actual[0].Datacenter, result[0].Datacenter);
assert.equal(actual[0].Namespace, result[0].Namespace);
assert.equal(actual[0].Partition, result[0].Partition);
assert.equal(actual[0].uid, result[0].uid);
}
);
},
function performTest(service) {
return service.findGatewayBySlug(
{
gateway,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
},
conf
);
},
function performAssertion(actual, expected) {
const result = expected(function(payload) {
return payload.map(item =>
Object.assign({}, item, {
SyncTime: now,
Datacenter: dc,
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.Name}"]`,
})
);
});
assert.equal(actual[0].SyncTime, result[0].SyncTime);
assert.equal(actual[0].Datacenter, result[0].Datacenter);
assert.equal(actual[0].Namespace, result[0].Namespace);
assert.equal(actual[0].Partition, result[0].Partition);
assert.equal(actual[0].uid, result[0].uid);
}
);
});
});
});

View File

@ -1,99 +1,102 @@
import { moduleFor, test } from 'ember-qunit';
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import repo from 'consul-ui/tests/helpers/repo';
import { get } from '@ember/object';
const NAME = 'session';
moduleFor(`service:repository/${NAME}`, `Integration | Service | ${NAME}`, {
// Specify the other units that are required for this test.
integration: true,
});
const dc = 'dc-1';
const id = 'node-name';
const now = new Date().getTime();
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findByNode returns the correct data for list endpoint when the nspace is ${nspace}`, function(assert) {
get(this.subject(), 'store').serializerFor(NAME).timestamp = function() {
return now;
};
return repo(
'Session',
'findByNode',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/session/node/${id}?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_SESSION_COUNT: '100',
}
);
},
function performTest(service) {
return service.findByNode({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(item =>
Object.assign({}, item, {
SyncTime: now,
module(`Integration | Service | session`, function(hooks) {
setupTest(hooks);
const dc = 'dc-1';
const id = 'node-name';
const now = new Date().getTime();
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findByNode returns the correct data for list endpoint when the nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/session');
get(subject, 'store').serializerFor('session').timestamp = function() {
return now;
};
return repo(
'Session',
'findByNode',
subject,
function retrieveStub(stub) {
return stub(
`/v1/session/node/${id}?dc=${dc}${
typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``
}${typeof partition !== 'undefined' ? `&partition=${partition}` : ``}`,
{
CONSUL_SESSION_COUNT: '100',
}
);
},
function performTest(service) {
return service.findByNode({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(item =>
Object.assign({}, item, {
SyncTime: now,
Datacenter: dc,
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.ID}"]`,
})
);
})
);
}
);
});
test(`findByKey returns the correct data for item endpoint when the nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/session');
return repo(
'Session',
'findByKey',
subject,
function(stub) {
return stub(
`/v1/session/info/${id}?dc=${dc}${
typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``
}${typeof partition !== 'undefined' ? `&partition=${partition}` : ``}`
);
},
function(service) {
return service.findByKey({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
const item = payload[0];
return Object.assign({}, item, {
Datacenter: dc,
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.ID}"]`,
})
);
})
);
}
);
});
test(`findByKey returns the correct data for item endpoint when the nspace is ${nspace}`, function(assert) {
return repo(
'Session',
'findByKey',
this.subject(),
function(stub) {
return stub(
`/v1/session/info/${id}?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`
);
},
function(service) {
return service.findByKey({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
const item = payload[0];
return Object.assign({}, item, {
Datacenter: dc,
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.ID}"]`,
});
})
);
}
);
});
})
);
}
);
});
});
});

View File

@ -1,181 +1,184 @@
import { moduleFor, test, skip } from 'ember-qunit';
import { module, skip, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import repo from 'consul-ui/tests/helpers/repo';
import { createPolicies } from 'consul-ui/tests/helpers/normalizers';
const NAME = 'token';
moduleFor(`service:repository/${NAME}`, `Integration | Service | ${NAME}`, {
// Specify the other units that are required for this test.
integration: true,
});
skip('clone returns the correct data for the clone endpoint');
const dc = 'dc-1';
const id = 'token-id';
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findByDatacenter returns the correct data for list endpoint when nspace is ${nspace}`, function(assert) {
return repo(
'Token',
'findAllByDatacenter',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/acl/tokens?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_TOKEN_COUNT: '100',
}
);
},
function performTest(service) {
return service.findAllByDatacenter({
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(function(item) {
return Object.assign({}, item, {
Datacenter: dc,
CreateTime: new Date(item.CreateTime),
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.AccessorID}"]`,
Policies: createPolicies(item),
});
});
})
);
}
);
});
test(`findBySlug returns the correct data for item endpoint when nspace is ${nspace}`, function(assert) {
return repo(
'Token',
'findBySlug',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/acl/token/${id}?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`
);
},
function performTest(service) {
return service.findBySlug({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
expected(function(item) {
assert.equal(
actual.uid,
`["${partition || undefinedPartition}","${nspace || undefinedNspace}","${dc}","${
item.AccessorID
}"]`
module(`Integration | Service | token`, function(hooks) {
setupTest(hooks);
skip('clone returns the correct data for the clone endpoint');
const dc = 'dc-1';
const id = 'token-id';
const undefinedNspace = 'default';
const undefinedPartition = 'default';
const partition = 'default';
[undefinedNspace, 'team-1', undefined].forEach(nspace => {
test(`findByDatacenter returns the correct data for list endpoint when nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/token');
return repo(
'Token',
'findAllByDatacenter',
subject,
function retrieveStub(stub) {
return stub(
`/v1/acl/tokens?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`,
{
CONSUL_TOKEN_COUNT: '100',
}
);
assert.equal(actual.Datacenter, dc);
assert.deepEqual(actual.Policies, createPolicies(item));
});
}
);
});
test(`findByPolicy returns the correct data when nspace is ${nspace}`, function(assert) {
const policy = 'policy-1';
return repo(
'Token',
'findByPolicy',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/acl/tokens?dc=${dc}&policy=${policy}${
typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``
}${typeof partition !== 'undefined' ? `&partition=${partition}` : ``}`,
{
CONSUL_TOKEN_COUNT: '100',
}
);
},
function performTest(service) {
return service.findByPolicy({
id: policy,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(function(item) {
return Object.assign({}, item, {
Datacenter: dc,
CreateTime: new Date(item.CreateTime),
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.AccessorID}"]`,
Policies: createPolicies(item),
},
function performTest(service) {
return service.findAllByDatacenter({
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(function(item) {
return Object.assign({}, item, {
Datacenter: dc,
CreateTime: new Date(item.CreateTime),
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.AccessorID}"]`,
Policies: createPolicies(item),
});
});
});
})
);
}
);
});
test(`findByRole returns the correct data when nspace is ${nspace}`, function(assert) {
const role = 'role-1';
return repo(
'Token',
'findByPolicy',
this.subject(),
function retrieveStub(stub) {
return stub(
`/v1/acl/tokens?dc=${dc}&role=${role}${
typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``
}${typeof partition !== 'undefined' ? `&partition=${partition}` : ``}`,
{
CONSUL_TOKEN_COUNT: '100',
}
);
},
function performTest(service) {
return service.findByRole({
id: role,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(function(item) {
return Object.assign({}, item, {
Datacenter: dc,
CreateTime: new Date(item.CreateTime),
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.AccessorID}"]`,
Policies: createPolicies(item),
})
);
}
);
});
test(`findBySlug returns the correct data for item endpoint when nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/token');
return repo(
'Token',
'findBySlug',
subject,
function retrieveStub(stub) {
return stub(
`/v1/acl/token/${id}?dc=${dc}${typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``}${
typeof partition !== 'undefined' ? `&partition=${partition}` : ``
}`
);
},
function performTest(service) {
return service.findBySlug({
id,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
expected(function(item) {
assert.equal(
actual.uid,
`["${partition || undefinedPartition}","${nspace || undefinedNspace}","${dc}","${
item.AccessorID
}"]`
);
assert.equal(actual.Datacenter, dc);
assert.deepEqual(actual.Policies, createPolicies(item));
});
}
);
});
test(`findByPolicy returns the correct data when nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/token');
const policy = 'policy-1';
return repo(
'Token',
'findByPolicy',
subject,
function retrieveStub(stub) {
return stub(
`/v1/acl/tokens?dc=${dc}&policy=${policy}${
typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``
}${typeof partition !== 'undefined' ? `&partition=${partition}` : ``}`,
{
CONSUL_TOKEN_COUNT: '100',
}
);
},
function performTest(service) {
return service.findByPolicy({
id: policy,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(function(item) {
return Object.assign({}, item, {
Datacenter: dc,
CreateTime: new Date(item.CreateTime),
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.AccessorID}"]`,
Policies: createPolicies(item),
});
});
});
})
);
}
);
})
);
}
);
});
test(`findByRole returns the correct data when nspace is ${nspace}`, function(assert) {
const subject = this.owner.lookup('service:repository/token');
const role = 'role-1';
return repo(
'Token',
'findByPolicy',
subject,
function retrieveStub(stub) {
return stub(
`/v1/acl/tokens?dc=${dc}&role=${role}${
typeof nspace !== 'undefined' ? `&ns=${nspace}` : ``
}${typeof partition !== 'undefined' ? `&partition=${partition}` : ``}`,
{
CONSUL_TOKEN_COUNT: '100',
}
);
},
function performTest(service) {
return service.findByRole({
id: role,
dc,
ns: nspace || undefinedNspace,
partition: partition || undefinedPartition,
});
},
function performAssertion(actual, expected) {
assert.deepEqual(
actual,
expected(function(payload) {
return payload.map(function(item) {
return Object.assign({}, item, {
Datacenter: dc,
CreateTime: new Date(item.CreateTime),
Namespace: item.Namespace || undefinedNspace,
Partition: item.Partition || undefinedPartition,
uid: `["${item.Partition || undefinedPartition}","${item.Namespace ||
undefinedNspace}","${dc}","${item.AccessorID}"]`,
Policies: createPolicies(item),
});
});
})
);
}
);
});
});
});

View File

@ -1,43 +1,43 @@
import { moduleFor, test } from 'ember-qunit';
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import repo from 'consul-ui/tests/helpers/repo';
moduleFor('service:repository/topology', 'Integration | Service | topology', {
// Specify the other units that are required for this test.
integration: true,
});
const dc = 'dc-1';
const id = 'slug';
const kind = '';
test('findBySlug returns the correct data for item endpoint', function(assert) {
return repo(
'Service',
'findBySlug',
this.subject(),
function retrieveStub(stub) {
return stub(`/v1/internal/ui/service-topology/${id}?dc=${dc}&${kind}`, {
CONSUL_DISCOVERY_CHAIN_COUNT: 1,
});
},
function performTest(service) {
return service.findBySlug({ id, kind, dc });
},
function performAssertion(actual, expected) {
const result = expected(function(payload) {
return Object.assign(
{},
{
Datacenter: dc,
uid: `["default","default","${dc}","${id}"]`,
meta: {
cacheControl: undefined,
cursor: undefined,
module('Integration | Service | topology', function(hooks) {
setupTest(hooks);
const dc = 'dc-1';
const id = 'slug';
const kind = '';
test('findBySlug returns the correct data for item endpoint', function(assert) {
return repo(
'Service',
'findBySlug',
this.owner.lookup('service:repository/topology'),
function retrieveStub(stub) {
return stub(`/v1/internal/ui/service-topology/${id}?dc=${dc}&${kind}`, {
CONSUL_DISCOVERY_CHAIN_COUNT: 1,
});
},
function performTest(service) {
return service.findBySlug({ id, kind, dc });
},
function performAssertion(actual, expected) {
const result = expected(function(payload) {
return Object.assign(
{},
{
Datacenter: dc,
uid: `["default","default","${dc}","${id}"]`,
meta: {
cacheControl: undefined,
cursor: undefined,
},
},
},
payload
);
});
assert.equal(actual.Datacenter, result.Datacenter);
assert.equal(actual.uid, result.uid);
}
);
payload
);
});
assert.equal(actual.Datacenter, result.Datacenter);
assert.equal(actual.uid, result.uid);
}
);
});
});

View File

@ -1,32 +1,33 @@
import { moduleFor, test } from 'ember-qunit';
moduleFor('service:routlet', 'Integration | Routlet', {
// Specify the other units that are required for this test.
integration: true,
});
test('outletFor works', function(assert) {
const routlet = this.subject();
routlet.addOutlet('application', {
name: 'application'
});
routlet.addRoute('dc', {});
routlet.addOutlet('dc', {
name: 'dc'
});
routlet.addRoute('dc.services', {});
routlet.addOutlet('dc.services', {
name: 'dc.services'
});
routlet.addRoute('dc.services.instances', {});
let actual = routlet.outletFor('dc.services');
let expected = 'dc';
assert.equal(actual.name, expected);
actual = routlet.outletFor('dc');
expected = 'application';
assert.equal(actual.name, expected);
actual = routlet.outletFor('application');
expected = undefined;
assert.equal(actual, expected);
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Integration | Routlet', function(hooks) {
setupTest(hooks);
test('outletFor works', function(assert) {
const routlet = this.owner.lookup('service:routlet');
routlet.addOutlet('application', {
name: 'application',
});
routlet.addRoute('dc', {});
routlet.addOutlet('dc', {
name: 'dc',
});
routlet.addRoute('dc.services', {});
routlet.addOutlet('dc.services', {
name: 'dc.services',
});
routlet.addRoute('dc.services.instances', {});
let actual = routlet.outletFor('dc.services');
let expected = 'dc';
assert.equal(actual.name, expected);
actual = routlet.outletFor('dc');
expected = 'application';
assert.equal(actual.name, expected);
actual = routlet.outletFor('application');
expected = undefined;
assert.equal(actual, expected);
});
});

View File

@ -1,16 +1,16 @@
import domEventSourceCallable from 'consul-ui/utils/dom/event-source/callable';
import EventTarget from 'consul-ui/utils/dom/event-target/rsvp';
import { module, skip } from 'qunit';
import { module, test, skip } from 'qunit';
import { setupTest } from 'ember-qunit';
import test from 'ember-sinon-qunit/test-support/test';
import sinon from 'sinon';
module('Integration | Utility | dom/event-source/callable', function(hooks) {
setupTest(hooks);
test('it dispatches messages', function(assert) {
assert.expect(1);
const EventSource = domEventSourceCallable(EventTarget);
const listener = this.stub();
const listener = sinon.stub();
const source = new EventSource(
function(configuration) {
return new Promise(resolve => {
@ -45,7 +45,7 @@ module('Integration | Utility | dom/event-source/callable', function(hooks) {
skip('it dispatches a single open event and closes when called with no callable', function(assert) {
assert.expect(4);
const EventSource = domEventSourceCallable(EventTarget, Promise);
const listener = this.stub();
const listener = sinon.stub();
const source = new EventSource();
source.addEventListener('open', function(e) {
assert.deepEqual(e.target, this);
@ -60,7 +60,7 @@ module('Integration | Utility | dom/event-source/callable', function(hooks) {
test('it dispatches a single open event, and calls the specified callable that can dispatch an event', function(assert) {
assert.expect(1);
const EventSource = domEventSourceCallable(EventTarget);
const listener = this.stub();
const listener = sinon.stub();
const source = new EventSource(function() {
return new Promise(resolve => {
setTimeout(() => {
@ -87,7 +87,7 @@ module('Integration | Utility | dom/event-source/callable', function(hooks) {
test("it can be closed before the first tick, and therefore doesn't run", function(assert) {
assert.expect(4);
const EventSource = domEventSourceCallable(EventTarget);
const listener = this.stub();
const listener = sinon.stub();
const source = new EventSource();
assert.equal(source.readyState, 0);
source.close();

View File

@ -1,6 +1,6 @@
export default function(scenario, find, fillIn, triggerKeyEvent, currentPage) {
const dont = `( don't| shouldn't| can't)?`;
const fillInElement = function(page, name, value) {
const fillInElement = async function(page, name, value) {
const cm = document.querySelector(`textarea[name="${name}"] + .CodeMirror`);
if (cm) {
if (!cm.CodeMirror.options.readOnly) {
@ -11,7 +11,7 @@ export default function(scenario, find, fillIn, triggerKeyEvent, currentPage) {
return page;
} else {
const $el = document.querySelector(`[name="${name}"]`);
fillIn($el, value);
await fillIn($el, value);
return page;
}
};
@ -57,11 +57,13 @@ export default function(scenario, find, fillIn, triggerKeyEvent, currentPage) {
} catch (e) {
obj = currentPage();
}
const res = Object.keys(data).reduce(function(prev, item, i, arr) {
const res = Object.keys(data).reduce(async function(prev, item, i, arr) {
await prev;
const name = `${obj.prefix || property}[${item}]`;
if (negative) {
try {
fillInElement(prev, name, data[item]);
await fillInElement(obj, name, data[item]);
throw new TypeError(`${item} is editable`);
} catch (e) {
if (e instanceof TypeError) {
@ -69,10 +71,9 @@ export default function(scenario, find, fillIn, triggerKeyEvent, currentPage) {
}
}
} else {
return fillInElement(prev, name, data[item]);
return await fillInElement(obj, name, data[item]);
}
}, obj);
await new Promise(resolve => setTimeout(resolve, 0));
}, Promise.resolve());
return res;
}
)

View File

@ -1,9 +1,12 @@
import Application from '../app';
import config from '../config/environment';
import * as QUnit from 'qunit';
import { setApplication } from '@ember/test-helpers';
import { setup } from 'qunit-dom';
import { registerWaiter } from '@ember/test';
import './helpers/flash-message';
import start from 'ember-exam/test-support/start';
import setupSinon from 'ember-sinon-qunit';
import ClientConnections from 'consul-ui/services/client/connections';
@ -33,6 +36,10 @@ ClientConnections.reopen({
});
const application = Application.create(config.APP);
application.inject('component:copy-button', 'clipboard', 'service:clipboard/local-storage');
setApplication(application);
setup(QUnit.assert);
setupSinon();
start();

View File

@ -1,5 +1,4 @@
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Adapter | application', function(hooks) {

View File

@ -1,8 +1,8 @@
import { module, skip } from 'qunit';
import { module, test, skip } from 'qunit';
import { setupTest } from 'ember-qunit';
import test from 'ember-sinon-qunit/test-support/test';
import Route from '@ember/routing/route';
import Mixin from 'consul-ui/mixins/with-blocking-actions';
import sinon from 'sinon';
module('Unit | Mixin | with blocking actions', function(hooks) {
setupTest(hooks);
@ -24,7 +24,7 @@ module('Unit | Mixin | with blocking actions', function(hooks) {
test('afterCreate just calls afterUpdate', function(assert) {
const subject = this.subject();
const expected = [1, 2, 3, 4];
const afterUpdate = this.stub(subject, 'afterUpdate').returns(expected);
const afterUpdate = sinon.stub(subject, 'afterUpdate').returns(expected);
const actual = subject.afterCreate(expected);
assert.deepEqual(actual, expected);
assert.ok(afterUpdate.calledOnce);
@ -33,7 +33,7 @@ module('Unit | Mixin | with blocking actions', function(hooks) {
const subject = this.subject();
const expected = 'dc.kv';
subject.routeName = expected + '.edit';
const transitionTo = this.stub(subject, 'transitionTo').returnsArg(0);
const transitionTo = sinon.stub(subject, 'transitionTo').returnsArg(0);
const actual = subject.afterUpdate();
assert.equal(actual, expected);
assert.ok(transitionTo.calledOnce);
@ -42,7 +42,7 @@ module('Unit | Mixin | with blocking actions', function(hooks) {
const subject = this.subject();
const expected = 'dc.kv';
subject.routeName = expected + '.edit';
const transitionTo = this.stub(subject, 'transitionTo').returnsArg(0);
const transitionTo = sinon.stub(subject, 'transitionTo').returnsArg(0);
const actual = subject.afterDelete();
assert.equal(actual, expected);
assert.ok(transitionTo.calledOnce);
@ -51,7 +51,7 @@ module('Unit | Mixin | with blocking actions', function(hooks) {
const subject = this.subject();
subject.routeName = 'dc.kv.index';
const expected = 'refresh';
const refresh = this.stub(subject, 'refresh').returns(expected);
const refresh = sinon.stub(subject, 'refresh').returns(expected);
const actual = subject.afterDelete();
assert.equal(actual, expected);
assert.ok(refresh.calledOnce);
@ -67,7 +67,7 @@ module('Unit | Mixin | with blocking actions', function(hooks) {
test('action cancel just calls afterUpdate', function(assert) {
const subject = this.subject();
const expected = [1, 2, 3, 4];
const afterUpdate = this.stub(subject, 'afterUpdate').returns(expected);
const afterUpdate = sinon.stub(subject, 'afterUpdate').returns(expected);
// TODO: unsure as to whether ember testing should actually bind this for you?
const actual = subject.actions.cancel.bind(subject)(expected);
assert.deepEqual(actual, expected);

View File

@ -1,6 +1,5 @@
import { module } from 'qunit';
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import test from 'ember-sinon-qunit/test-support/test';
module('Unit | Route | dc', function(hooks) {
setupTest(hooks);

View File

@ -1,5 +1,4 @@
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { HEADERS_SYMBOL as META } from 'consul-ui/utils/http/consul';

View File

@ -1,8 +1,8 @@
import { module, skip } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, skip, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { run } from '@ember/runloop';
import { set } from '@ember/object';
import sinon from 'sinon';
module('Unit | Serializer | kv', function(hooks) {
setupTest(hooks);
@ -101,7 +101,7 @@ module('Unit | Serializer | kv', function(hooks) {
test('serialize decodes Value if its a string', function(assert) {
const serializer = this.owner.lookup('serializer:kv');
set(serializer, 'decoder', {
execute: this.stub().returnsArg(0),
execute: sinon.stub().returnsArg(0),
});
//
const expected = 'value';

View File

@ -1,5 +1,4 @@
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import ascend from 'consul-ui/utils/ascend';
module('Unit | Utils | ascend', function() {

View File

@ -1,5 +1,4 @@
import test from 'ember-sinon-qunit/test-support/test';
import { module, skip } from 'qunit';
import { module, skip, test } from 'qunit';
import atob from 'consul-ui/utils/atob';
module('Unit | Utils | atob', function() {

View File

@ -1,5 +1,4 @@
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import btoa from 'consul-ui/utils/btoa';
module('Unit | Utils | btoa', function() {

View File

@ -1,11 +1,11 @@
import domClosest from 'consul-ui/utils/dom/closest';
import test from 'ember-sinon-qunit/test-support/test';
import { module, skip } from 'qunit';
import { module, skip, test } from 'qunit';
import sinon from 'sinon';
module('Unit | Utility | dom/closest', function() {
test('it calls Element.closest with the specified selector', function(assert) {
const el = {
closest: this.stub().returnsArg(0),
closest: sinon.stub().returnsArg(0),
};
const expected = 'selector';
const actual = domClosest(expected, el);

View File

@ -1,6 +1,6 @@
import createListeners from 'consul-ui/utils/dom/create-listeners';
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import sinon from 'sinon';
module('Unit | Utility | dom/create listeners', function() {
test('it has add and remove methods', function(assert) {
@ -33,7 +33,7 @@ module('Unit | Utility | dom/create listeners', function() {
assert.equal(handlers.length, 0);
});
test('remove calls the remove functions', function(assert) {
const expected = this.stub();
const expected = sinon.stub();
const arr = [expected];
const listeners = createListeners(arr);
listeners.remove();
@ -42,7 +42,7 @@ module('Unit | Utility | dom/create listeners', function() {
});
test('listeners are added on add', function(assert) {
const listeners = createListeners();
const stub = this.stub();
const stub = sinon.stub();
const target = {
addEventListener: stub,
};
@ -54,8 +54,8 @@ module('Unit | Utility | dom/create listeners', function() {
});
test('listeners as objects are added on add and removed on remove', function(assert) {
const listeners = createListeners();
const addStub = this.stub();
const removeStub = this.stub();
const addStub = sinon.stub();
const removeStub = sinon.stub();
const target = {
addEventListener: addStub,
removeEventListener: removeStub,
@ -77,7 +77,7 @@ module('Unit | Utility | dom/create listeners', function() {
});
test('listeners are removed on remove', function(assert) {
const listeners = createListeners();
const stub = this.stub();
const stub = sinon.stub();
const target = {
addEventListener: function() {},
removeEventListener: stub,
@ -91,7 +91,7 @@ module('Unit | Utility | dom/create listeners', function() {
});
test('listeners as functions are removed on remove', function(assert) {
const listeners = createListeners();
const stub = this.stub();
const stub = sinon.stub();
const remove = listeners.add(stub);
remove();
assert.ok(stub.calledOnce);
@ -99,7 +99,7 @@ module('Unit | Utility | dom/create listeners', function() {
test('listeners as other listeners are removed on remove', function(assert) {
const listeners = createListeners();
const listeners2 = createListeners();
const stub = this.stub();
const stub = sinon.stub();
listeners2.add(stub);
const remove = listeners.add(listeners2);
remove();
@ -108,7 +108,7 @@ module('Unit | Utility | dom/create listeners', function() {
test('listeners as functions of other listeners are removed on remove', function(assert) {
const listeners = createListeners();
const listeners2 = createListeners();
const stub = this.stub();
const stub = sinon.stub();
const remove = listeners.add(listeners2.add(stub));
remove();
assert.ok(stub.calledOnce);
@ -120,7 +120,7 @@ module('Unit | Utility | dom/create listeners', function() {
removeEventListener: function() {},
};
const name = 'test';
const expected = this.stub();
const expected = sinon.stub();
const remove = listeners.add(target, name, expected);
const actual = remove();
actual[0]();

View File

@ -2,8 +2,8 @@ import domEventSourceBlocking, {
validateCursor,
createErrorBackoff,
} from 'consul-ui/utils/dom/event-source/blocking';
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import sinon from 'sinon';
module('Unit | Utility | dom/event-source/blocking', function() {
const createEventSource = function() {
@ -74,8 +74,8 @@ module('Unit | Utility | dom/event-source/blocking', function() {
{ errors: [{ status: '504' }] },
{ errors: [{ status: '524' }] },
].forEach(item => {
const timeout = this.stub().callsArg(0);
const resolve = this.stub().withArgs(item);
const timeout = sinon.stub().callsArg(0);
const resolve = sinon.stub().withArgs(item);
const Promise = createPromise(resolve);
const backoff = createErrorBackoff(undefined, Promise, timeout);
const promise = backoff(item);

View File

@ -1,6 +1,6 @@
import domEventSourceCache from 'consul-ui/utils/dom/event-source/cache';
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import sinon from 'sinon';
module('Unit | Utility | dom/event-source/cache', function() {
const createEventSource = function() {
@ -66,8 +66,8 @@ module('Unit | Utility | dom/event-source/cache', function() {
const Promise = createPromise(function() {
return stub;
});
const source = this.stub().returns(Promise.resolve());
const cb = this.stub();
const source = sinon.stub().returns(Promise.resolve());
const cb = sinon.stub();
const getCache = domEventSourceCache(source, EventSource, Promise);
const obj = {};
const cache = getCache(obj);
@ -92,14 +92,14 @@ module('Unit | Utility | dom/event-source/cache', function() {
test('cache creates the default EventSource and keeps it open when there is a cursor', function(assert) {
const EventSource = createEventSource();
const stub = {
close: this.stub(),
close: sinon.stub(),
configuration: { cursor: 1 },
};
const Promise = createPromise(function() {
return stub;
});
const source = this.stub().returns(Promise.resolve());
const cb = this.stub();
const source = sinon.stub().returns(Promise.resolve());
const cb = sinon.stub();
const getCache = domEventSourceCache(source, EventSource, Promise);
const obj = {};
const cache = getCache(obj);
@ -120,14 +120,14 @@ module('Unit | Utility | dom/event-source/cache', function() {
test("cache creates the default EventSource and closes it when there isn't a cursor", function(assert) {
const EventSource = createEventSource();
const stub = {
close: this.stub(),
close: sinon.stub(),
configuration: {},
};
const Promise = createPromise(function() {
return stub;
});
const source = this.stub().returns(Promise.resolve());
const cb = this.stub();
const source = sinon.stub().returns(Promise.resolve());
const cb = sinon.stub();
const getCache = domEventSourceCache(source, EventSource, Promise);
const obj = {};
const cache = getCache(obj);

View File

@ -1,6 +1,6 @@
import domEventSourceCallable, { defaultRunner } from 'consul-ui/utils/dom/event-source/callable';
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import sinon from 'sinon';
module('Unit | Utility | dom/event-source/callable', function() {
const createEventTarget = function() {
@ -43,14 +43,14 @@ module('Unit | Utility | dom/event-source/callable', function() {
return count === 11;
};
const configuration = {};
const then = this.stub().callsArg(0);
const then = sinon.stub().callsArg(0);
const target = {
source: function(configuration) {
return {
then: then,
};
},
dispatchEvent: this.stub(),
dispatchEvent: sinon.stub(),
};
defaultRunner(target, configuration, isClosed);
assert.ok(then.callCount == 10);
@ -59,7 +59,7 @@ module('Unit | Utility | dom/event-source/callable', function() {
test('it calls the defaultRunner', function(assert) {
const Promise = createPromise();
const EventTarget = createEventTarget();
const run = this.stub();
const run = sinon.stub();
const EventSource = domEventSourceCallable(EventTarget, Promise, run);
const source = new EventSource();
assert.ok(run.calledOnce);

View File

@ -1,6 +1,6 @@
import domEventSourceOpenable from 'consul-ui/utils/dom/event-source/openable';
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import sinon from 'sinon';
module('Unit | Utility | dom/event-source/openable', function() {
const createEventSource = function() {
@ -23,7 +23,7 @@ module('Unit | Utility | dom/event-source/openable', function() {
assert.ok(source instanceof EventSource);
});
test('it reopens the event source when open is called', function(assert) {
const callable = this.stub();
const callable = sinon.stub();
const EventSource = createEventSource();
const OpenableEventSource = domEventSourceOpenable(EventSource);
const source = new OpenableEventSource(callable);

View File

@ -1,5 +1,4 @@
import { module, skip } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, skip, test } from 'qunit';
import createURL from 'consul-ui/utils/http/create-url';
import createQueryParams from 'consul-ui/utils/http/create-query-params';

View File

@ -1,5 +1,4 @@
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import isFolder from 'consul-ui/utils/isFolder';
module('Unit | Utils | isFolder', function() {

View File

@ -1,5 +1,4 @@
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import keyToArray from 'consul-ui/utils/keyToArray';
module('Unit | Utils | keyToArray', function() {

View File

@ -1,5 +1,4 @@
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import leftTrim from 'consul-ui/utils/left-trim';
module('Unit | Utility | left trim', function() {

View File

@ -1,5 +1,4 @@
import { module, skip } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, skip, test } from 'qunit';
import promisedTimeout from 'consul-ui/utils/promisedTimeout';
module('Unit | Utils | promisedTimeout', function() {

View File

@ -1,5 +1,4 @@
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import rightTrim from 'consul-ui/utils/right-trim';
module('Unit | Utility | right trim', function() {

View File

@ -1,10 +1,10 @@
import { walk } from 'consul-ui/utils/routing/walk';
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import sinon from 'sinon';
module('Unit | Utility | routing/walk', function() {
test('it walks down deep routes', function(assert) {
const route = this.stub();
const route = sinon.stub();
const Router = {
route: function(name, options, cb) {
route();

View File

@ -1,5 +1,4 @@
import { module } from 'qunit';
import test from 'ember-sinon-qunit/test-support/test';
import { module, test } from 'qunit';
import ucfirst from 'consul-ui/utils/ucfirst';
module('Unit | Utils | ucfirst', function() {

View File

@ -1948,17 +1948,29 @@
ember-compatibility-helpers "^1.2.5"
ember-modifier-manager-polyfill "^1.2.0"
"@ember/test-helpers@^1.7.1":
version "1.7.2"
resolved "https://registry.yarnpkg.com/@ember/test-helpers/-/test-helpers-1.7.2.tgz#5b128dc5f6524c3850abf52668e6bd4fda401194"
integrity sha512-FEJBpbFNIaWAsCSnataiNwYFvmcpoymL/B7fXLruuJ/46BnJjzLaRPtpUIZ91w4GNTK6knxbHWXW76aVb3Aezg==
"@ember/test-helpers@^2.1.4":
version "2.8.1"
resolved "https://registry.yarnpkg.com/@ember/test-helpers/-/test-helpers-2.8.1.tgz#20f2e30d48172c2ff713e1db7fbec5352f918d4e"
integrity sha512-jbsYwWyAdhL/pdPu7Gb3SG1gvIXY70FWMtC/Us0Kmvk82Y+5YUQ1SOC0io75qmOGYQmH7eQrd/bquEVd+4XtdQ==
dependencies:
"@ember/test-waiters" "^3.0.0"
"@embroider/macros" "^1.6.0"
"@embroider/util" "^1.6.0"
broccoli-debug "^0.6.5"
broccoli-funnel "^2.0.2"
ember-assign-polyfill "^2.6.0"
ember-cli-babel "^7.7.3"
ember-cli-htmlbars-inline-precompile "^2.1.0"
ember-test-waiters "^1.1.1"
broccoli-funnel "^3.0.8"
ember-cli-babel "^7.26.6"
ember-cli-htmlbars "^5.7.1"
ember-destroyable-polyfill "^2.0.3"
"@ember/test-waiters@^3.0.0":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@ember/test-waiters/-/test-waiters-3.0.2.tgz#5b950c580a1891ed1d4ee64f9c6bacf49a15ea6f"
integrity sha512-H8Q3Xy9rlqhDKnQpwt2pzAYDouww4TZIGSI1pZJhM7mQIGufQKuB0ijzn/yugA6Z+bNdjYp1HioP8Y4hn2zazQ==
dependencies:
calculate-cache-key-for-tree "^2.0.0"
ember-cli-babel "^7.26.6"
ember-cli-version-checker "^5.1.2"
semver "^7.3.5"
"@embroider/core@0.33.0", "@embroider/core@^0.33.0":
version "0.33.0"
@ -2039,6 +2051,20 @@
resolve "^1.20.0"
semver "^7.3.2"
"@embroider/macros@1.8.3", "@embroider/macros@^1.6.0":
version "1.8.3"
resolved "https://registry.yarnpkg.com/@embroider/macros/-/macros-1.8.3.tgz#2f0961ab8871f6ad819630208031d705b357757e"
integrity sha512-gnIOfTL/pUkoD6oI7JyWOqXlVIUgZM+CnbH10/YNtZr2K0hij9eZQMdgjOZZVgN0rKOFw9dIREqc1ygrJHRYQA==
dependencies:
"@embroider/shared-internals" "1.8.3"
assert-never "^1.2.1"
babel-import-util "^1.1.0"
ember-cli-babel "^7.26.6"
find-up "^5.0.0"
lodash "^4.17.21"
resolve "^1.20.0"
semver "^7.3.2"
"@embroider/shared-internals@0.41.0":
version "0.41.0"
resolved "https://registry.yarnpkg.com/@embroider/shared-internals/-/shared-internals-0.41.0.tgz#2553f026d4f48ea1fd11235501feb63bf49fa306"
@ -2065,6 +2091,20 @@
semver "^7.3.5"
typescript-memoize "^1.0.1"
"@embroider/shared-internals@1.8.3", "@embroider/shared-internals@^1.0.0":
version "1.8.3"
resolved "https://registry.yarnpkg.com/@embroider/shared-internals/-/shared-internals-1.8.3.tgz#52d868dc80016e9fe983552c0e516f437bf9b9f9"
integrity sha512-N5Gho6Qk8z5u+mxLCcMYAoQMbN4MmH+z2jXwQHVs859bxuZTxwF6kKtsybDAASCtd2YGxEmzcc1Ja/wM28824w==
dependencies:
babel-import-util "^1.1.0"
ember-rfc176-data "^0.3.17"
fs-extra "^9.1.0"
js-string-escape "^1.0.1"
lodash "^4.17.21"
resolve-package-path "^4.0.1"
semver "^7.3.5"
typescript-memoize "^1.0.1"
"@embroider/util@^0.39.1 || ^0.40.0 || ^0.41.0":
version "0.41.0"
resolved "https://registry.yarnpkg.com/@embroider/util/-/util-0.41.0.tgz#5324cb4742aa4ed8d613c4f88a466f73e4e6acc1"
@ -2083,6 +2123,15 @@
broccoli-funnel "^3.0.5"
ember-cli-babel "^7.23.1"
"@embroider/util@^1.6.0":
version "1.8.3"
resolved "https://registry.yarnpkg.com/@embroider/util/-/util-1.8.3.tgz#7267a2b6fcbf3e56712711441159ab373f9bee7a"
integrity sha512-FvsPzsb9rNeveSnIGnsfLkWWBdSM5QIA9lDVtckUktRnRnBWZHm5jDxU/ST//pWMhZ8F0DucRlFWE149MTLtuQ==
dependencies:
"@embroider/macros" "1.8.3"
broccoli-funnel "^3.0.5"
ember-cli-babel "^7.23.1"
"@eslint/eslintrc@^0.4.0":
version "0.4.0"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.0.tgz#99cc0a0584d72f1df38b900fb062ba995f395547"
@ -3387,6 +3436,11 @@ babel-import-util@^0.2.0:
resolved "https://registry.yarnpkg.com/babel-import-util/-/babel-import-util-0.2.0.tgz#b468bb679919601a3570f9e317536c54f2862e23"
integrity sha512-CtWYYHU/MgK88rxMrLfkD356dApswtR/kWZ/c6JifG1m10e7tBBrs/366dFzWMAoqYmG5/JSh+94tUSpIwh+ag==
babel-import-util@^1.1.0:
version "1.2.2"
resolved "https://registry.yarnpkg.com/babel-import-util/-/babel-import-util-1.2.2.tgz#1027560e143a4a68b1758e71d4fadc661614e495"
integrity sha512-8HgkHWt5WawRFukO30TuaL9EiDUOdvyKtDwLma4uBNeUSDbOO0/hiPfavrOWxSS6J6TKXfukWHZ3wiqZhJ8ONQ==
babel-loader@^8.0.6, babel-loader@^8.1.0:
version "8.2.2"
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.2.tgz#9363ce84c10c9a40e6c753748e1441b60c8a0b81"
@ -3471,11 +3525,6 @@ babel-plugin-filter-imports@^4.0.0:
"@babel/types" "^7.7.2"
lodash "^4.17.15"
babel-plugin-htmlbars-inline-precompile@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/babel-plugin-htmlbars-inline-precompile/-/babel-plugin-htmlbars-inline-precompile-1.0.0.tgz#a9d2f6eaad8a3f3d361602de593a8cbef8179c22"
integrity sha512-4jvKEHR1bAX03hBDZ94IXsYCj3bwk9vYsn6ux6JZNL2U5pvzCWjqyrGahfsGNrhERyxw8IqcirOi9Q6WCo3dkQ==
babel-plugin-htmlbars-inline-precompile@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/babel-plugin-htmlbars-inline-precompile/-/babel-plugin-htmlbars-inline-precompile-3.2.0.tgz#c4882ea875d0f5683f0d91c1f72e29a4f14b5606"
@ -4427,7 +4476,7 @@ broccoli-funnel@^3.0.1, broccoli-funnel@^3.0.2, broccoli-funnel@^3.0.3:
path-posix "^1.0.0"
walk-sync "^2.0.2"
broccoli-funnel@^3.0.5:
broccoli-funnel@^3.0.5, broccoli-funnel@^3.0.8:
version "3.0.8"
resolved "https://registry.yarnpkg.com/broccoli-funnel/-/broccoli-funnel-3.0.8.tgz#f5b62e2763c3918026a15a3c833edc889971279b"
integrity sha512-ng4eIhPYiXqMw6SyGoxPHR3YAwEd2lr9FgBI1CyTbspl4txZovOsmzFkMkGAlu88xyvYXJqHiM2crfLa65T1BQ==
@ -5444,10 +5493,10 @@ commander@2.8.x:
dependencies:
graceful-readlink ">= 1.0.0"
commander@7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-7.1.0.tgz#f2eaecf131f10e36e07d894698226e36ae0eb5ff"
integrity sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg==
commander@7.2.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==
commander@^2.20.0, commander@^2.6.0:
version "2.20.3"
@ -5464,7 +5513,7 @@ commander@^6.2.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==
common-tags@^1.4.0, common-tags@^1.8.0:
common-tags@^1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937"
integrity sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw==
@ -6292,13 +6341,40 @@ ember-assign-helper@^0.3.0:
ember-cli-babel "^7.19.0"
ember-cli-htmlbars "^4.3.1"
ember-assign-polyfill@^2.6.0:
version "2.7.2"
resolved "https://registry.yarnpkg.com/ember-assign-polyfill/-/ember-assign-polyfill-2.7.2.tgz#58f6f60235126cb23df248c846008fa9a3245fc1"
integrity sha512-hDSaKIZyFS0WRQsWzxUgO6pJPFfmcpfdM7CbGoMgYGriYbvkKn+k8zTXSKpTFVGehhSmsLE9YPqisQ9QpPisfA==
ember-auto-import@^1.11.3:
version "1.12.2"
resolved "https://registry.yarnpkg.com/ember-auto-import/-/ember-auto-import-1.12.2.tgz#cc7298ee5c0654b0249267de68fb27a2861c3579"
integrity sha512-gLqML2k77AuUiXxWNon1FSzuG1DV7PEPpCLCU5aJvf6fdL6rmFfElsZRh+8ELEB/qP9dT+LHjNEunVzd2dYc8A==
dependencies:
ember-cli-babel "^7.20.5"
ember-cli-version-checker "^2.0.0"
"@babel/core" "^7.1.6"
"@babel/preset-env" "^7.10.2"
"@babel/traverse" "^7.1.6"
"@babel/types" "^7.1.6"
"@embroider/shared-internals" "^1.0.0"
babel-core "^6.26.3"
babel-loader "^8.0.6"
babel-plugin-syntax-dynamic-import "^6.18.0"
babylon "^6.18.0"
broccoli-debug "^0.6.4"
broccoli-node-api "^1.7.0"
broccoli-plugin "^4.0.0"
broccoli-source "^3.0.0"
debug "^3.1.0"
ember-cli-babel "^7.0.0"
enhanced-resolve "^4.0.0"
fs-extra "^6.0.1"
fs-tree-diff "^2.0.0"
handlebars "^4.3.1"
js-string-escape "^1.0.1"
lodash "^4.17.19"
mkdirp "^0.5.1"
resolve-package-path "^3.1.0"
rimraf "^2.6.2"
semver "^7.3.4"
symlink-or-copy "^1.2.0"
typescript-memoize "^1.0.0-alpha.3"
walk-sync "^0.3.3"
webpack "^4.43.0"
ember-auto-import@^1.5.2, ember-auto-import@^1.5.3, ember-auto-import@^1.6.0:
version "1.10.1"
@ -6402,7 +6478,7 @@ ember-cli-babel-plugin-helpers@^1.0.0, ember-cli-babel-plugin-helpers@^1.1.0, em
resolved "https://registry.yarnpkg.com/ember-cli-babel-plugin-helpers/-/ember-cli-babel-plugin-helpers-1.1.1.tgz#5016b80cdef37036c4282eef2d863e1d73576879"
integrity sha512-sKvOiPNHr5F/60NLd7SFzMpYPte/nnGkq/tMIfXejfKHIhaiIkYFqX8Z9UFTKWLLn+V7NOaby6niNPZUdvKCRw==
ember-cli-babel@7, ember-cli-babel@^7.0.0, ember-cli-babel@^7.1.3, ember-cli-babel@^7.10.0, ember-cli-babel@^7.11.0, ember-cli-babel@^7.12.0, ember-cli-babel@^7.13.0, ember-cli-babel@^7.17.2, ember-cli-babel@^7.18.0, ember-cli-babel@^7.19.0, ember-cli-babel@^7.20.0, ember-cli-babel@^7.20.5, ember-cli-babel@^7.21.0, ember-cli-babel@^7.22.1, ember-cli-babel@^7.23.0, ember-cli-babel@^7.23.1, ember-cli-babel@^7.7.3, ember-cli-babel@^7.8.0:
ember-cli-babel@7, ember-cli-babel@^7.0.0, ember-cli-babel@^7.1.3, ember-cli-babel@^7.10.0, ember-cli-babel@^7.13.0, ember-cli-babel@^7.17.2, ember-cli-babel@^7.18.0, ember-cli-babel@^7.19.0, ember-cli-babel@^7.20.0, ember-cli-babel@^7.20.5, ember-cli-babel@^7.21.0, ember-cli-babel@^7.22.1, ember-cli-babel@^7.23.0, ember-cli-babel@^7.23.1, ember-cli-babel@^7.7.3, ember-cli-babel@^7.8.0:
version "7.26.1"
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-7.26.1.tgz#d3f06bd9aec8aac9197c5ff4d0b87ff1e4f0d62a"
integrity sha512-WEWP3hJSe9CWL22gEWQ+Y3uKMGk1vLoIREUQfJNKrgUUh3l49bnfAamh3ywcAQz31IgzvkLPO8ZTXO4rxnuP4Q==
@ -6454,7 +6530,7 @@ ember-cli-babel@^6.0.0, ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.11.0,
ember-cli-version-checker "^2.1.2"
semver "^5.5.0"
ember-cli-babel@^7.26.3, ember-cli-babel@^7.26.5:
ember-cli-babel@^7.13.2, ember-cli-babel@^7.26.3, ember-cli-babel@^7.26.5:
version "7.26.11"
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-7.26.11.tgz#50da0fe4dcd99aada499843940fec75076249a9f"
integrity sha512-JJYeYjiz/JTn34q7F5DSOjkkZqy8qwFOOxXfE6pe9yEJqWGu4qErKxlz8I22JoVEQ/aBUO+OcKTpmctvykM9YA==
@ -6573,17 +6649,6 @@ ember-cli-get-component-path-option@^1.0.0:
resolved "https://registry.yarnpkg.com/ember-cli-get-component-path-option/-/ember-cli-get-component-path-option-1.0.0.tgz#0d7b595559e2f9050abed804f1d8eff1b08bc771"
integrity sha1-DXtZVVni+QUKvtgE8djv8bCLx3E=
ember-cli-htmlbars-inline-precompile@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/ember-cli-htmlbars-inline-precompile/-/ember-cli-htmlbars-inline-precompile-2.1.0.tgz#61b91ff1879d44ae504cadb46fb1f2604995ae08"
integrity sha512-BylIHduwQkncPhnj0ZyorBuljXbTzLgRo6kuHf1W+IHFxThFl2xG+r87BVwsqx4Mn9MTgW9SE0XWjwBJcSWd6Q==
dependencies:
babel-plugin-htmlbars-inline-precompile "^1.0.0"
ember-cli-version-checker "^2.1.2"
hash-for-dep "^1.2.3"
heimdalljs-logger "^0.1.9"
silent-error "^1.1.0"
ember-cli-htmlbars@^3.0.1:
version "3.1.0"
resolved "https://registry.yarnpkg.com/ember-cli-htmlbars/-/ember-cli-htmlbars-3.1.0.tgz#87806c2a0bca2ab52d4fb8af8e2215c1ca718a99"
@ -6636,7 +6701,7 @@ ember-cli-htmlbars@^5.0.0, ember-cli-htmlbars@^5.1.0, ember-cli-htmlbars@^5.1.2,
strip-bom "^4.0.0"
walk-sync "^2.2.0"
ember-cli-htmlbars@^5.3.2:
ember-cli-htmlbars@^5.3.2, ember-cli-htmlbars@^5.7.1:
version "5.7.2"
resolved "https://registry.yarnpkg.com/ember-cli-htmlbars/-/ember-cli-htmlbars-5.7.2.tgz#e0cd2fb3c20d85fe4c3e228e6f0590ee1c645ba8"
integrity sha512-Uj6R+3TtBV5RZoJY14oZn/sNPnc+UgmC8nb5rI4P3fR/gYoyTFIZSXiIM7zl++IpMoIrocxOrgt+mhonKphgGg==
@ -6799,12 +6864,12 @@ ember-cli-test-info@^1.0.0:
dependencies:
ember-cli-string-utils "^1.0.0"
ember-cli-test-loader@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/ember-cli-test-loader/-/ember-cli-test-loader-2.2.0.tgz#3fb8d5d1357e4460d3f0a092f5375e71b6f7c243"
integrity sha512-mlSXX9SciIRwGkFTX6XGyJYp4ry6oCFZRxh5jJ7VH8UXLTNx2ZACtDTwaWtNhYrWXgKyiDUvmD8enD56aePWRA==
ember-cli-test-loader@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ember-cli-test-loader/-/ember-cli-test-loader-3.0.0.tgz#1c036fc48de36155355fcda3266af63f977826f1"
integrity sha512-wfFRBrfO9gaKScYcdQxTfklx9yp1lWK6zv1rZRpkas9z2SHyJojF7NOQRWQgSB3ypm7vfpiF8VsFFVVr7VBzAQ==
dependencies:
ember-cli-babel "^6.8.1"
ember-cli-babel "^7.13.2"
ember-cli-typescript@3.0.0:
version "3.0.0"
@ -6885,7 +6950,7 @@ ember-cli-uglify@^3.0.0:
broccoli-uglify-sourcemap "^3.1.0"
lodash.defaultsdeep "^4.6.0"
ember-cli-version-checker@^2.0.0, ember-cli-version-checker@^2.1.0, ember-cli-version-checker@^2.1.2:
ember-cli-version-checker@^2.1.0, ember-cli-version-checker@^2.1.2:
version "2.2.0"
resolved "https://registry.yarnpkg.com/ember-cli-version-checker/-/ember-cli-version-checker-2.2.0.tgz#47771b731fe0962705e27c8199a9e3825709f3b3"
integrity sha512-G+KtYIVlSOWGcNaTFHk76xR4GdzDLzAS4uxZUKdASuFX0KJE43C6DaqL+y3VTpUFLI2FIkAS6HZ4I1YBi+S3hg==
@ -7135,7 +7200,7 @@ ember-decorators@^6.1.1:
"@ember-decorators/object" "^6.1.1"
ember-cli-babel "^7.7.3"
ember-destroyable-polyfill@^2.0.2:
ember-destroyable-polyfill@^2.0.2, ember-destroyable-polyfill@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/ember-destroyable-polyfill/-/ember-destroyable-polyfill-2.0.3.tgz#1673ed66609a82268ef270a7d917ebd3647f11e1"
integrity sha512-TovtNqCumzyAiW0/OisSkkVK93xnVF4NRU6+FN0ubpfwEOpRrmM2RqDwXI6YAChCgSHON1cz0DfQStpA1Gjuuw==
@ -7403,18 +7468,20 @@ ember-power-select@^4.0.0, ember-power-select@^4.0.5:
ember-text-measurer "^0.6.0"
ember-truth-helpers "^2.1.0 || ^3.0.0"
ember-qunit@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/ember-qunit/-/ember-qunit-4.6.0.tgz#ad79fd3ff00073a8779400cc5a4b44829517590f"
integrity sha512-i5VOGn0RP8XH+5qkYDOZshbqAvO6lHgF65D0gz8vRx4DszCIvJMJO+bbftBTfYMxp6rqG85etAA6pfNxE0DqsQ==
ember-qunit@^5.1.1:
version "5.1.5"
resolved "https://registry.yarnpkg.com/ember-qunit/-/ember-qunit-5.1.5.tgz#24a7850f052be24189ff597dfc31b923e684c444"
integrity sha512-2cFA4oMygh43RtVcMaBrr086Tpdhgbn3fVZ2awLkzF/rnSN0D0PSRpd7hAD7OdBPerC/ZYRwzVyGXLoW/Zes4A==
dependencies:
"@ember/test-helpers" "^1.7.1"
broccoli-funnel "^2.0.2"
broccoli-funnel "^3.0.8"
broccoli-merge-trees "^3.0.2"
common-tags "^1.4.0"
ember-cli-babel "^7.12.0"
ember-cli-test-loader "^2.2.0"
qunit "^2.9.3"
common-tags "^1.8.0"
ember-auto-import "^1.11.3"
ember-cli-babel "^7.26.6"
ember-cli-test-loader "^3.0.0"
resolve-package-path "^3.1.0"
silent-error "^1.1.1"
validate-peer-dependencies "^1.2.0"
ember-ref-modifier@^1.0.0:
version "1.0.1"
@ -7629,14 +7696,6 @@ ember-test-selectors@^5.0.0:
ember-cli-babel "^7.22.1"
ember-cli-version-checker "^5.1.1"
ember-test-waiters@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/ember-test-waiters/-/ember-test-waiters-1.2.0.tgz#c12ead4313934c24cff41857020cacdbf8e6effe"
integrity sha512-aEw7YuutLuJT4NUuPTNiGFwgTYl23ThqmBxSkfFimQAn+keWjAftykk3dlFELuhsJhYW/S8YoVjN0bSAQRLNtw==
dependencies:
ember-cli-babel "^7.11.0"
semver "^6.3.0"
ember-text-measurer@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/ember-text-measurer/-/ember-text-measurer-0.6.0.tgz#140eda044fd7d4d7f60f654dd30da79c06922b2e"
@ -10290,11 +10349,6 @@ jquery@^3.4.1, jquery@^3.5.0:
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.0.tgz#c72a09f15c1bdce142f49dbf1170bdf8adac2470"
integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==
js-reporters@1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/js-reporters/-/js-reporters-1.2.3.tgz#8febcab370539df62e09b95da133da04b11f6168"
integrity sha512-2YzWkHbbRu6LueEs5ZP3P1LqbECvAeUJYrjw3H4y1ofW06hqCS0AbzBtLwbr+Hke51bt9CUepJ/Fj1hlCRIF6A==
js-string-escape@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef"
@ -11734,10 +11788,10 @@ node-releases@^2.0.2:
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.2.tgz#7139fe71e2f4f11b47d4d2986aaf8c48699e0c01"
integrity sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==
node-watch@0.7.1:
version "0.7.1"
resolved "https://registry.yarnpkg.com/node-watch/-/node-watch-0.7.1.tgz#0caaa6a6833b0d533487f953c52a6c787769ba7c"
integrity sha512-UWblPYuZYrkCQCW5PxAwYSxaELNBLUckrTBBk8xr1/bUgyOkYYTsUcV4e3ytcazFEOyiRyiUrsG37pu6I0I05g==
node-watch@0.7.3:
version "0.7.3"
resolved "https://registry.yarnpkg.com/node-watch/-/node-watch-0.7.3.tgz#6d4db88e39c8d09d3ea61d6568d80e5975abc7ab"
integrity sha512-3l4E8uMPY1HdMMryPRUAl+oIHtXtyiTlIiESNSVSNxcPfzAFzeTbXFQkZfAwBbo0B1qMSG8nUABx+Gd+YrbKrQ==
nomnom@^1.5.x:
version "1.8.1"
@ -12705,7 +12759,7 @@ quick-temp@^0.1.2, quick-temp@^0.1.3, quick-temp@^0.1.5, quick-temp@^0.1.8:
rimraf "^2.5.4"
underscore.string "~3.3.4"
qunit-dom@^1.0.0:
qunit-dom@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/qunit-dom/-/qunit-dom-1.6.0.tgz#a4bea6a46329d221e4a317d712cb40709107b977"
integrity sha512-YwSqcLjQcRI0fUFpaSWwU10KIJPFW5Qh+d3cT5DOgx81dypRuUSiPkKFmBY/CDs/R1KdHRadthkcXg2rqAon8Q==
@ -12715,15 +12769,14 @@ qunit-dom@^1.0.0:
ember-cli-babel "^7.23.0"
ember-cli-version-checker "^5.1.1"
qunit@^2.9.3:
version "2.14.1"
resolved "https://registry.yarnpkg.com/qunit/-/qunit-2.14.1.tgz#02ba25c108f0845fda411a42b5cbfca0f0319943"
integrity sha512-jtFw8bf8+GjzY8UpnwbjqTOdK/rvrjcafUFTNpRc6/9N4q5dBwcwSMlcC76kAn5BRiSFj5Ssn2dfHtEYvtsXSw==
qunit@^2.13.0:
version "2.19.1"
resolved "https://registry.yarnpkg.com/qunit/-/qunit-2.19.1.tgz#eb1afd188da9e47f07c13aa70461a1d9c4505490"
integrity sha512-gSGuw0vErE/rNjnlBW/JmE7NNubBlGrDPQvsug32ejYhcVFuZec9yoU0+C30+UgeCGwq6Ap89K65dMGo+kDGZQ==
dependencies:
commander "7.1.0"
js-reporters "1.2.3"
node-watch "0.7.1"
tiny-glob "0.2.8"
commander "7.2.0"
node-watch "0.7.3"
tiny-glob "0.2.9"
raf-pool@~0.1.4:
version "0.1.4"
@ -13686,7 +13739,7 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
silent-error@^1.0.0, silent-error@^1.0.1, silent-error@^1.1.0, silent-error@^1.1.1:
silent-error@^1.0.0, silent-error@^1.0.1, silent-error@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/silent-error/-/silent-error-1.1.1.tgz#f72af5b0d73682a2ba1778b7e32cd8aa7c2d8662"
integrity sha512-n4iEKyNcg4v6/jpb3c0/iyH2G1nzUNl7Gpqtn/mHIJK9S/q/7MCfoO4rwVOoO59qPFIc0hVHvMbiOJ0NdtxKKw==
@ -14531,10 +14584,10 @@ tiny-emitter@^2.0.0:
resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423"
integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==
tiny-glob@0.2.8:
version "0.2.8"
resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.8.tgz#b2792c396cc62db891ffa161fe8b33e76123e531"
integrity sha512-vkQP7qOslq63XRX9kMswlby99kyO5OvKptw7AMwBVMjXEI7Tb61eoI5DydyEMOseyGS5anDN1VPoVxEvH01q8w==
tiny-glob@0.2.9:
version "0.2.9"
resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.9.tgz#2212d441ac17928033b110f8b3640683129d31e2"
integrity sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==
dependencies:
globalyzer "0.1.0"
globrex "^0.1.2"
@ -15235,6 +15288,14 @@ validate-npm-package-name@^3.0.0:
dependencies:
builtins "^1.0.3"
validate-peer-dependencies@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/validate-peer-dependencies/-/validate-peer-dependencies-1.2.0.tgz#22aab93c514f4fda457d36c80685e8b1160d2036"
integrity sha512-nd2HUpKc6RWblPZQ2GDuI65sxJ2n/UqZwSBVtj64xlWjMx0m7ZB2m9b2JS3v1f+n9VWH/dd1CMhkHfP6pIdckA==
dependencies:
resolve-package-path "^3.1.0"
semver "^7.3.2"
validated-changeset@0.10.0, validated-changeset@~0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/validated-changeset/-/validated-changeset-0.10.0.tgz#2e8188c089ab282c1b51fba3c289073f6bd14c8b"