-
+
{{#if (token/is-legacy item) }}
- Legacy tokens have embedded policies.
+ Legacy tokens have embedded rules.
{{ else }}
- {{#each item.Policies as |item|}}
- {{item.Name}}
+ {{#each (append item.Policies item.Roles) as |item|}}
+ {{item.Name}}
{{/each}}
{{/if}}
diff --git a/ui-v2/app/templates/dc/nodes/-services.hbs b/ui-v2/app/templates/dc/nodes/-services.hbs
index e692bb0d52..de00507b3b 100644
--- a/ui-v2/app/templates/dc/nodes/-services.hbs
+++ b/ui-v2/app/templates/dc/nodes/-services.hbs
@@ -25,12 +25,8 @@
{{item.Port}}
-
- {{#if (gt item.Tags.length 0)}}
- {{#each item.Tags as |item|}}
- {{item}}
- {{/each}}
- {{/if}}
+
+ {{tag-list items=item.Tags}}
{{/block-slot}}
{{/tabular-collection}}
diff --git a/ui-v2/app/templates/dc/services/index.hbs b/ui-v2/app/templates/dc/services/index.hbs
index 82f803566d..6812f5a6af 100644
--- a/ui-v2/app/templates/dc/services/index.hbs
+++ b/ui-v2/app/templates/dc/services/index.hbs
@@ -47,12 +47,8 @@
passingWidth=passingWidth warningWidth=warningWidth criticalWidth=criticalWidth
}}
-
- {{#if (gt item.Tags.length 0)}}
- {{#each item.Tags as |item|}}
- {{item}}
- {{/each}}
- {{/if}}
+
+ {{tag-list items=item.Tags}}
{{/block-slot}}
{{/tabular-collection}}
diff --git a/ui-v2/app/utils/dom/event-source/callable.js b/ui-v2/app/utils/dom/event-source/callable.js
index cc266940ae..a25633c1bf 100644
--- a/ui-v2/app/utils/dom/event-source/callable.js
+++ b/ui-v2/app/utils/dom/event-source/callable.js
@@ -1,5 +1,6 @@
export const defaultRunner = function(target, configuration, isClosed) {
if (isClosed(target)) {
+ target.dispatchEvent({ type: 'close' });
return;
}
// TODO Consider wrapping this is a promise for none thenable returns
diff --git a/ui-v2/app/utils/dom/event-source/index.js b/ui-v2/app/utils/dom/event-source/index.js
index 6c8de125f8..d7168ad913 100644
--- a/ui-v2/app/utils/dom/event-source/index.js
+++ b/ui-v2/app/utils/dom/event-source/index.js
@@ -22,7 +22,7 @@ export const BlockingEventSource = BlockingEventSourceFactory(ReopenableEventSou
export const StorageEventSource = StorageEventSourceFactory(EventTarget, Promise);
// various utils
-export const proxy = proxyFactory(ObjectProxy, ArrayProxy);
+export const proxy = proxyFactory(ObjectProxy, ArrayProxy, createListeners);
export const resolve = firstResolverFactory(Promise);
export const source = function(source) {
@@ -30,7 +30,52 @@ export const source = function(source) {
// i.e. resolve/reject on first response
return resolve(source, createListeners()).then(function(data) {
// create API needed for conventional DD/computed and Controllers
- return proxy(data, source, createListeners());
+ return proxy(source, data);
});
};
export const cache = cacheFactory(source, BlockingEventSource, Promise);
+
+const errorEvent = function(e) {
+ return new ErrorEvent('error', {
+ error: e,
+ message: e.message,
+ });
+};
+export const fromPromise = function(promise) {
+ return new CallableEventSource(function(configuration) {
+ const dispatch = this.dispatchEvent.bind(this);
+ const close = () => {
+ this.close();
+ };
+ return promise
+ .then(function(result) {
+ close();
+ dispatch({ type: 'message', data: result });
+ })
+ .catch(function(e) {
+ close();
+ dispatch(errorEvent(e));
+ });
+ });
+};
+export const toPromise = function(target, cb, eventName = 'message', errorName = 'error') {
+ return new Promise(function(resolve, reject) {
+ // TODO: e.target.data
+ const message = function(e) {
+ resolve(e.data);
+ };
+ const error = function(e) {
+ reject(e.error);
+ };
+ const remove = function() {
+ if (typeof target.close === 'function') {
+ target.close();
+ }
+ target.removeEventListener(eventName, message);
+ target.removeEventListener(errorName, error);
+ };
+ target.addEventListener(eventName, message);
+ target.addEventListener(errorName, error);
+ cb(remove);
+ });
+};
diff --git a/ui-v2/app/utils/dom/event-source/proxy.js b/ui-v2/app/utils/dom/event-source/proxy.js
index c36de9aac1..19f0d3d5cb 100644
--- a/ui-v2/app/utils/dom/event-source/proxy.js
+++ b/ui-v2/app/utils/dom/event-source/proxy.js
@@ -1,8 +1,10 @@
import { get, set } from '@ember/object';
-export default function(ObjProxy, ArrProxy) {
- return function(data, source, listeners) {
+export default function(ObjProxy, ArrProxy, createListeners) {
+ return function(source, data = []) {
let Proxy = ObjProxy;
+ // TODO: Why are these two separate?
+ // And when is data ever a string?
if (typeof data !== 'string' && typeof get(data, 'length') !== 'undefined') {
data = data.filter(function(item) {
return !get(item, 'isDestroyed') && !get(item, 'isDeleted') && get(item, 'isLoaded');
@@ -13,18 +15,22 @@ export default function(ObjProxy, ArrProxy) {
}
const proxy = Proxy.create({
content: data,
+ closed: false,
+ error: null,
init: function() {
- this.listeners = listeners;
- this.listeners.add(source, 'message', e => {
- set(this, 'content', e.data);
- });
+ this.listeners = createListeners();
+ this.listeners.add(source, 'message', e => set(this, 'content', e.data));
+ this.listeners.add(source, 'open', () => set(this, 'closed', false));
+ this.listeners.add(source, 'close', () => set(this, 'closed', true));
+ this.listeners.add(source, 'error', e => set(this, 'error', e.error));
},
configuration: source.configuration,
addEventListener: function(type, handler) {
// Force use of computed for messages
- if (type !== 'message') {
- this.listeners.add(source, type, handler);
- }
+ // Temporarily disable this restriction
+ // if (type !== 'message') {
+ this.listeners.add(source, type, handler);
+ // }
},
getCurrentEvent: function() {
return source.getCurrentEvent(...arguments);
diff --git a/ui-v2/app/utils/form/builder.js b/ui-v2/app/utils/form/builder.js
index 101e238781..feba1adbfd 100644
--- a/ui-v2/app/utils/form/builder.js
+++ b/ui-v2/app/utils/form/builder.js
@@ -32,26 +32,25 @@ const defaultChangeset = function(data, validators) {
*/
export default function(changeset = defaultChangeset, getFormNameProperty = parseElementName) {
return function(name = '', obj = {}) {
- let _data;
- const _name = name;
const _children = {};
let _validators = null;
// TODO make this into a class to reuse prototype
- return {
+ const form = {
+ data: null,
+ name: name,
getName: function() {
- return _name;
+ return this.name;
},
setData: function(data) {
// Array check temporarily for when we get an empty array from repo.status
if (_validators && !Array.isArray(data)) {
- _data = changeset(data, _validators);
- } else {
- _data = data;
+ data = changeset(data, _validators);
}
+ set(this, 'data', data);
return this;
},
getData: function() {
- return _data;
+ return this.data;
},
add: function(child) {
_children[child.getName()] = child;
@@ -66,7 +65,7 @@ export default function(changeset = defaultChangeset, getFormNameProperty = pars
//
let config = obj;
// if the name (usually the name of the model) isn't this form, look at its children
- if (name !== _name) {
+ if (name !== this.getName()) {
if (this.has(name)) {
// is its a child form then use the child form
return this.form(name).handleEvent(e);
@@ -128,6 +127,20 @@ export default function(changeset = defaultChangeset, getFormNameProperty = pars
}
return this;
},
+ clear: function(cb = {}) {
+ if (typeof cb === 'function') {
+ return (this.clearer = cb);
+ } else {
+ return this.setData(this.clearer(cb)).getData();
+ }
+ },
+ submit: function(cb = {}) {
+ if (typeof cb === 'function') {
+ return (this.submitter = cb);
+ } else {
+ this.submitter(this.getData());
+ }
+ },
setValidators: function(validators) {
_validators = validators;
return this;
@@ -156,5 +169,8 @@ export default function(changeset = defaultChangeset, getFormNameProperty = pars
return typeof _children[name] !== 'undefined';
},
};
+ form.submit = form.submit.bind(form);
+ form.reset = form.reset.bind(form);
+ return form;
};
}
diff --git a/ui-v2/app/utils/minimizeModel.js b/ui-v2/app/utils/minimizeModel.js
new file mode 100644
index 0000000000..6411ad8ce7
--- /dev/null
+++ b/ui-v2/app/utils/minimizeModel.js
@@ -0,0 +1,17 @@
+import { get } from '@ember/object';
+
+export default function(arr) {
+ if (Array.isArray(arr)) {
+ return arr
+ .filter(function(item) {
+ // Just incase, don't save any models that aren't saved
+ return !get(item, 'isNew');
+ })
+ .map(function(item) {
+ return {
+ ID: get(item, 'ID'),
+ Name: get(item, 'Name'),
+ };
+ });
+ }
+}
diff --git a/ui-v2/app/utils/update-array-object.js b/ui-v2/app/utils/update-array-object.js
index 4bdee8c8be..ef834c81e8 100644
--- a/ui-v2/app/utils/update-array-object.js
+++ b/ui-v2/app/utils/update-array-object.js
@@ -1,12 +1,21 @@
import { get, set } from '@ember/object';
-export default function(arr, item, prop, value) {
+import ObjectProxy from '@ember/object/proxy';
+export default function(items, item, prop, value) {
value = typeof value === 'undefined' ? get(item, prop) : value;
- const current = arr.findBy(prop, value);
- if (current) {
- // TODO: This is reliant on changeset?
- Object.keys(get(item, 'data')).forEach(function(prop) {
- set(current, prop, get(item, prop));
- });
- return current;
+ const pos = items.findIndex(function(item) {
+ return get(item, prop) === value;
+ });
+ if (pos !== -1) {
+ // TODO: We only currently use this with EventSources
+ // would be good to check this doesn't do anything unexpected
+ // with other proxies.
+ // Before we get there, we might have figured a better way to do
+ // this anyway
+ if (item instanceof ObjectProxy) {
+ set(item, 'content', items.objectAt(pos));
+ }
+ items.replace(pos, 1, [item]);
+ items.enumerableContentDidChange();
}
+ return item;
}
diff --git a/ui-v2/app/validations/role.js b/ui-v2/app/validations/role.js
new file mode 100644
index 0000000000..eabd7b6557
--- /dev/null
+++ b/ui-v2/app/validations/role.js
@@ -0,0 +1,4 @@
+import { validateFormat } from 'ember-changeset-validations/validators';
+export default {
+ Name: validateFormat({ regex: /^[A-Za-z0-9\-_]{1,256}$/ }),
+};
diff --git a/ui-v2/package.json b/ui-v2/package.json
index 507717e5ee..c7eec5373f 100644
--- a/ui-v2/package.json
+++ b/ui-v2/package.json
@@ -49,7 +49,7 @@
"dart-sass": "^1.14.1",
"ember-ajax": "^3.0.0",
"ember-browserify": "^1.2.2",
- "ember-changeset-validations": "^1.2.11",
+ "ember-changeset-validations": "^2.1.0",
"ember-cli": "~2.18.2",
"ember-cli-app-version": "^3.0.0",
"ember-cli-autoprefixer": "^0.8.1",
diff --git a/ui-v2/tests/acceptance/dc/acls/policies/as-many/add-existing.feature b/ui-v2/tests/acceptance/dc/acls/policies/as-many/add-existing.feature
new file mode 100644
index 0000000000..caf09020bb
--- /dev/null
+++ b/ui-v2/tests/acceptance/dc/acls/policies/as-many/add-existing.feature
@@ -0,0 +1,46 @@
+@setupApplicationTest
+Feature: dc / acls / policies / as many / add existing: Add existing policy
+ Scenario: Adding an existing policy as a child of [Model]
+ Given 1 datacenter model with the value "datacenter"
+ And 1 [Model] model from yaml
+ ---
+ Policies: ~
+ ServiceIdentities: ~
+ ---
+ And 2 policy models from yaml
+ ---
+ - ID: policy-1
+ Name: Policy 1
+ - ID: policy-2
+ Name: Policy 2
+ ---
+ When I visit the [Model] page for yaml
+ ---
+ dc: datacenter
+ [Model]: key
+ ---
+ Then the url should be /datacenter/acls/[Model]s/key
+ And I click "#policies .ember-power-select-trigger"
+ And I click ".ember-power-select-option:first-child"
+ And I see 1 policy model on the policies component
+ And I click "#policies .ember-power-select-trigger"
+ And I click ".ember-power-select-option:nth-child(1)"
+ And I see 2 policy models on the policies component
+ And I submit
+ Then a PUT request is made to "/v1/acl/[Model]/key?dc=datacenter" with the body from yaml
+ ---
+ Policies:
+ - ID: policy-1
+ Name: Policy 1
+ - ID: policy-2
+ Name: Policy 2
+ ---
+ Then the url should be /datacenter/acls/[Model]s
+ And "[data-notification]" has the "notification-update" class
+ And "[data-notification]" has the "success" class
+ Where:
+ -------------
+ | Model |
+ | token |
+ | role |
+ -------------
diff --git a/ui-v2/tests/acceptance/dc/acls/policies/as-many/add-new.feature b/ui-v2/tests/acceptance/dc/acls/policies/as-many/add-new.feature
new file mode 100644
index 0000000000..e1d79522fe
--- /dev/null
+++ b/ui-v2/tests/acceptance/dc/acls/policies/as-many/add-new.feature
@@ -0,0 +1,79 @@
+@setupApplicationTest
+Feature: dc / acls / policies / as many / add new: Add new policy
+ Background:
+ Given 1 datacenter model with the value "datacenter"
+ And 1 [Model] model from yaml
+ ---
+ Policies: ~
+ ServiceIdentities: ~
+ ---
+ When I visit the [Model] page for yaml
+ ---
+ dc: datacenter
+ [Model]: key
+ ---
+ Then the url should be /datacenter/acls/[Model]s/key
+ And I click policies.create
+ Scenario: Adding a new policy as a child of [Model]
+ Then I fill in the policies.form with yaml
+ ---
+ Name: New-Policy
+ Description: New Policy Description
+ Rules: key {}
+ ---
+ And I click submit on the policies.form
+ Then the last PUT request was made to "/v1/acl/policy?dc=datacenter" with the body from yaml
+ ---
+ Name: New-Policy
+ Description: New Policy Description
+ Rules: key {}
+ ---
+ And I submit
+ Then a PUT request is made to "/v1/acl/[Model]/key?dc=datacenter" with the body from yaml
+ ---
+ Policies:
+ - Name: New-Policy
+ ID: ee52203d-989f-4f7a-ab5a-2bef004164ca-1
+ ---
+ Then the url should be /datacenter/acls/[Model]s
+ And "[data-notification]" has the "notification-update" class
+ And "[data-notification]" has the "success" class
+ Where:
+ -------------
+ | Model |
+ | token |
+ | role |
+ -------------
+ Scenario: Adding a new service identity as a child of [Model]
+ Then I fill in the policies.form with yaml
+ ---
+ Name: New-Service-Identity
+ Description: New Service Identity Description
+ ---
+ And I click serviceIdentity on the policies.form
+ And I click submit on the policies.form
+ And I submit
+ Then a PUT request is made to "/v1/acl/[Model]/key?dc=datacenter" with the body from yaml
+ ---
+ ServiceIdentities:
+ - ServiceName: New-Service-Identity
+ ---
+ Then the url should be /datacenter/acls/[Model]s
+ And "[data-notification]" has the "notification-update" class
+ And "[data-notification]" has the "success" class
+ Where:
+ -------------
+ | Model |
+ | token |
+ | role |
+ -------------
+@ignore:
+ Scenario: Click the cancel form
+ Then ok
+ # And I click cancel on the policyForm
+ Where:
+ -------------
+ | Model |
+ | token |
+ | role |
+ -------------
diff --git a/ui-v2/tests/acceptance/dc/acls/policies/as-many/list.feature b/ui-v2/tests/acceptance/dc/acls/policies/as-many/list.feature
new file mode 100644
index 0000000000..31a9f32c43
--- /dev/null
+++ b/ui-v2/tests/acceptance/dc/acls/policies/as-many/list.feature
@@ -0,0 +1,32 @@
+@setupApplicationTest
+Feature: dc / acls / policies / as many / list: List
+ Scenario: Listing policies as children of the [Model] page
+ Given 1 datacenter model with the value "datacenter"
+ And 1 [Model] model from yaml
+ ---
+ ServiceIdentities:
+ - ServiceName: Service-Identity
+ - ServiceName: Service-Identity 2
+ - ServiceName: Service-Identity 3
+ Policies:
+ - Name: Policy
+ ID: 0000
+ - Name: Policy 2
+ ID: 0002
+ - Name: Policy 3
+ ID: 0003
+ ---
+ When I visit the [Model] page for yaml
+ ---
+ dc: datacenter
+ [Model]: key
+ ---
+ Then the url should be /datacenter/acls/[Model]s/key
+ # ServiceIdentities turn into policies
+ Then I see 6 policy models on the policies component
+ Where:
+ -------------
+ | Model |
+ | token |
+ | role |
+ -------------
diff --git a/ui-v2/tests/acceptance/dc/acls/policies/as-many/remove.feature b/ui-v2/tests/acceptance/dc/acls/policies/as-many/remove.feature
new file mode 100644
index 0000000000..c45cd5199f
--- /dev/null
+++ b/ui-v2/tests/acceptance/dc/acls/policies/as-many/remove.feature
@@ -0,0 +1,35 @@
+@setupApplicationTest
+Feature: dc / acls / policies / as many / remove: Remove
+ Scenario: Removing policies as children of the [Model] page
+ Given 1 datacenter model with the value "datacenter"
+ And 1 [Model] model from yaml
+ ---
+ ServiceIdentities: ~
+ Policies:
+ - Name: Policy
+ ID: 00000000-0000-0000-0000-000000000001
+ ---
+ When I visit the [Model] page for yaml
+ ---
+ dc: datacenter
+ [Model]: key
+ ---
+ Then the url should be /datacenter/acls/[Model]s/key
+ And I see 1 policy model on the policies component
+ And I click expand on the policies.selectedOptions
+ And the last GET request was made to "/v1/acl/policy/00000000-0000-0000-0000-000000000001?dc=datacenter"
+ And I click delete on the policies.selectedOptions
+ And I click confirmDelete on the policies.selectedOptions
+ And I see 0 policy models on the policies component
+ And I submit
+ Then a PUT request is made to "/v1/acl/[Model]/key?dc=datacenter" with the body from yaml
+ ---
+ Policies: [[]]
+ ---
+ Then the url should be /datacenter/acls/[Model]s
+ Where:
+ -------------
+ | Model |
+ | token |
+ | role |
+ -------------
diff --git a/ui-v2/tests/acceptance/dc/acls/policies/delete.feature b/ui-v2/tests/acceptance/dc/acls/policies/delete.feature
new file mode 100644
index 0000000000..5b296d6b93
--- /dev/null
+++ b/ui-v2/tests/acceptance/dc/acls/policies/delete.feature
@@ -0,0 +1,46 @@
+@setupApplicationTest
+Feature: dc / acls / policies / delete: Policy Delete
+ Background:
+ Given 1 datacenter model with the value "datacenter"
+ Scenario: Deleting a policy model from the policies listing page
+ Given 1 policy model from yaml
+ ---
+ ID: 1981f51d-301a-497b-89a0-05112ef02b4b
+ ---
+ When I visit the policies page for yaml
+ ---
+ dc: datacenter
+ ---
+ And I click actions on the policies
+ And I click delete on the policies
+ And I click confirmDelete on the policies
+ Then a DELETE request is made to "/v1/acl/policy/1981f51d-301a-497b-89a0-05112ef02b4b?dc=datacenter"
+ And "[data-notification]" has the "notification-delete" class
+ And "[data-notification]" has the "success" class
+ Given the url "/v1/acl/policy/1981f51d-301a-497b-89a0-05112ef02b4b?dc=datacenter" responds with a 500 status
+ And I click actions on the policies
+ And I click delete on the policies
+ And I click confirmDelete on the policies
+ And "[data-notification]" has the "notification-delete" class
+ And "[data-notification]" has the "error" class
+ Scenario: Deleting a policy from the policy detail page
+ When I visit the policy page for yaml
+ ---
+ dc: datacenter
+ policy: 1981f51d-301a-497b-89a0-05112ef02b4b
+ ---
+ And I click delete
+ And I click confirmDelete on the deleteModal
+ Then a DELETE request is made to "/v1/acl/policy/1981f51d-301a-497b-89a0-05112ef02b4b?dc=datacenter"
+ And "[data-notification]" has the "notification-delete" class
+ And "[data-notification]" has the "success" class
+ When I visit the policy page for yaml
+ ---
+ dc: datacenter
+ policy: 1981f51d-301a-497b-89a0-05112ef02b4b
+ ---
+ Given the url "/v1/acl/policy/1981f51d-301a-497b-89a0-05112ef02b4b?dc=datacenter" responds with a 500 status
+ And I click delete
+ And I click confirmDelete on the deleteModal
+ And "[data-notification]" has the "notification-delete" class
+ And "[data-notification]" has the "error" class
diff --git a/ui-v2/tests/acceptance/dc/acls/tokens/policies/add-existing.feature b/ui-v2/tests/acceptance/dc/acls/roles/as-many/add-existing.feature
similarity index 63%
rename from ui-v2/tests/acceptance/dc/acls/tokens/policies/add-existing.feature
rename to ui-v2/tests/acceptance/dc/acls/roles/as-many/add-existing.feature
index 4cbdeec827..1eda3497a6 100644
--- a/ui-v2/tests/acceptance/dc/acls/tokens/policies/add-existing.feature
+++ b/ui-v2/tests/acceptance/dc/acls/roles/as-many/add-existing.feature
@@ -1,19 +1,19 @@
@setupApplicationTest
-Feature: dc / acls / tokens / policies: ACL Token add existing policy
+Feature: dc / acls / roles / as many / add existing: Add existing
Scenario:
Given 1 datacenter model with the value "datacenter"
And 1 token model from yaml
---
AccessorID: key
Description: The Description
- Policies: ~
+ Roles: ~
---
- And 2 policy models from yaml
+ And 2 role models from yaml
---
- - ID: policy-1
- Name: Policy 1
- - ID: policy-2
- Name: Policy 2
+ - ID: role-1
+ Name: Role 1
+ - ID: role-2
+ Name: Role 2
---
When I visit the token page for yaml
---
@@ -21,12 +21,12 @@ Feature: dc / acls / tokens / policies: ACL Token add existing policy
token: key
---
Then the url should be /datacenter/acls/tokens/key
- And I click "[data-test-policy-element] .ember-power-select-trigger"
+ And I click "#roles .ember-power-select-trigger"
And I click ".ember-power-select-option:first-child"
- And I see 1 policy model
- And I click "[data-test-policy-element] .ember-power-select-trigger"
+ And I see 1 role model on the roles component
+ And I click "#roles .ember-power-select-trigger"
And I click ".ember-power-select-option:nth-child(1)"
- And I see 2 policy models
+ And I see 2 role models on the roles component
Then I fill in with yaml
---
Description: The Description
@@ -35,11 +35,11 @@ Feature: dc / acls / tokens / policies: ACL Token add existing policy
Then a PUT request is made to "/v1/acl/token/key?dc=datacenter" with the body from yaml
---
Description: The Description
- Policies:
- - ID: policy-1
- Name: Policy 1
- - ID: policy-2
- Name: Policy 2
+ Roles:
+ - ID: role-1
+ Name: Role 1
+ - ID: role-2
+ Name: Role 2
---
Then the url should be /datacenter/acls/tokens
And "[data-notification]" has the "notification-update" class
diff --git a/ui-v2/tests/acceptance/dc/acls/roles/as-many/add-new.feature b/ui-v2/tests/acceptance/dc/acls/roles/as-many/add-new.feature
new file mode 100644
index 0000000000..32ef8a6923
--- /dev/null
+++ b/ui-v2/tests/acceptance/dc/acls/roles/as-many/add-new.feature
@@ -0,0 +1,139 @@
+@setupApplicationTest
+Feature: dc / acls / roles / as many / add new: Add new
+ Background:
+ Given 1 datacenter model with the value "datacenter"
+ And 1 token model from yaml
+ ---
+ AccessorID: key
+ Description: The Description
+ Roles: ~
+ Policies: ~
+ ServiceIdentities: ~
+ ---
+ And 1 policy model from yaml
+ ---
+ ID: policy-1
+ Name: policy
+ ---
+ When I visit the token page for yaml
+ ---
+ dc: datacenter
+ token: key
+ ---
+ Then the url should be /datacenter/acls/tokens/key
+ And I click roles.create
+ Then I fill in the roles.form with yaml
+ ---
+ Name: New-Role
+ Description: New Role Description
+ ---
+ Scenario: Add Policy-less Role
+ And I click submit on the roles.form
+ Then the last PUT request was made to "/v1/acl/role?dc=datacenter" with the body from yaml
+ ---
+ Name: New-Role
+ Description: New Role Description
+ ---
+ And I submit
+ Then a PUT request is made to "/v1/acl/token/key?dc=datacenter" with the body from yaml
+ ---
+ Description: The Description
+ Roles:
+ - Name: New-Role
+ ID: ee52203d-989f-4f7a-ab5a-2bef004164ca-1
+ ---
+ Then the url should be /datacenter/acls/tokens
+ And "[data-notification]" has the "notification-update" class
+ And "[data-notification]" has the "success" class
+ Scenario: Add Role that has an existing Policy
+ And I click "#new-role-toggle + div .ember-power-select-trigger"
+ And I click ".ember-power-select-option:first-child"
+ And I click submit on the roles.form
+ Then the last PUT request was made to "/v1/acl/role?dc=datacenter" with the body from yaml
+ ---
+ Name: New-Role
+ Description: New Role Description
+ Policies:
+ - ID: policy-1
+ Name: policy
+ ---
+ And I submit
+ Then a PUT request is made to "/v1/acl/token/key?dc=datacenter" with the body from yaml
+ ---
+ Description: The Description
+ Roles:
+ - Name: New-Role
+ ID: ee52203d-989f-4f7a-ab5a-2bef004164ca-1
+ ---
+ Then the url should be /datacenter/acls/tokens
+ And "[data-notification]" has the "notification-update" class
+ And "[data-notification]" has the "success" class
+ Scenario: Add Role and add a new Policy
+ And I click roles.form.policies.create
+ Then I fill in the roles.form.policies.form with yaml
+ ---
+ Name: New-Policy
+ Description: New Policy Description
+ Rules: key {}
+ ---
+ # This next line is actually the popped up policyForm due to the way things currently work
+ And I click submit on the roles.form
+ Then the last PUT request was made to "/v1/acl/policy?dc=datacenter" with the body from yaml
+ ---
+ Name: New-Policy
+ Description: New Policy Description
+ Rules: key {}
+ ---
+ And I click submit on the roles.form
+ Then the last PUT request was made to "/v1/acl/role?dc=datacenter" with the body from yaml
+ ---
+ Name: New-Role
+ Description: New Role Description
+ Policies:
+ # TODO: Ouch, we need to do deep partial comparisons here
+ - ID: ee52203d-989f-4f7a-ab5a-2bef004164ca-1
+ Name: New-Policy
+ ---
+ And I submit
+ Then a PUT request is made to "/v1/acl/token/key?dc=datacenter" with the body from yaml
+ ---
+ Description: The Description
+ Roles:
+ - Name: New-Role
+ ID: ee52203d-989f-4f7a-ab5a-2bef004164ca-1
+ ---
+ Then the url should be /datacenter/acls/tokens
+ And "[data-notification]" has the "notification-update" class
+ And "[data-notification]" has the "success" class
+ Scenario: Add Role and add a new Service Identity
+ And I click roles.form.policies.create
+ Then I fill in the roles.form.policies.form with yaml
+ ---
+ Name: New-Service-Identity
+ ---
+ And I click "[value='service-identity']"
+ # This next line is actually the popped up policyForm due to the way things currently work
+ And I click submit on the roles.form
+ And I click submit on the roles.form
+ Then the last PUT request was made to "/v1/acl/role?dc=datacenter" with the body from yaml
+ ---
+ Name: New-Role
+ Description: New Role Description
+ ServiceIdentities:
+ - ServiceName: New-Service-Identity
+ ---
+ And I submit
+ Then a PUT request is made to "/v1/acl/token/key?dc=datacenter" with the body from yaml
+ ---
+ Description: The Description
+ Roles:
+ - Name: New-Role
+ ID: ee52203d-989f-4f7a-ab5a-2bef004164ca-1
+ ---
+ Then the url should be /datacenter/acls/tokens
+ And "[data-notification]" has the "notification-update" class
+ And "[data-notification]" has the "success" class
+@ignore:
+ Scenario: Click the cancel form
+ Then ok
+ # And I click cancel on the policyForm
diff --git a/ui-v2/tests/acceptance/dc/acls/tokens/policies/list.feature b/ui-v2/tests/acceptance/dc/acls/roles/as-many/list.feature
similarity index 66%
rename from ui-v2/tests/acceptance/dc/acls/tokens/policies/list.feature
rename to ui-v2/tests/acceptance/dc/acls/roles/as-many/list.feature
index 8f70c32b21..430f36e6a4 100644
--- a/ui-v2/tests/acceptance/dc/acls/tokens/policies/list.feature
+++ b/ui-v2/tests/acceptance/dc/acls/roles/as-many/list.feature
@@ -1,16 +1,16 @@
@setupApplicationTest
-Feature: dc / acls / tokens / policies: List
+Feature: dc / acls / roles / as many / list: List
Scenario:
Given 1 datacenter model with the value "datacenter"
And 1 token model from yaml
---
AccessorID: key
- Policies:
- - Name: Policy
+ Roles:
+ - Name: Role
ID: 0000
- - Name: Policy 2
+ - Name: Role 2
ID: 0002
- - Name: Policy 3
+ - Name: Role 3
ID: 0003
---
When I visit the token page for yaml
@@ -19,4 +19,4 @@ Feature: dc / acls / tokens / policies: List
token: key
---
Then the url should be /datacenter/acls/tokens/key
- Then I see 3 policy models
+ Then I see 3 role models on the roles component
diff --git a/ui-v2/tests/acceptance/dc/acls/tokens/policies/remove.feature b/ui-v2/tests/acceptance/dc/acls/roles/as-many/remove.feature
similarity index 57%
rename from ui-v2/tests/acceptance/dc/acls/tokens/policies/remove.feature
rename to ui-v2/tests/acceptance/dc/acls/roles/as-many/remove.feature
index 90b681ae25..f8052e4721 100644
--- a/ui-v2/tests/acceptance/dc/acls/tokens/policies/remove.feature
+++ b/ui-v2/tests/acceptance/dc/acls/roles/as-many/remove.feature
@@ -1,12 +1,12 @@
@setupApplicationTest
-Feature: dc / acls / tokens / policies: Remove
+Feature: dc / acls / roles / as many / remove: Remove
Scenario:
Given 1 datacenter model with the value "datacenter"
And 1 token model from yaml
---
AccessorID: key
- Policies:
- - Name: Policy
+ Roles:
+ - Name: Role
ID: 00000000-0000-0000-0000-000000000001
---
When I visit the token page for yaml
@@ -15,15 +15,14 @@ Feature: dc / acls / tokens / policies: Remove
token: key
---
Then the url should be /datacenter/acls/tokens/key
- And I see 1 policy model
- And I click expand on the policies
- And the last GET request was made to "/v1/acl/policy/00000000-0000-0000-0000-000000000001?dc=datacenter"
- And I click delete on the policies
- And I click confirmDelete on the policies
- And I see 0 policy models
+ And I see 1 role model on the roles component
+ And I click actions on the roles.selectedOptions
+ And I click delete on the roles.selectedOptions
+ And I click confirmDelete on the roles.selectedOptions
+ And I see 0 role models on the roles component
And I submit
Then a PUT request is made to "/v1/acl/token/key?dc=datacenter" with the body from yaml
---
- Policies: []
+ Roles: []
---
Then the url should be /datacenter/acls/tokens
diff --git a/ui-v2/tests/acceptance/dc/acls/roles/index.feature b/ui-v2/tests/acceptance/dc/acls/roles/index.feature
new file mode 100644
index 0000000000..244e4539ae
--- /dev/null
+++ b/ui-v2/tests/acceptance/dc/acls/roles/index.feature
@@ -0,0 +1,12 @@
+@setupApplicationTest
+Feature: dc / acls / roles / index: ACL Roles List
+
+ Scenario:
+ Given 1 datacenter model with the value "dc-1"
+ And 3 role models
+ When I visit the roles page for yaml
+ ---
+ dc: dc-1
+ ---
+ Then the url should be /dc-1/acls/roles
+ Then I see 3 role models
diff --git a/ui-v2/tests/acceptance/dc/acls/roles/update.feature b/ui-v2/tests/acceptance/dc/acls/roles/update.feature
new file mode 100644
index 0000000000..ed2d00c416
--- /dev/null
+++ b/ui-v2/tests/acceptance/dc/acls/roles/update.feature
@@ -0,0 +1,44 @@
+@setupApplicationTest
+Feature: dc / acls / roles / update: ACL Role Update
+ Background:
+ Given 1 datacenter model with the value "datacenter"
+ And 1 role model from yaml
+ ---
+ ID: role-id
+ ---
+ And 3 token models
+ When I visit the role page for yaml
+ ---
+ dc: datacenter
+ role: role-id
+ ---
+ Then the url should be /datacenter/acls/roles/role-id
+ Then I see 3 token models
+ Scenario: Update to [Name], [Rules], [Description]
+ Then I fill in the role form with yaml
+ ---
+ Name: [Name]
+ Description: [Description]
+ ---
+ And I submit
+ Then a PUT request is made to "/v1/acl/role/role-id?dc=datacenter" with the body from yaml
+ ---
+ Name: [Name]
+ Description: [Description]
+ ---
+ Then the url should be /datacenter/acls/roles
+ And "[data-notification]" has the "notification-update" class
+ And "[data-notification]" has the "success" class
+ Where:
+ ------------------------------------------
+ | Name | Description |
+ | role-name | role-name description |
+ | role | role name description |
+ | roleName | role%20name description |
+ ------------------------------------------
+ Scenario: There was an error saving the key
+ Given the url "/v1/acl/role/role-id" responds with a 500 status
+ And I submit
+ Then the url should be /datacenter/acls/roles/role-id
+ Then "[data-notification]" has the "notification-update" class
+ And "[data-notification]" has the "error" class
diff --git a/ui-v2/tests/acceptance/dc/acls/tokens/policies/add-new.feature b/ui-v2/tests/acceptance/dc/acls/tokens/policies/add-new.feature
deleted file mode 100644
index d7ee2b715b..0000000000
--- a/ui-v2/tests/acceptance/dc/acls/tokens/policies/add-new.feature
+++ /dev/null
@@ -1,45 +0,0 @@
-@setupApplicationTest
-Feature: dc / acls / tokens / policies: Add new
- Scenario:
- Given 1 datacenter model with the value "datacenter"
- And 1 token model from yaml
- ---
- AccessorID: key
- Description: The Description
- Policies: ~
- ---
- When I visit the token page for yaml
- ---
- dc: datacenter
- token: key
- ---
- Then the url should be /datacenter/acls/tokens/key
- And I click newPolicy
- Then I fill in the policy form with yaml
- ---
- Name: New-Policy
- Description: New Description
- Rules: key {}
- ---
- And I click submit on the policyForm
- Then the last PUT request was made to "/v1/acl/policy?dc=datacenter" with the body from yaml
- ---
- Name: New-Policy
- Description: New Description
- Rules: key {}
- ---
- And I submit
- Then a PUT request is made to "/v1/acl/token/key?dc=datacenter" with the body from yaml
- ---
- Description: The Description
- Policies:
- - Name: New-Policy
- ID: ee52203d-989f-4f7a-ab5a-2bef004164ca-1
- ---
- Then the url should be /datacenter/acls/tokens
- And "[data-notification]" has the "notification-update" class
- And "[data-notification]" has the "success" class
-@pending:
- Scenario: Click the cancel form
- Then ok
- # And I click cancel on the policyForm
diff --git a/ui-v2/tests/acceptance/deleting.feature b/ui-v2/tests/acceptance/deleting.feature
index 41fce5a37b..9f18d94533 100644
--- a/ui-v2/tests/acceptance/deleting.feature
+++ b/ui-v2/tests/acceptance/deleting.feature
@@ -37,7 +37,6 @@ Feature: deleting: Deleting items with confirmations, success and error notifica
| kv | kvs | DELETE | /v1/kv/key-name?dc=datacenter | ["key-name"] | kv: key-name |
| intention | intentions | DELETE | /v1/connect/intentions/ee52203d-989f-4f7a-ab5a-2bef004164ca?dc=datacenter | {"SourceName": "name", "ID": "ee52203d-989f-4f7a-ab5a-2bef004164ca"} | intention: ee52203d-989f-4f7a-ab5a-2bef004164ca |
| token | tokens | DELETE | /v1/acl/token/001fda31-194e-4ff1-a5ec-589abf2cafd0?dc=datacenter | {"AccessorID": "001fda31-194e-4ff1-a5ec-589abf2cafd0"} | token: 001fda31-194e-4ff1-a5ec-589abf2cafd0 |
- | policy | policies | DELETE | /v1/acl/policy/1981f51d-301a-497b-89a0-05112ef02b4b?dc=datacenter | {"ID": "1981f51d-301a-497b-89a0-05112ef02b4b"} | policy: 1981f51d-301a-497b-89a0-05112ef02b4b |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Scenario: Deleting a [Model] from the [Model] detail page
When I visit the [Model] page for yaml
diff --git a/ui-v2/tests/acceptance/page-navigation.feature b/ui-v2/tests/acceptance/page-navigation.feature
index 44dbe02611..1a13332223 100644
--- a/ui-v2/tests/acceptance/page-navigation.feature
+++ b/ui-v2/tests/acceptance/page-navigation.feature
@@ -47,8 +47,9 @@ Feature: Page Navigation
| kv | kvs | /dc-1/kv/0-key-value/edit | /v1/session/info/ee52203d-989f-4f7a-ab5a-2bef004164ca?dc=dc-1 | /dc-1/kv |
# | acl | acls | /dc-1/acls/anonymous | /v1/acl/info/anonymous?dc=dc-1 | /dc-1/acls |
| intention | intentions | /dc-1/intentions/ee52203d-989f-4f7a-ab5a-2bef004164ca | /v1/internal/ui/services?dc=dc-1 | /dc-1/intentions |
- | token | tokens | /dc-1/acls/tokens/ee52203d-989f-4f7a-ab5a-2bef004164ca | /v1/acl/policies?dc=dc-1 | /dc-1/acls/tokens |
- | policy | policies | /dc-1/acls/policies/ee52203d-989f-4f7a-ab5a-2bef004164ca | /v1/acl/tokens?policy=ee52203d-989f-4f7a-ab5a-2bef004164ca&dc=dc-1 | /dc-1/acls/policies |
+# These Endpoints will be datacenters due to the datacenters checkbox selectors
+ | token | tokens | /dc-1/acls/tokens/ee52203d-989f-4f7a-ab5a-2bef004164ca | /v1/catalog/datacenters | /dc-1/acls/tokens |
+ | policy | policies | /dc-1/acls/policies/ee52203d-989f-4f7a-ab5a-2bef004164ca | /v1/catalog/datacenters | /dc-1/acls/policies |
# | token | tokens | /dc-1/acls/tokens/00000000-0000-0000-0000-000000000000 | /v1/acl/token/00000000-0000-0000-0000-000000000000?dc=dc-1 | /dc-1/acls/tokens |
# | policy | policies | /dc-1/acls/policies/ee52203d-989f-4f7a-ab5a-2bef004164ca | /v1/acl/policy/ee52203d-989f-4f7a-ab5a-2bef004164ca?dc=dc-1 | /dc-1/acls/policies |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/ui-v2/tests/acceptance/steps/dc/acls/tokens/policies/add-new-steps.js b/ui-v2/tests/acceptance/steps/dc/acls/policies/as-many/add-existing-steps.js
similarity index 100%
rename from ui-v2/tests/acceptance/steps/dc/acls/tokens/policies/add-new-steps.js
rename to ui-v2/tests/acceptance/steps/dc/acls/policies/as-many/add-existing-steps.js
diff --git a/ui-v2/tests/acceptance/steps/dc/acls/policies/as-many/add-new-steps.js b/ui-v2/tests/acceptance/steps/dc/acls/policies/as-many/add-new-steps.js
new file mode 100644
index 0000000000..550f688585
--- /dev/null
+++ b/ui-v2/tests/acceptance/steps/dc/acls/policies/as-many/add-new-steps.js
@@ -0,0 +1,10 @@
+import steps from '../../../../steps';
+
+// step definitions that are shared between features should be moved to the
+// tests/acceptance/steps/steps.js file
+
+export default function(assert) {
+ return steps(assert).then('I should find a file', function() {
+ assert.ok(true, this.step);
+ });
+}
diff --git a/ui-v2/tests/acceptance/steps/dc/acls/tokens/policies/list-steps.js b/ui-v2/tests/acceptance/steps/dc/acls/policies/as-many/list-steps.js
similarity index 61%
rename from ui-v2/tests/acceptance/steps/dc/acls/tokens/policies/list-steps.js
rename to ui-v2/tests/acceptance/steps/dc/acls/policies/as-many/list-steps.js
index 4ce41c3555..550f688585 100644
--- a/ui-v2/tests/acceptance/steps/dc/acls/tokens/policies/list-steps.js
+++ b/ui-v2/tests/acceptance/steps/dc/acls/policies/as-many/list-steps.js
@@ -4,8 +4,7 @@ import steps from '../../../../steps';
// tests/acceptance/steps/steps.js file
export default function(assert) {
- return steps(assert)
- .then('I should find a file', function() {
- assert.ok(true, this.step);
- });
+ return steps(assert).then('I should find a file', function() {
+ assert.ok(true, this.step);
+ });
}
diff --git a/ui-v2/tests/acceptance/steps/dc/acls/tokens/policies/remove-steps.js b/ui-v2/tests/acceptance/steps/dc/acls/policies/as-many/remove-steps.js
similarity index 61%
rename from ui-v2/tests/acceptance/steps/dc/acls/tokens/policies/remove-steps.js
rename to ui-v2/tests/acceptance/steps/dc/acls/policies/as-many/remove-steps.js
index 4ce41c3555..550f688585 100644
--- a/ui-v2/tests/acceptance/steps/dc/acls/tokens/policies/remove-steps.js
+++ b/ui-v2/tests/acceptance/steps/dc/acls/policies/as-many/remove-steps.js
@@ -4,8 +4,7 @@ import steps from '../../../../steps';
// tests/acceptance/steps/steps.js file
export default function(assert) {
- return steps(assert)
- .then('I should find a file', function() {
- assert.ok(true, this.step);
- });
+ return steps(assert).then('I should find a file', function() {
+ assert.ok(true, this.step);
+ });
}
diff --git a/ui-v2/tests/acceptance/steps/dc/acls/policies/delete-steps.js b/ui-v2/tests/acceptance/steps/dc/acls/policies/delete-steps.js
new file mode 100644
index 0000000000..9bfbe9ac9b
--- /dev/null
+++ b/ui-v2/tests/acceptance/steps/dc/acls/policies/delete-steps.js
@@ -0,0 +1,10 @@
+import steps from '../../../steps';
+
+// step definitions that are shared between features should be moved to the
+// tests/acceptance/steps/steps.js file
+
+export default function(assert) {
+ return steps(assert).then('I should find a file', function() {
+ assert.ok(true, this.step);
+ });
+}
diff --git a/ui-v2/tests/acceptance/steps/dc/acls/tokens/policies/add-existing-steps.js b/ui-v2/tests/acceptance/steps/dc/acls/roles/as-many/add-existing-steps.js
similarity index 61%
rename from ui-v2/tests/acceptance/steps/dc/acls/tokens/policies/add-existing-steps.js
rename to ui-v2/tests/acceptance/steps/dc/acls/roles/as-many/add-existing-steps.js
index 4ce41c3555..550f688585 100644
--- a/ui-v2/tests/acceptance/steps/dc/acls/tokens/policies/add-existing-steps.js
+++ b/ui-v2/tests/acceptance/steps/dc/acls/roles/as-many/add-existing-steps.js
@@ -4,8 +4,7 @@ import steps from '../../../../steps';
// tests/acceptance/steps/steps.js file
export default function(assert) {
- return steps(assert)
- .then('I should find a file', function() {
- assert.ok(true, this.step);
- });
+ return steps(assert).then('I should find a file', function() {
+ assert.ok(true, this.step);
+ });
}
diff --git a/ui-v2/tests/acceptance/steps/dc/acls/roles/as-many/add-new-steps.js b/ui-v2/tests/acceptance/steps/dc/acls/roles/as-many/add-new-steps.js
new file mode 100644
index 0000000000..550f688585
--- /dev/null
+++ b/ui-v2/tests/acceptance/steps/dc/acls/roles/as-many/add-new-steps.js
@@ -0,0 +1,10 @@
+import steps from '../../../../steps';
+
+// step definitions that are shared between features should be moved to the
+// tests/acceptance/steps/steps.js file
+
+export default function(assert) {
+ return steps(assert).then('I should find a file', function() {
+ assert.ok(true, this.step);
+ });
+}
diff --git a/ui-v2/tests/acceptance/steps/dc/acls/roles/as-many/list-steps.js b/ui-v2/tests/acceptance/steps/dc/acls/roles/as-many/list-steps.js
new file mode 100644
index 0000000000..550f688585
--- /dev/null
+++ b/ui-v2/tests/acceptance/steps/dc/acls/roles/as-many/list-steps.js
@@ -0,0 +1,10 @@
+import steps from '../../../../steps';
+
+// step definitions that are shared between features should be moved to the
+// tests/acceptance/steps/steps.js file
+
+export default function(assert) {
+ return steps(assert).then('I should find a file', function() {
+ assert.ok(true, this.step);
+ });
+}
diff --git a/ui-v2/tests/acceptance/steps/dc/acls/roles/as-many/remove-steps.js b/ui-v2/tests/acceptance/steps/dc/acls/roles/as-many/remove-steps.js
new file mode 100644
index 0000000000..550f688585
--- /dev/null
+++ b/ui-v2/tests/acceptance/steps/dc/acls/roles/as-many/remove-steps.js
@@ -0,0 +1,10 @@
+import steps from '../../../../steps';
+
+// step definitions that are shared between features should be moved to the
+// tests/acceptance/steps/steps.js file
+
+export default function(assert) {
+ return steps(assert).then('I should find a file', function() {
+ assert.ok(true, this.step);
+ });
+}
diff --git a/ui-v2/tests/acceptance/steps/dc/acls/roles/index-steps.js b/ui-v2/tests/acceptance/steps/dc/acls/roles/index-steps.js
new file mode 100644
index 0000000000..9bfbe9ac9b
--- /dev/null
+++ b/ui-v2/tests/acceptance/steps/dc/acls/roles/index-steps.js
@@ -0,0 +1,10 @@
+import steps from '../../../steps';
+
+// step definitions that are shared between features should be moved to the
+// tests/acceptance/steps/steps.js file
+
+export default function(assert) {
+ return steps(assert).then('I should find a file', function() {
+ assert.ok(true, this.step);
+ });
+}
diff --git a/ui-v2/tests/acceptance/steps/dc/acls/roles/update-steps.js b/ui-v2/tests/acceptance/steps/dc/acls/roles/update-steps.js
new file mode 100644
index 0000000000..9bfbe9ac9b
--- /dev/null
+++ b/ui-v2/tests/acceptance/steps/dc/acls/roles/update-steps.js
@@ -0,0 +1,10 @@
+import steps from '../../../steps';
+
+// step definitions that are shared between features should be moved to the
+// tests/acceptance/steps/steps.js file
+
+export default function(assert) {
+ return steps(assert).then('I should find a file', function() {
+ assert.ok(true, this.step);
+ });
+}
diff --git a/ui-v2/tests/helpers/normalizers.js b/ui-v2/tests/helpers/normalizers.js
new file mode 100644
index 0000000000..256d5ddc8d
--- /dev/null
+++ b/ui-v2/tests/helpers/normalizers.js
@@ -0,0 +1,19 @@
+export const createPolicies = function(item) {
+ return item.Policies.map(function(item) {
+ return {
+ template: '',
+ ...item,
+ };
+ }).concat(
+ item.ServiceIdentities.map(function(item) {
+ const policy = {
+ template: 'service-identity',
+ Name: item.ServiceName,
+ };
+ if (typeof item.Datacenters !== 'undefined') {
+ policy.Datacenters = item.Datacenters;
+ }
+ return policy;
+ })
+ );
+};
diff --git a/ui-v2/tests/helpers/set-cookies.js b/ui-v2/tests/helpers/set-cookies.js
index e56b5d6a54..6312e85ea0 100644
--- a/ui-v2/tests/helpers/set-cookies.js
+++ b/ui-v2/tests/helpers/set-cookies.js
@@ -29,6 +29,10 @@ export default function(type, count, obj) {
key = 'CONSUL_POLICY_COUNT';
obj['CONSUL_ACLS_ENABLE'] = 1;
break;
+ case 'role':
+ key = 'CONSUL_ROLE_COUNT';
+ obj['CONSUL_ACLS_ENABLE'] = 1;
+ break;
case 'token':
key = 'CONSUL_TOKEN_COUNT';
obj['CONSUL_ACLS_ENABLE'] = 1;
diff --git a/ui-v2/tests/helpers/type-to-url.js b/ui-v2/tests/helpers/type-to-url.js
index 4fc736c83d..abd0fb5766 100644
--- a/ui-v2/tests/helpers/type-to-url.js
+++ b/ui-v2/tests/helpers/type-to-url.js
@@ -26,6 +26,9 @@ export default function(type) {
case 'policy':
requests = ['/v1/acl/policies', '/v1/acl/policy/'];
break;
+ case 'role':
+ requests = ['/v1/acl/roles', '/v1/acl/role/'];
+ break;
case 'token':
requests = ['/v1/acl/tokens', '/v1/acl/token/'];
break;
diff --git a/ui-v2/tests/integration/adapters/role/response-test.js b/ui-v2/tests/integration/adapters/role/response-test.js
new file mode 100644
index 0000000000..5ffde99990
--- /dev/null
+++ b/ui-v2/tests/integration/adapters/role/response-test.js
@@ -0,0 +1,44 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+import { get } from 'consul-ui/tests/helpers/api';
+import { HEADERS_SYMBOL as META } from 'consul-ui/utils/http/consul';
+import { createPolicies } from 'consul-ui/tests/helpers/normalizers';
+
+module('Integration | Adapter | role | response', function(hooks) {
+ setupTest(hooks);
+ const dc = 'dc-1';
+ const id = 'role-name';
+ test('handleResponse returns the correct data for list endpoint', function(assert) {
+ const adapter = this.owner.lookup('adapter:role');
+ const request = {
+ url: `/v1/acl/roles?dc=${dc}`,
+ };
+ return get(request.url).then(function(payload) {
+ const expected = payload.map(item =>
+ Object.assign({}, item, {
+ Datacenter: dc,
+ uid: `["${dc}","${item.ID}"]`,
+ Policies: createPolicies(item),
+ })
+ );
+ const actual = adapter.handleResponse(200, {}, payload, request);
+ assert.deepEqual(actual, expected);
+ });
+ });
+ test('handleResponse returns the correct data for item endpoint', function(assert) {
+ const adapter = this.owner.lookup('adapter:role');
+ const request = {
+ url: `/v1/acl/role/${id}?dc=${dc}`,
+ };
+ return get(request.url).then(function(payload) {
+ const expected = Object.assign({}, payload, {
+ Datacenter: dc,
+ [META]: {},
+ uid: `["${dc}","${id}"]`,
+ Policies: createPolicies(payload),
+ });
+ const actual = adapter.handleResponse(200, {}, payload, request);
+ assert.deepEqual(actual, expected);
+ });
+ });
+});
diff --git a/ui-v2/tests/integration/adapters/role/url-test.js b/ui-v2/tests/integration/adapters/role/url-test.js
new file mode 100644
index 0000000000..3b3bae452d
--- /dev/null
+++ b/ui-v2/tests/integration/adapters/role/url-test.js
@@ -0,0 +1,70 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+import makeAttrable from 'consul-ui/utils/makeAttrable';
+module('Integration | Adapter | role | url', function(hooks) {
+ setupTest(hooks);
+ const dc = 'dc-1';
+ const id = 'role-name';
+ test('urlForQuery returns the correct url', function(assert) {
+ const adapter = this.owner.lookup('adapter:role');
+ const expected = `/v1/acl/roles?dc=${dc}`;
+ const actual = adapter.urlForQuery({
+ dc: dc,
+ });
+ assert.equal(actual, expected);
+ });
+ test('urlForQueryRecord returns the correct url', function(assert) {
+ const adapter = this.owner.lookup('adapter:role');
+ const expected = `/v1/acl/role/${id}?dc=${dc}`;
+ const actual = adapter.urlForQueryRecord({
+ dc: dc,
+ id: id,
+ });
+ assert.equal(actual, expected);
+ });
+ test("urlForQueryRecord throws if you don't specify an id", function(assert) {
+ const adapter = this.owner.lookup('adapter:role');
+ assert.throws(function() {
+ adapter.urlForQueryRecord({
+ dc: dc,
+ });
+ });
+ });
+ test('urlForCreateRecord returns the correct url', function(assert) {
+ const adapter = this.owner.lookup('adapter:role');
+ const expected = `/v1/acl/role?dc=${dc}`;
+ const actual = adapter.urlForCreateRecord(
+ 'role',
+ makeAttrable({
+ Datacenter: dc,
+ })
+ );
+ assert.equal(actual, expected);
+ });
+ test('urlForUpdateRecord returns the correct url', function(assert) {
+ const adapter = this.owner.lookup('adapter:role');
+ const expected = `/v1/acl/role/${id}?dc=${dc}`;
+ const actual = adapter.urlForUpdateRecord(
+ id,
+ 'role',
+ makeAttrable({
+ Datacenter: dc,
+ ID: id,
+ })
+ );
+ assert.equal(actual, expected);
+ });
+ test('urlForDeleteRecord returns the correct url', function(assert) {
+ const adapter = this.owner.lookup('adapter:role');
+ const expected = `/v1/acl/role/${id}?dc=${dc}`;
+ const actual = adapter.urlForDeleteRecord(
+ id,
+ 'role',
+ makeAttrable({
+ Datacenter: dc,
+ ID: id,
+ })
+ );
+ assert.equal(actual, expected);
+ });
+});
diff --git a/ui-v2/tests/integration/adapters/token/response-test.js b/ui-v2/tests/integration/adapters/token/response-test.js
index 573ef05b57..7d2412262e 100644
--- a/ui-v2/tests/integration/adapters/token/response-test.js
+++ b/ui-v2/tests/integration/adapters/token/response-test.js
@@ -2,6 +2,9 @@ import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { get } from 'consul-ui/tests/helpers/api';
import { HEADERS_SYMBOL as META } from 'consul-ui/utils/http/consul';
+
+import { createPolicies } from 'consul-ui/tests/helpers/normalizers';
+
module('Integration | Adapter | token | response', function(hooks) {
setupTest(hooks);
const dc = 'dc-1';
@@ -16,6 +19,7 @@ module('Integration | Adapter | token | response', function(hooks) {
Object.assign({}, item, {
Datacenter: dc,
uid: `["${dc}","${item.AccessorID}"]`,
+ Policies: createPolicies(item),
})
);
const actual = adapter.handleResponse(200, {}, payload, request);
@@ -32,6 +36,7 @@ module('Integration | Adapter | token | response', function(hooks) {
Datacenter: dc,
[META]: {},
uid: `["${dc}","${id}"]`,
+ Policies: createPolicies(payload),
});
const actual = adapter.handleResponse(200, {}, payload, request);
assert.deepEqual(actual, expected);
diff --git a/ui-v2/tests/integration/components/service-identity-test.js b/ui-v2/tests/integration/components/service-identity-test.js
new file mode 100644
index 0000000000..31c08c5c98
--- /dev/null
+++ b/ui-v2/tests/integration/components/service-identity-test.js
@@ -0,0 +1,34 @@
+import { moduleForComponent, test } from 'ember-qunit';
+import hbs from 'htmlbars-inline-precompile';
+
+moduleForComponent('service-identity', 'Integration | Component | service identity', {
+ integration: true,
+});
+
+test('it renders', function(assert) {
+ // Set any properties with this.set('myProperty', 'value');
+ // Handle any actions with this.on('myAction', function(val) { ... });
+
+ this.render(hbs`{{service-identity}}`);
+
+ assert.ok(
+ this.$()
+ .text()
+ .trim()
+ .indexOf('service_prefix') !== -1,
+ ''
+ );
+
+ // Template block usage:
+ this.render(hbs`
+ {{#service-identity}}{{/service-identity}}
+ `);
+
+ assert.ok(
+ this.$()
+ .text()
+ .trim()
+ .indexOf('service_prefix') !== -1,
+ ''
+ );
+});
diff --git a/ui-v2/tests/integration/helpers/policy/is-management-test.js b/ui-v2/tests/integration/helpers/policy/typeof-test.js
similarity index 61%
rename from ui-v2/tests/integration/helpers/policy/is-management-test.js
rename to ui-v2/tests/integration/helpers/policy/typeof-test.js
index 92e89df912..11302f57eb 100644
--- a/ui-v2/tests/integration/helpers/policy/is-management-test.js
+++ b/ui-v2/tests/integration/helpers/policy/typeof-test.js
@@ -1,20 +1,20 @@
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
-moduleForComponent('policy/is-management', 'helper:policy/is-management', {
+moduleForComponent('policy/typeof', 'helper:policy/typeof', {
integration: true,
});
// Replace this with your real tests.
test('it renders', function(assert) {
- this.set('inputValue', {});
+ this.set('inputValue', '1234');
- this.render(hbs`{{policy/is-management inputValue}}`);
+ this.render(hbs`{{policy/typeof inputValue}}`);
assert.equal(
this.$()
.text()
.trim(),
- 'false'
+ 'role'
);
});
diff --git a/ui-v2/tests/integration/services/repository/policy-test.js b/ui-v2/tests/integration/services/repository/policy-test.js
index 6fa640a795..96fd154c5b 100644
--- a/ui-v2/tests/integration/services/repository/policy-test.js
+++ b/ui-v2/tests/integration/services/repository/policy-test.js
@@ -1,6 +1,6 @@
import { moduleFor, test, skip } from 'ember-qunit';
-const NAME = 'policy';
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,
diff --git a/ui-v2/tests/integration/services/repository/role-test.js b/ui-v2/tests/integration/services/repository/role-test.js
new file mode 100644
index 0000000000..bcaaeb7d6e
--- /dev/null
+++ b/ui-v2/tests/integration/services/repository/role-test.js
@@ -0,0 +1,66 @@
+import { moduleFor, test } from 'ember-qunit';
+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 dc = 'dc-1';
+const id = 'role-name';
+test('findByDatacenter returns the correct data for list endpoint', function(assert) {
+ return repo(
+ 'Role',
+ 'findAllByDatacenter',
+ this.subject(),
+ function retrieveStub(stub) {
+ return stub(`/v1/acl/roles?dc=${dc}`, {
+ CONSUL_ROLE_COUNT: '100',
+ });
+ },
+ function performTest(service) {
+ return service.findAllByDatacenter(dc);
+ },
+ function performAssertion(actual, expected) {
+ assert.deepEqual(
+ actual,
+ expected(function(payload) {
+ return payload.map(item =>
+ Object.assign({}, item, {
+ Datacenter: dc,
+ uid: `["${dc}","${item.ID}"]`,
+ Policies: createPolicies(item),
+ })
+ );
+ })
+ );
+ }
+ );
+});
+test('findBySlug returns the correct data for item endpoint', function(assert) {
+ return repo(
+ 'Role',
+ 'findBySlug',
+ this.subject(),
+ function retrieveStub(stub) {
+ return stub(`/v1/acl/role/${id}?dc=${dc}`);
+ },
+ function performTest(service) {
+ return service.findBySlug(id, dc);
+ },
+ function performAssertion(actual, expected) {
+ assert.deepEqual(
+ actual,
+ expected(function(payload) {
+ const item = payload;
+ return Object.assign({}, item, {
+ Datacenter: dc,
+ uid: `["${dc}","${item.ID}"]`,
+ Policies: createPolicies(item),
+ });
+ })
+ );
+ }
+ );
+});
diff --git a/ui-v2/tests/integration/services/repository/token-test.js b/ui-v2/tests/integration/services/repository/token-test.js
index 7e7706b5c8..1f73805f25 100644
--- a/ui-v2/tests/integration/services/repository/token-test.js
+++ b/ui-v2/tests/integration/services/repository/token-test.js
@@ -1,5 +1,7 @@
import { moduleFor, test, skip } 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.
@@ -24,13 +26,14 @@ test('findByDatacenter returns the correct data for list endpoint', function(ass
assert.deepEqual(
actual,
expected(function(payload) {
- return payload.map(item =>
- Object.assign({}, item, {
+ return payload.map(function(item) {
+ return Object.assign({}, item, {
Datacenter: dc,
CreateTime: new Date(item.CreateTime),
uid: `["${dc}","${item.AccessorID}"]`,
- })
- );
+ Policies: createPolicies(item),
+ });
+ });
})
);
}
@@ -56,6 +59,7 @@ test('findBySlug returns the correct data for item endpoint', function(assert) {
Datacenter: dc,
CreateTime: new Date(item.CreateTime),
uid: `["${dc}","${item.AccessorID}"]`,
+ Policies: createPolicies(item),
});
})
);
diff --git a/ui-v2/tests/lib/page-object/createDeletable.js b/ui-v2/tests/lib/page-object/createDeletable.js
index 88a328d96b..9bbe357da8 100644
--- a/ui-v2/tests/lib/page-object/createDeletable.js
+++ b/ui-v2/tests/lib/page-object/createDeletable.js
@@ -1,5 +1,5 @@
export default function(clickable) {
- return function(obj, scope = '') {
+ return function(obj = {}, scope = '') {
if (scope !== '') {
scope = scope + ' ';
}
diff --git a/ui-v2/tests/lib/page-object/createSubmitable.js b/ui-v2/tests/lib/page-object/createSubmitable.js
index aabd562900..2d6282114d 100644
--- a/ui-v2/tests/lib/page-object/createSubmitable.js
+++ b/ui-v2/tests/lib/page-object/createSubmitable.js
@@ -1,5 +1,5 @@
export default function(clickable, is) {
- return function(obj, scope = '') {
+ return function(obj = {}, scope = '') {
if (scope !== '') {
scope = scope + ' ';
}
diff --git a/ui-v2/tests/lib/page-object/radiogroup.js b/ui-v2/tests/lib/page-object/radiogroup.js
index b5344ce7a3..b9802f56ca 100644
--- a/ui-v2/tests/lib/page-object/radiogroup.js
+++ b/ui-v2/tests/lib/page-object/radiogroup.js
@@ -1,12 +1,12 @@
import { is, clickable } from 'ember-cli-page-object';
import ucfirst from 'consul-ui/utils/ucfirst';
-export default function(name, items) {
+export default function(name, items, blankKey = 'all') {
return items.reduce(function(prev, item, i, arr) {
// if item is empty then it means 'all'
// otherwise camelCase based on something-here = somethingHere for the key
const key =
item === ''
- ? 'all'
+ ? blankKey
: item.split('-').reduce(function(prev, item, i, arr) {
if (i === 0) {
return item;
diff --git a/ui-v2/tests/pages.js b/ui-v2/tests/pages.js
index 389df60470..d3c5c2f752 100644
--- a/ui-v2/tests/pages.js
+++ b/ui-v2/tests/pages.js
@@ -1,4 +1,5 @@
import { create, clickable, is, attribute, collection, text } from 'ember-cli-page-object';
+import { alias } from 'ember-cli-page-object/macros';
import { visitable } from 'consul-ui/tests/lib/page-object/visitable';
import createDeletable from 'consul-ui/tests/lib/page-object/createDeletable';
import createSubmitable from 'consul-ui/tests/lib/page-object/createSubmitable';
@@ -11,6 +12,11 @@ import freetextFilter from 'consul-ui/tests/pages/components/freetext-filter';
import catalogFilter from 'consul-ui/tests/pages/components/catalog-filter';
import aclFilter from 'consul-ui/tests/pages/components/acl-filter';
import intentionFilter from 'consul-ui/tests/pages/components/intention-filter';
+import tokenListFactory from 'consul-ui/tests/pages/components/token-list';
+import policyFormFactory from 'consul-ui/tests/pages/components/policy-form';
+import policySelectorFactory from 'consul-ui/tests/pages/components/policy-selector';
+import roleFormFactory from 'consul-ui/tests/pages/components/role-form';
+import roleSelectorFactory from 'consul-ui/tests/pages/components/role-selector';
// TODO: should this specifically be modal or form?
// should all forms be forms?
@@ -28,6 +34,8 @@ import acls from 'consul-ui/tests/pages/dc/acls/index';
import acl from 'consul-ui/tests/pages/dc/acls/edit';
import policies from 'consul-ui/tests/pages/dc/acls/policies/index';
import policy from 'consul-ui/tests/pages/dc/acls/policies/edit';
+import roles from 'consul-ui/tests/pages/dc/acls/roles/index';
+import role from 'consul-ui/tests/pages/dc/acls/roles/edit';
import tokens from 'consul-ui/tests/pages/dc/acls/tokens/index';
import token from 'consul-ui/tests/pages/dc/acls/tokens/edit';
import intentions from 'consul-ui/tests/pages/dc/intentions/index';
@@ -37,6 +45,15 @@ const deletable = createDeletable(clickable);
const submitable = createSubmitable(clickable, is);
const creatable = createCreatable(clickable, is);
const cancelable = createCancelable(clickable, is);
+
+const tokenList = tokenListFactory(clickable, attribute, collection, deletable);
+
+const policyForm = policyFormFactory(submitable, cancelable, radiogroup);
+const policySelector = policySelectorFactory(clickable, deletable, collection, alias, policyForm);
+
+const roleForm = roleFormFactory(submitable, cancelable, policySelector);
+const roleSelector = roleSelectorFactory(clickable, deletable, collection, alias, roleForm);
+
export default {
index: create(index(visitable, collection)),
dcs: create(dcs(visitable, clickable, attribute, collection)),
@@ -52,9 +69,12 @@ export default {
policies: create(
policies(visitable, deletable, creatable, clickable, attribute, collection, freetextFilter)
),
- policy: create(
- policy(visitable, submitable, deletable, cancelable, clickable, attribute, collection)
+ policy: create(policy(visitable, submitable, deletable, cancelable, tokenList)),
+ roles: create(
+ roles(visitable, deletable, creatable, clickable, attribute, collection, freetextFilter)
),
+ // TODO: This needs a policyList
+ role: create(role(visitable, submitable, deletable, cancelable, policySelector, tokenList)),
tokens: create(
tokens(
visitable,
@@ -69,7 +89,7 @@ export default {
)
),
token: create(
- token(visitable, submitable, deletable, cancelable, clickable, attribute, collection)
+ token(visitable, submitable, deletable, cancelable, clickable, policySelector, roleSelector)
),
intentions: create(
intentions(visitable, deletable, creatable, clickable, attribute, collection, intentionFilter)
diff --git a/ui-v2/tests/pages/components/policy-form.js b/ui-v2/tests/pages/components/policy-form.js
new file mode 100644
index 0000000000..71c5e0a37a
--- /dev/null
+++ b/ui-v2/tests/pages/components/policy-form.js
@@ -0,0 +1,11 @@
+export default (submitable, cancelable, radiogroup) => () => {
+ return {
+ // this should probably be settable
+ resetScope: true,
+ scope: '[data-test-policy-form]',
+ prefix: 'policy',
+ ...submitable(),
+ ...cancelable(),
+ ...radiogroup('template', ['', 'service-identity'], 'policy'),
+ };
+};
diff --git a/ui-v2/tests/pages/components/policy-selector.js b/ui-v2/tests/pages/components/policy-selector.js
new file mode 100644
index 0000000000..25c7a4a420
--- /dev/null
+++ b/ui-v2/tests/pages/components/policy-selector.js
@@ -0,0 +1,20 @@
+export default (clickable, deletable, collection, alias, policyForm) => (
+ scope = '#policies',
+ createSelector = '[for="new-policy-toggle"]'
+) => {
+ return {
+ scope: scope,
+ create: clickable(createSelector),
+ form: policyForm(),
+ policies: alias('selectedOptions'),
+ selectedOptions: collection(
+ '[data-test-policies] [data-test-tabular-row]',
+ deletable(
+ {
+ expand: clickable('label'),
+ },
+ '+ tr'
+ )
+ ),
+ };
+};
diff --git a/ui-v2/tests/pages/components/role-form.js b/ui-v2/tests/pages/components/role-form.js
new file mode 100644
index 0000000000..e45baedcdd
--- /dev/null
+++ b/ui-v2/tests/pages/components/role-form.js
@@ -0,0 +1,11 @@
+export default (submitable, cancelable, policySelector) => () => {
+ return {
+ // this should probably be settable
+ resetScope: true,
+ scope: '[data-test-role-form]',
+ prefix: 'role',
+ ...submitable(),
+ ...cancelable(),
+ policies: policySelector('', '[data-test-create-policy]'),
+ };
+};
diff --git a/ui-v2/tests/pages/components/role-selector.js b/ui-v2/tests/pages/components/role-selector.js
new file mode 100644
index 0000000000..d2771e2233
--- /dev/null
+++ b/ui-v2/tests/pages/components/role-selector.js
@@ -0,0 +1,14 @@
+export default (clickable, deletable, collection, alias, roleForm) => (scope = '#roles') => {
+ return {
+ scope: scope,
+ create: clickable('[for="new-role-toggle"]'),
+ form: roleForm(),
+ roles: alias('selectedOptions'),
+ selectedOptions: collection(
+ '[data-test-roles] [data-test-tabular-row]',
+ deletable({
+ actions: clickable('label'),
+ })
+ ),
+ };
+};
diff --git a/ui-v2/tests/pages/components/token-list.js b/ui-v2/tests/pages/components/token-list.js
new file mode 100644
index 0000000000..a941c0b2d7
--- /dev/null
+++ b/ui-v2/tests/pages/components/token-list.js
@@ -0,0 +1,7 @@
+export default (clickable, attribute, collection, deletable) => () => {
+ return collection('[data-test-tokens] [data-test-tabular-row]', {
+ id: attribute('data-test-token', '[data-test-token]'),
+ token: clickable('a'),
+ ...deletable(),
+ });
+};
diff --git a/ui-v2/tests/pages/dc/acls/policies/edit.js b/ui-v2/tests/pages/dc/acls/policies/edit.js
index 437fc4beb6..847c7261bf 100644
--- a/ui-v2/tests/pages/dc/acls/policies/edit.js
+++ b/ui-v2/tests/pages/dc/acls/policies/edit.js
@@ -1,16 +1,14 @@
-export default function(visitable, submitable, deletable, cancelable, clickable, attribute, collection) {
- return submitable(
- cancelable(
- deletable({
- visit: visitable(['/:dc/acls/policies/:policy', '/:dc/acls/policies/create']),
- tokens: collection(
- '[data-test-tabular-row]',
- deletable({
- id: attribute('data-test-token', '[data-test-token]'),
- token: clickable('a'),
- })
- ),
- })
- )
- );
+export default function(visitable, submitable, deletable, cancelable, tokenList) {
+ return {
+ visit: visitable(['/:dc/acls/policies/:policy', '/:dc/acls/policies/create']),
+ ...submitable({}, 'form > div'),
+ ...cancelable({}, 'form > div'),
+ ...deletable({}, 'form > div'),
+ tokens: tokenList(),
+ deleteModal: {
+ resetScope: true,
+ scope: '[data-test-delete-modal]',
+ ...deletable({}),
+ },
+ };
}
diff --git a/ui-v2/tests/pages/dc/acls/roles/edit.js b/ui-v2/tests/pages/dc/acls/roles/edit.js
new file mode 100644
index 0000000000..85a794801f
--- /dev/null
+++ b/ui-v2/tests/pages/dc/acls/roles/edit.js
@@ -0,0 +1,10 @@
+export default function(visitable, submitable, deletable, cancelable, policySelector, tokenList) {
+ return {
+ visit: visitable(['/:dc/acls/roles/:role', '/:dc/acls/roles/create']),
+ ...submitable({}, 'form > div'),
+ ...cancelable({}, 'form > div'),
+ ...deletable({}, 'form > div'),
+ policies: policySelector(''),
+ tokens: tokenList(),
+ };
+}
diff --git a/ui-v2/tests/pages/dc/acls/roles/index.js b/ui-v2/tests/pages/dc/acls/roles/index.js
new file mode 100644
index 0000000000..4082349265
--- /dev/null
+++ b/ui-v2/tests/pages/dc/acls/roles/index.js
@@ -0,0 +1,14 @@
+export default function(visitable, deletable, creatable, clickable, attribute, collection, filter) {
+ return creatable({
+ visit: visitable('/:dc/acls/roles'),
+ roles: collection(
+ '[data-test-tabular-row]',
+ deletable({
+ name: attribute('data-test-role', '[data-test-role]'),
+ policy: clickable('a'),
+ actions: clickable('label'),
+ })
+ ),
+ filter: filter,
+ });
+}
diff --git a/ui-v2/tests/pages/dc/acls/tokens/edit.js b/ui-v2/tests/pages/dc/acls/tokens/edit.js
index 862c9eee23..15a3e560d9 100644
--- a/ui-v2/tests/pages/dc/acls/tokens/edit.js
+++ b/ui-v2/tests/pages/dc/acls/tokens/edit.js
@@ -4,33 +4,17 @@ export default function(
deletable,
cancelable,
clickable,
- attribute,
- collection
+ policySelector,
+ roleSelector
) {
- return submitable(
- cancelable(
- deletable(
- {
- visit: visitable(['/:dc/acls/tokens/:token', '/:dc/acls/tokens/create']),
- use: clickable('[data-test-use]'),
- confirmUse: clickable('button.type-delete'),
- newPolicy: clickable('[data-test-new-policy]'),
- policyForm: submitable(
- cancelable({}, '[data-test-policy-form]'),
- '[data-test-policy-form]'
- ),
- policies: collection(
- '[data-test-tabular-row]',
- deletable(
- {
- expand: clickable('label'),
- },
- '+ tr'
- )
- ),
- },
- 'form > div'
- )
- )
- );
+ return {
+ visit: visitable(['/:dc/acls/tokens/:token', '/:dc/acls/tokens/create']),
+ ...submitable({}, 'form > div'),
+ ...cancelable({}, 'form > div'),
+ ...deletable({}, 'form > div'),
+ use: clickable('[data-test-use]'),
+ confirmUse: clickable('button.type-delete'),
+ policies: policySelector(),
+ roles: roleSelector(),
+ };
}
diff --git a/ui-v2/tests/steps.js b/ui-v2/tests/steps.js
index b115e0c0dd..3bec041741 100644
--- a/ui-v2/tests/steps.js
+++ b/ui-v2/tests/steps.js
@@ -37,15 +37,47 @@ export default function(assert, library, pages, utils) {
}, 100);
});
};
+ const mb = function(path) {
+ return function(obj) {
+ return (
+ path.map(function(prop) {
+ obj = obj || {};
+ if (isNaN(parseInt(prop))) {
+ return (obj = obj[prop]);
+ } else {
+ return (obj = obj.objectAt(prop));
+ }
+ }) && obj
+ );
+ };
+ };
+ const find = function(path) {
+ const page = getCurrentPage();
+ const parts = path.split('.');
+ const last = parts.pop();
+ let obj;
+ let parent = mb(parts)(page) || page;
+ if (typeof parent.objectAt === 'function') {
+ parent = parent.objectAt(0);
+ }
+ obj = parent[last];
+ if (typeof obj === 'undefined') {
+ throw new Error(`The '${path}' object doesn't exist`);
+ }
+ if (typeof obj === 'function') {
+ obj = obj.bind(parent);
+ }
+ return obj;
+ };
models(library, utils.create);
http(library, utils.respondWith, utils.set);
visit(library, pages, setCurrentPage);
- click(library, utils.click, getCurrentPage);
- form(library, utils.fillIn, utils.triggerKeyEvent, getCurrentPage);
+ click(library, find, utils.click);
+ form(library, find, utils.fillIn, utils.triggerKeyEvent, getCurrentPage);
debug(library, assert, utils.currentURL);
assertHttp(library, assert, utils.lastNthRequest);
- assertModel(library, assert, getCurrentPage, pauseUntil, utils.pluralize);
- assertPage(library, assert, getCurrentPage);
+ assertModel(library, assert, find, getCurrentPage, pauseUntil, utils.pluralize);
+ assertPage(library, assert, find, getCurrentPage);
assertDom(library, assert, pauseUntil, utils.find, utils.currentURL);
return library.given(["I'm using a legacy token"], function(number, model, data) {
diff --git a/ui-v2/tests/steps/assertions/model.js b/ui-v2/tests/steps/assertions/model.js
index c7d68bd33a..54b30279b3 100644
--- a/ui-v2/tests/steps/assertions/model.js
+++ b/ui-v2/tests/steps/assertions/model.js
@@ -1,4 +1,4 @@
-export default function(scenario, assert, currentPage, pauseUntil, pluralize) {
+export default function(scenario, assert, find, currentPage, pauseUntil, pluralize) {
scenario
.then('pause until I see $number $model model[s]?', function(num, model) {
return pauseUntil(function(resolve) {
@@ -18,6 +18,18 @@ export default function(scenario, assert, currentPage, pauseUntil, pluralize) {
assert.equal(len, num, `Expected ${num} ${pluralize(model)}, saw ${len}`);
})
+ .then(['I see $num $model model[s]? on the $component component'], function(
+ num,
+ model,
+ component
+ ) {
+ const obj = find(component);
+ const len = obj[pluralize(model)].filter(function(item) {
+ return item.isVisible;
+ }).length;
+
+ assert.equal(len, num, `Expected ${num} ${pluralize(model)}, saw ${len}`);
+ })
// TODO: I${ dont } see
.then([`I see $num $model model[s]? with the $property "$value"`], function(
// negate,
diff --git a/ui-v2/tests/steps/assertions/page.js b/ui-v2/tests/steps/assertions/page.js
index d0bf6d838d..8e93cf85f7 100644
--- a/ui-v2/tests/steps/assertions/page.js
+++ b/ui-v2/tests/steps/assertions/page.js
@@ -1,5 +1,5 @@
/* eslint no-console: "off" */
-export default function(scenario, assert, currentPage) {
+export default function(scenario, assert, find, currentPage) {
scenario
.then('I see $property on the $component like yaml\n$yaml', function(
property,
@@ -77,7 +77,7 @@ export default function(scenario, assert, currentPage) {
func();
},
function(e) {
- return e.toString().indexOf('Element not found') !== -1;
+ return e.message.startsWith('Element not found');
},
`Expected to not see ${property} on ${component}`
);
@@ -85,10 +85,10 @@ export default function(scenario, assert, currentPage) {
.then(["I don't see $property"], function(property) {
assert.throws(
function() {
- currentPage()[property]();
+ return currentPage()[property]();
},
function(e) {
- return e.toString().indexOf('Element not found') !== -1;
+ return e.message.startsWith('Element not found');
},
`Expected to not see ${property}`
);
diff --git a/ui-v2/tests/steps/interactions/click.js b/ui-v2/tests/steps/interactions/click.js
index aa71d1d31e..f1a2877256 100644
--- a/ui-v2/tests/steps/interactions/click.js
+++ b/ui-v2/tests/steps/interactions/click.js
@@ -1,33 +1,21 @@
-/* eslint no-console: "off" */
-export default function(scenario, click, currentPage) {
+export default function(scenario, find, click) {
scenario
.when('I click "$selector"', function(selector) {
return click(selector);
})
// TODO: Probably nicer to think of better vocab than having the 'without " rule'
- .when('I click (?!")$property(?!")', function(property) {
+ .when(['I click (?!")$property(?!")', 'I click $property on the $component'], function(
+ property,
+ component,
+ next
+ ) {
try {
- return currentPage()[property]();
+ if (typeof component === 'string') {
+ property = `${component}.${property}`;
+ }
+ return find(property)();
} catch (e) {
- console.error(e);
- throw new Error(`The '${property}' property on the page object doesn't exist`);
- }
- })
- .when('I click $prop on the $component', function(prop, component) {
- // Collection
- var obj;
- if (typeof currentPage()[component].objectAt === 'function') {
- obj = currentPage()[component].objectAt(0);
- } else {
- obj = currentPage()[component];
- }
- const func = obj[prop].bind(obj);
- try {
- return func();
- } catch (e) {
- throw new Error(
- `The '${prop}' property on the '${component}' page object doesn't exist.\n${e.message}`
- );
+ throw e;
}
});
}
diff --git a/ui-v2/tests/steps/interactions/form.js b/ui-v2/tests/steps/interactions/form.js
index 8ef2812f3b..60d91b8fa3 100644
--- a/ui-v2/tests/steps/interactions/form.js
+++ b/ui-v2/tests/steps/interactions/form.js
@@ -1,4 +1,4 @@
-export default function(scenario, fillIn, triggerKeyEvent, currentPage) {
+export default function(scenario, find, fillIn, triggerKeyEvent, currentPage) {
const fillInElement = function(page, name, value) {
const cm = document.querySelector(`textarea[name="${name}"] + .CodeMirror`);
if (cm) {
@@ -21,12 +21,41 @@ export default function(scenario, fillIn, triggerKeyEvent, currentPage) {
}, currentPage());
})
.then(
- ['I fill in the $form form with yaml\n$yaml', 'I fill in the $form with json\n$json'],
- function(form, data) {
- return Object.keys(data).reduce(function(prev, item, i, arr) {
- const name = `${form}[${item}]`;
- return fillInElement(prev, name, data[item]);
- }, currentPage());
+ [
+ 'I fill in the $property form with yaml\n$yaml',
+ 'I fill in $property with yaml\n$yaml',
+ 'I fill in the $property with yaml\n$yaml',
+ 'I fill in the property form with json\n$json',
+
+ 'I fill in the $property form on the $component component with yaml\n$yaml',
+ 'I fill in the $property form on the $component component with json\n$json',
+ 'I fill in the $property on the $component component with yaml\n$yaml',
+ ],
+ function(property, component, data, next) {
+ try {
+ switch (true) {
+ case typeof component === 'string':
+ property = `${component}.${property}`;
+ // fallthrough
+ case typeof data === 'undefined':
+ data = component;
+ // // fallthrough
+ // case typeof property !== 'string':
+ // data = property;
+ }
+ let obj;
+ try {
+ obj = find(property);
+ } catch (e) {
+ obj = currentPage();
+ }
+ return Object.keys(data).reduce(function(prev, item, i, arr) {
+ const name = `${obj.prefix || property}[${item}]`;
+ return fillInElement(prev, name, data[item]);
+ }, obj);
+ } catch (e) {
+ throw e;
+ }
}
)
.then(['I type "$text" into "$selector"'], function(text, selector) {
diff --git a/ui-v2/tests/unit/adapters/role-test.js b/ui-v2/tests/unit/adapters/role-test.js
new file mode 100644
index 0000000000..3d847ae204
--- /dev/null
+++ b/ui-v2/tests/unit/adapters/role-test.js
@@ -0,0 +1,12 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Adapter | role', function(hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function(assert) {
+ let adapter = this.owner.lookup('adapter:role');
+ assert.ok(adapter);
+ });
+});
diff --git a/ui-v2/tests/unit/controllers/dc/acls/create-test.js b/ui-v2/tests/unit/controllers/dc/acls/create-test.js
index 5f16b636b2..e8d3df59c7 100644
--- a/ui-v2/tests/unit/controllers/dc/acls/create-test.js
+++ b/ui-v2/tests/unit/controllers/dc/acls/create-test.js
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/acls/create', 'Unit | Controller | dc/acls/create', {
// Specify the other units that are required for this test.
- needs: ['service:dom', 'service:form'],
+ needs: ['service:dom', 'service:form', 'service:repository/role', 'service:repository/policy'],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/acls/edit-test.js b/ui-v2/tests/unit/controllers/dc/acls/edit-test.js
index fab61bee65..1fda00e728 100644
--- a/ui-v2/tests/unit/controllers/dc/acls/edit-test.js
+++ b/ui-v2/tests/unit/controllers/dc/acls/edit-test.js
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/acls/edit', 'Unit | Controller | dc/acls/edit', {
// Specify the other units that are required for this test.
- needs: ['service:dom', 'service:form'],
+ needs: ['service:dom', 'service:form', 'service:repository/role', 'service:repository/policy'],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/acls/index-test.js b/ui-v2/tests/unit/controllers/dc/acls/index-test.js
index c5b3982ed9..872cd98caa 100644
--- a/ui-v2/tests/unit/controllers/dc/acls/index-test.js
+++ b/ui-v2/tests/unit/controllers/dc/acls/index-test.js
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/acls/index', 'Unit | Controller | dc/acls/index', {
// Specify the other units that are required for this test.
- needs: ['service:search', 'service:dom'],
+ needs: ['service:search', 'service:dom', 'service:repository/role', 'service:repository/policy'],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/acls/policies/create-test.js b/ui-v2/tests/unit/controllers/dc/acls/policies/create-test.js
index 5df3439d87..2e10ac941b 100644
--- a/ui-v2/tests/unit/controllers/dc/acls/policies/create-test.js
+++ b/ui-v2/tests/unit/controllers/dc/acls/policies/create-test.js
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/acls/policies/create', 'Unit | Controller | dc/acls/policies/create', {
// Specify the other units that are required for this test.
- needs: ['service:form', 'service:dom'],
+ needs: ['service:form', 'service:dom', 'service:repository/role', 'service:repository/policy'],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/acls/policies/edit-test.js b/ui-v2/tests/unit/controllers/dc/acls/policies/edit-test.js
index 1b94ab8a74..b109e75c6d 100644
--- a/ui-v2/tests/unit/controllers/dc/acls/policies/edit-test.js
+++ b/ui-v2/tests/unit/controllers/dc/acls/policies/edit-test.js
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/acls/policies/edit', 'Unit | Controller | dc/acls/policies/edit', {
// Specify the other units that are required for this test.
- needs: ['service:dom', 'service:form'],
+ needs: ['service:dom', 'service:form', 'service:repository/role', 'service:repository/policy'],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/acls/policies/index-test.js b/ui-v2/tests/unit/controllers/dc/acls/policies/index-test.js
index 5978228dcb..3e9dc37537 100644
--- a/ui-v2/tests/unit/controllers/dc/acls/policies/index-test.js
+++ b/ui-v2/tests/unit/controllers/dc/acls/policies/index-test.js
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/acls/policies/index', 'Unit | Controller | dc/acls/policies/index', {
// Specify the other units that are required for this test.
- needs: ['service:search', 'service:dom'],
+ needs: ['service:search', 'service:dom', 'service:repository/role', 'service:repository/policy'],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/acls/roles/create-test.js b/ui-v2/tests/unit/controllers/dc/acls/roles/create-test.js
new file mode 100644
index 0000000000..8f5a936868
--- /dev/null
+++ b/ui-v2/tests/unit/controllers/dc/acls/roles/create-test.js
@@ -0,0 +1,12 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:dc/acls/roles/create', 'Unit | Controller | dc/acls/roles/create', {
+ // Specify the other units that are required for this test.
+ needs: ['service:dom', 'service:form', 'service:repository/role', 'service:repository/policy'],
+});
+
+// Replace this with your real tests.
+test('it exists', function(assert) {
+ let controller = this.subject();
+ assert.ok(controller);
+});
diff --git a/ui-v2/tests/unit/controllers/dc/acls/roles/edit-test.js b/ui-v2/tests/unit/controllers/dc/acls/roles/edit-test.js
new file mode 100644
index 0000000000..4ad13d69c6
--- /dev/null
+++ b/ui-v2/tests/unit/controllers/dc/acls/roles/edit-test.js
@@ -0,0 +1,12 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:dc/acls/roles/edit', 'Unit | Controller | dc/acls/roles/edit', {
+ // Specify the other units that are required for this test.
+ needs: ['service:dom', 'service:form', 'service:repository/role', 'service:repository/policy'],
+});
+
+// Replace this with your real tests.
+test('it exists', function(assert) {
+ let controller = this.subject();
+ assert.ok(controller);
+});
diff --git a/ui-v2/tests/unit/controllers/dc/acls/roles/index-test.js b/ui-v2/tests/unit/controllers/dc/acls/roles/index-test.js
new file mode 100644
index 0000000000..7e41bf468e
--- /dev/null
+++ b/ui-v2/tests/unit/controllers/dc/acls/roles/index-test.js
@@ -0,0 +1,12 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:dc/acls/roles/index', 'Unit | Controller | dc/acls/roles/index', {
+ // Specify the other units that are required for this test.
+ needs: ['service:search', 'service:dom', 'service:repository/role', 'service:repository/policy'],
+});
+
+// Replace this with your real tests.
+test('it exists', function(assert) {
+ let controller = this.subject();
+ assert.ok(controller);
+});
diff --git a/ui-v2/tests/unit/controllers/dc/acls/tokens/create-test.js b/ui-v2/tests/unit/controllers/dc/acls/tokens/create-test.js
index ea9cc3ab6c..683bcf7911 100644
--- a/ui-v2/tests/unit/controllers/dc/acls/tokens/create-test.js
+++ b/ui-v2/tests/unit/controllers/dc/acls/tokens/create-test.js
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/acls/tokens/create', 'Unit | Controller | dc/acls/tokens/create', {
// Specify the other units that are required for this test.
- needs: ['service:dom', 'service:form'],
+ needs: ['service:dom', 'service:form', 'service:repository/role', 'service:repository/policy'],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/acls/tokens/edit-test.js b/ui-v2/tests/unit/controllers/dc/acls/tokens/edit-test.js
index c331988ad4..6a96f62b08 100644
--- a/ui-v2/tests/unit/controllers/dc/acls/tokens/edit-test.js
+++ b/ui-v2/tests/unit/controllers/dc/acls/tokens/edit-test.js
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/acls/tokens/edit', 'Unit | Controller | dc/acls/tokens/edit', {
// Specify the other units that are required for this test.
- needs: ['service:dom', 'service:form'],
+ needs: ['service:dom', 'service:form', 'service:repository/role', 'service:repository/policy'],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/acls/tokens/index-test.js b/ui-v2/tests/unit/controllers/dc/acls/tokens/index-test.js
index 8cd6b95d79..f2a6d2ab07 100644
--- a/ui-v2/tests/unit/controllers/dc/acls/tokens/index-test.js
+++ b/ui-v2/tests/unit/controllers/dc/acls/tokens/index-test.js
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/acls/tokens/index', 'Unit | Controller | dc/acls/tokens/index', {
// Specify the other units that are required for this test.
- needs: ['service:search', 'service:dom'],
+ needs: ['service:search', 'service:dom', 'service:repository/role', 'service:repository/policy'],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/intentions/create-test.js b/ui-v2/tests/unit/controllers/dc/intentions/create-test.js
index c4c4a9bcc2..5226e4cf23 100644
--- a/ui-v2/tests/unit/controllers/dc/intentions/create-test.js
+++ b/ui-v2/tests/unit/controllers/dc/intentions/create-test.js
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/intentions/create', 'Unit | Controller | dc/intentions/create', {
// Specify the other units that are required for this test.
- needs: ['service:dom', 'service:form'],
+ needs: ['service:dom', 'service:form', 'service:repository/role', 'service:repository/policy'],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/intentions/edit-test.js b/ui-v2/tests/unit/controllers/dc/intentions/edit-test.js
index 3b439be037..c7e0da3765 100644
--- a/ui-v2/tests/unit/controllers/dc/intentions/edit-test.js
+++ b/ui-v2/tests/unit/controllers/dc/intentions/edit-test.js
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/intentions/edit', 'Unit | Controller | dc/intentions/edit', {
// Specify the other units that are required for this test.
- needs: ['service:dom', 'service:form'],
+ needs: ['service:dom', 'service:form', 'service:repository/role', 'service:repository/policy'],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/intentions/index-test.js b/ui-v2/tests/unit/controllers/dc/intentions/index-test.js
index 56dff2ae1c..9cfefad559 100644
--- a/ui-v2/tests/unit/controllers/dc/intentions/index-test.js
+++ b/ui-v2/tests/unit/controllers/dc/intentions/index-test.js
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/intentions/index', 'Unit | Controller | dc/intentions/index', {
// Specify the other units that are required for this test.
- needs: ['service:search', 'service:dom'],
+ needs: ['service:search', 'service:dom', 'service:repository/role', 'service:repository/policy'],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/kv/create-test.js b/ui-v2/tests/unit/controllers/dc/kv/create-test.js
index c756a6ab5b..e7b7c506d2 100644
--- a/ui-v2/tests/unit/controllers/dc/kv/create-test.js
+++ b/ui-v2/tests/unit/controllers/dc/kv/create-test.js
@@ -2,7 +2,13 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/kv/create', 'Unit | Controller | dc/kv/create', {
// Specify the other units that are required for this test.
- needs: ['service:btoa', 'service:dom', 'service:form'],
+ needs: [
+ 'service:btoa',
+ 'service:dom',
+ 'service:form',
+ 'service:repository/role',
+ 'service:repository/policy',
+ ],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/kv/edit-test.js b/ui-v2/tests/unit/controllers/dc/kv/edit-test.js
index d92867d2e9..893fbf518c 100644
--- a/ui-v2/tests/unit/controllers/dc/kv/edit-test.js
+++ b/ui-v2/tests/unit/controllers/dc/kv/edit-test.js
@@ -2,7 +2,13 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/kv/edit', 'Unit | Controller | dc/kv/edit', {
// Specify the other units that are required for this test.
- needs: ['service:btoa', 'service:dom', 'service:form'],
+ needs: [
+ 'service:btoa',
+ 'service:dom',
+ 'service:form',
+ 'service:repository/role',
+ 'service:repository/policy',
+ ],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/controllers/dc/kv/root-create-test.js b/ui-v2/tests/unit/controllers/dc/kv/root-create-test.js
index 92cb701b24..732c66ef78 100644
--- a/ui-v2/tests/unit/controllers/dc/kv/root-create-test.js
+++ b/ui-v2/tests/unit/controllers/dc/kv/root-create-test.js
@@ -2,7 +2,13 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:dc/kv/root-create', 'Unit | Controller | dc/kv/root-create', {
// Specify the other units that are required for this test.
- needs: ['service:btoa', 'service:dom', 'service:form'],
+ needs: [
+ 'service:btoa',
+ 'service:dom',
+ 'service:form',
+ 'service:repository/role',
+ 'service:repository/policy',
+ ],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/helpers/policy/is-management-test.js b/ui-v2/tests/unit/helpers/policy/is-management-test.js
deleted file mode 100644
index 1af61500c7..0000000000
--- a/ui-v2/tests/unit/helpers/policy/is-management-test.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import { isManagement } from 'consul-ui/helpers/policy/is-management';
-import { module, test } from 'qunit';
-
-module('Unit | Helper | policy/is-management');
-
-test('it returns true if the policy is the management policy', function(assert) {
- const actual = isManagement([{ ID: '00000000-0000-0000-0000-000000000001' }]);
- assert.ok(actual);
-});
-test("it returns false if the policy isn't the management policy", function(assert) {
- const actual = isManagement([{ ID: '00000000-0000-0000-0000-000000000000' }]);
- assert.notOk(actual);
-});
diff --git a/ui-v2/tests/unit/mixins/policy/as-many-test.js b/ui-v2/tests/unit/mixins/policy/as-many-test.js
new file mode 100644
index 0000000000..944edbc5a4
--- /dev/null
+++ b/ui-v2/tests/unit/mixins/policy/as-many-test.js
@@ -0,0 +1,12 @@
+import EmberObject from '@ember/object';
+import PolicyAsManyMixin from 'consul-ui/mixins/policy/as-many';
+import { module, test } from 'qunit';
+
+module('Unit | Mixin | policy/as many');
+
+// Replace this with your real tests.
+test('it works', function(assert) {
+ let PolicyAsManyObject = EmberObject.extend(PolicyAsManyMixin);
+ let subject = PolicyAsManyObject.create();
+ assert.ok(subject);
+});
diff --git a/ui-v2/tests/unit/mixins/role/as-many-test.js b/ui-v2/tests/unit/mixins/role/as-many-test.js
new file mode 100644
index 0000000000..76bcb80c50
--- /dev/null
+++ b/ui-v2/tests/unit/mixins/role/as-many-test.js
@@ -0,0 +1,12 @@
+import EmberObject from '@ember/object';
+import RoleAsManyMixin from 'consul-ui/mixins/role/as-many';
+import { module, test } from 'qunit';
+
+module('Unit | Mixin | role/as many');
+
+// Replace this with your real tests.
+test('it works', function(assert) {
+ let RoleAsManyObject = EmberObject.extend(RoleAsManyMixin);
+ let subject = RoleAsManyObject.create();
+ assert.ok(subject);
+});
diff --git a/ui-v2/tests/unit/mixins/role/with-actions-test.js b/ui-v2/tests/unit/mixins/role/with-actions-test.js
new file mode 100644
index 0000000000..c890bc792e
--- /dev/null
+++ b/ui-v2/tests/unit/mixins/role/with-actions-test.js
@@ -0,0 +1,29 @@
+import { moduleFor } from 'ember-qunit';
+import test from 'ember-sinon-qunit/test-support/test';
+import { getOwner } from '@ember/application';
+import Route from 'consul-ui/routes/dc/acls/roles/index';
+
+import Mixin from 'consul-ui/mixins/role/with-actions';
+
+moduleFor('mixin:policy/with-actions', 'Unit | Mixin | role/with actions', {
+ // Specify the other units that are required for this test.
+ needs: [
+ 'mixin:with-blocking-actions',
+ 'service:feedback',
+ 'service:flashMessages',
+ 'service:logger',
+ 'service:settings',
+ 'service:repository/role',
+ ],
+ subject: function() {
+ const MixedIn = Route.extend(Mixin);
+ this.register('test-container:role/with-actions-object', MixedIn);
+ return getOwner(this).lookup('test-container:role/with-actions-object');
+ },
+});
+
+// Replace this with your real tests.
+test('it works', function(assert) {
+ const subject = this.subject();
+ assert.ok(subject);
+});
diff --git a/ui-v2/tests/unit/models/role-test.js b/ui-v2/tests/unit/models/role-test.js
new file mode 100644
index 0000000000..bf2204528c
--- /dev/null
+++ b/ui-v2/tests/unit/models/role-test.js
@@ -0,0 +1,14 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+import { run } from '@ember/runloop';
+
+module('Unit | Model | role', function(hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function(assert) {
+ let store = this.owner.lookup('service:store');
+ let model = run(() => store.createRecord('role', {}));
+ assert.ok(model);
+ });
+});
diff --git a/ui-v2/tests/unit/routes/dc/acls/roles/create-test.js b/ui-v2/tests/unit/routes/dc/acls/roles/create-test.js
new file mode 100644
index 0000000000..a456cd449f
--- /dev/null
+++ b/ui-v2/tests/unit/routes/dc/acls/roles/create-test.js
@@ -0,0 +1,20 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:dc/acls/roles/create', 'Unit | Route | dc/acls/roles/create', {
+ // Specify the other units that are required for this test.
+ needs: [
+ 'service:repository/role',
+ 'service:repository/policy',
+ 'service:repository/token',
+ 'service:repository/dc',
+ 'service:feedback',
+ 'service:logger',
+ 'service:settings',
+ 'service:flashMessages',
+ ],
+});
+
+test('it exists', function(assert) {
+ let route = this.subject();
+ assert.ok(route);
+});
diff --git a/ui-v2/tests/unit/routes/dc/acls/roles/edit-test.js b/ui-v2/tests/unit/routes/dc/acls/roles/edit-test.js
new file mode 100644
index 0000000000..c83d85e77c
--- /dev/null
+++ b/ui-v2/tests/unit/routes/dc/acls/roles/edit-test.js
@@ -0,0 +1,20 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:dc/acls/roles/edit', 'Unit | Route | dc/acls/roles/edit', {
+ // Specify the other units that are required for this test.
+ needs: [
+ 'service:repository/role',
+ 'service:repository/policy',
+ 'service:repository/token',
+ 'service:repository/dc',
+ 'service:feedback',
+ 'service:logger',
+ 'service:settings',
+ 'service:flashMessages',
+ ],
+});
+
+test('it exists', function(assert) {
+ let route = this.subject();
+ assert.ok(route);
+});
diff --git a/ui-v2/tests/unit/routes/dc/acls/roles/index-test.js b/ui-v2/tests/unit/routes/dc/acls/roles/index-test.js
new file mode 100644
index 0000000000..b230b62b3f
--- /dev/null
+++ b/ui-v2/tests/unit/routes/dc/acls/roles/index-test.js
@@ -0,0 +1,17 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:dc/acls/roles/index', 'Unit | Route | dc/acls/roles/index', {
+ // Specify the other units that are required for this test.
+ needs: [
+ 'service:repository/role',
+ 'service:feedback',
+ 'service:logger',
+ 'service:settings',
+ 'service:flashMessages',
+ ],
+});
+
+test('it exists', function(assert) {
+ let route = this.subject();
+ assert.ok(route);
+});
diff --git a/ui-v2/tests/unit/routes/dc/acls/tokens/create-test.js b/ui-v2/tests/unit/routes/dc/acls/tokens/create-test.js
index aae140c7de..763ff102ef 100644
--- a/ui-v2/tests/unit/routes/dc/acls/tokens/create-test.js
+++ b/ui-v2/tests/unit/routes/dc/acls/tokens/create-test.js
@@ -5,6 +5,7 @@ moduleFor('route:dc/acls/tokens/create', 'Unit | Route | dc/acls/tokens/create',
needs: [
'service:repository/token',
'service:repository/policy',
+ 'service:repository/role',
'service:repository/dc',
'service:feedback',
'service:logger',
diff --git a/ui-v2/tests/unit/routes/dc/acls/tokens/edit-test.js b/ui-v2/tests/unit/routes/dc/acls/tokens/edit-test.js
index 8d7c8c0c38..892a4db5b4 100644
--- a/ui-v2/tests/unit/routes/dc/acls/tokens/edit-test.js
+++ b/ui-v2/tests/unit/routes/dc/acls/tokens/edit-test.js
@@ -5,6 +5,7 @@ moduleFor('route:dc/acls/tokens/edit', 'Unit | Route | dc/acls/tokens/edit', {
needs: [
'service:repository/token',
'service:repository/policy',
+ 'service:repository/role',
'service:repository/dc',
'service:feedback',
'service:logger',
diff --git a/ui-v2/tests/unit/serializers/role-test.js b/ui-v2/tests/unit/serializers/role-test.js
new file mode 100644
index 0000000000..69dc162d9e
--- /dev/null
+++ b/ui-v2/tests/unit/serializers/role-test.js
@@ -0,0 +1,24 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+import { run } from '@ember/runloop';
+
+module('Unit | Serializer | role', function(hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function(assert) {
+ let store = this.owner.lookup('service:store');
+ let serializer = store.serializerFor('role');
+
+ assert.ok(serializer);
+ });
+
+ test('it serializes records', function(assert) {
+ let store = this.owner.lookup('service:store');
+ let record = run(() => store.createRecord('role', {}));
+
+ let serializedRecord = record.serialize();
+
+ assert.ok(serializedRecord);
+ });
+});
diff --git a/ui-v2/tests/unit/services/form-test.js b/ui-v2/tests/unit/services/form-test.js
index d256f3e452..2e65374337 100644
--- a/ui-v2/tests/unit/services/form-test.js
+++ b/ui-v2/tests/unit/services/form-test.js
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
moduleFor('service:form', 'Unit | Service | form', {
// Specify the other units that are required for this test.
- // needs: ['service:foo']
+ needs: ['service:repository/role', 'service:repository/policy'],
});
// Replace this with your real tests.
diff --git a/ui-v2/tests/unit/services/repository/role-test.js b/ui-v2/tests/unit/services/repository/role-test.js
new file mode 100644
index 0000000000..99168bdf16
--- /dev/null
+++ b/ui-v2/tests/unit/services/repository/role-test.js
@@ -0,0 +1,12 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('service:repository/role', 'Unit | Service | repository/role', {
+ // Specify the other units that are required for this test.
+ // needs: ['service:foo']
+});
+
+// Replace this with your real tests.
+test('it exists', function(assert) {
+ let service = this.subject();
+ assert.ok(service);
+});
diff --git a/ui-v2/tests/unit/utils/dom/event-source/callable-test.js b/ui-v2/tests/unit/utils/dom/event-source/callable-test.js
index e43b342fb1..fe5c7ba708 100644
--- a/ui-v2/tests/unit/utils/dom/event-source/callable-test.js
+++ b/ui-v2/tests/unit/utils/dom/event-source/callable-test.js
@@ -35,7 +35,7 @@ test('it creates an EventSource class implementing EventTarget', function(assert
assert.ok(source instanceof EventTarget);
});
test('the default runner loops and can be closed', function(assert) {
- assert.expect(12); // 10 not closed, 1 to close and the final call count
+ assert.expect(13); // 10 not closed, 1 to close, the final call count, plus the close event
let count = 0;
const isClosed = function() {
count++;
@@ -50,9 +50,11 @@ test('the default runner loops and can be closed', function(assert) {
then: then,
};
},
+ dispatchEvent: this.stub(),
};
defaultRunner(target, configuration, isClosed);
assert.ok(then.callCount == 10);
+ assert.ok(target.dispatchEvent.calledOnce);
});
test('it calls the defaultRunner', function(assert) {
const Promise = createPromise();
diff --git a/ui-v2/tests/unit/utils/update-array-object-test.js b/ui-v2/tests/unit/utils/update-array-object-test.js
index f066b3cc9d..874d1ce84c 100644
--- a/ui-v2/tests/unit/utils/update-array-object-test.js
+++ b/ui-v2/tests/unit/utils/update-array-object-test.js
@@ -4,7 +4,7 @@ import { module, test } from 'qunit';
module('Unit | Utility | update array object');
// Replace this with your real tests.
-test('it works', function(assert) {
+test('it updates the correct item in the array', function(assert) {
const expected = {
data: {
id: '2',
@@ -27,4 +27,5 @@ test('it works', function(assert) {
];
const actual = updateArrayObject(arr, expected, 'id');
assert.ok(actual, expected);
+ assert.equal(arr[1].name, expected.name);
});
diff --git a/ui-v2/yarn.lock b/ui-v2/yarn.lock
index 8790b5031c..6f7037acac 100644
--- a/ui-v2/yarn.lock
+++ b/ui-v2/yarn.lock
@@ -47,6 +47,26 @@
semver "^5.4.1"
source-map "^0.5.0"
+"@babel/core@^7.3.3", "@babel/core@^7.3.4":
+ version "7.4.3"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.3.tgz#198d6d3af4567be3989550d97e068de94503074f"
+ integrity sha512-oDpASqKFlbspQfzAE7yaeTmdljSH2ADIvBlb0RwbStltTuWa0+7CCI1fYVINNv9saHPa1W7oaKeuNuKj+RQCvA==
+ dependencies:
+ "@babel/code-frame" "^7.0.0"
+ "@babel/generator" "^7.4.0"
+ "@babel/helpers" "^7.4.3"
+ "@babel/parser" "^7.4.3"
+ "@babel/template" "^7.4.0"
+ "@babel/traverse" "^7.4.3"
+ "@babel/types" "^7.4.0"
+ convert-source-map "^1.1.0"
+ debug "^4.1.0"
+ json5 "^2.1.0"
+ lodash "^4.17.11"
+ resolve "^1.3.2"
+ semver "^5.4.1"
+ source-map "^0.5.0"
+
"@babel/generator@^7.0.0", "@babel/generator@^7.1.2":
version "7.1.2"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.2.tgz#fde75c072575ce7abbd97322e8fef5bae67e4630"
@@ -68,6 +88,17 @@
source-map "^0.5.0"
trim-right "^1.0.1"
+"@babel/generator@^7.4.0":
+ version "7.4.0"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.4.0.tgz#c230e79589ae7a729fd4631b9ded4dc220418196"
+ integrity sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==
+ dependencies:
+ "@babel/types" "^7.4.0"
+ jsesc "^2.5.1"
+ lodash "^4.17.11"
+ source-map "^0.5.0"
+ trim-right "^1.0.1"
+
"@babel/helper-annotate-as-pure@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32"
@@ -89,6 +120,18 @@
"@babel/traverse" "^7.1.0"
"@babel/types" "^7.0.0"
+"@babel/helper-create-class-features-plugin@^7.4.0":
+ version "7.4.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.3.tgz#5bbd279c6c3ac6a60266b89bbfe7f8021080a1ef"
+ integrity sha512-UMl3TSpX11PuODYdWGrUeW6zFkdYhDn7wRLrOuNVM6f9L+S9CzmDXYyrp3MTHcwWjnzur1f/Op8A7iYZWya2Yg==
+ dependencies:
+ "@babel/helper-function-name" "^7.1.0"
+ "@babel/helper-member-expression-to-functions" "^7.0.0"
+ "@babel/helper-optimise-call-expression" "^7.0.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/helper-replace-supers" "^7.4.0"
+ "@babel/helper-split-export-declaration" "^7.4.0"
+
"@babel/helper-define-map@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c"
@@ -182,6 +225,16 @@
"@babel/traverse" "^7.1.0"
"@babel/types" "^7.0.0"
+"@babel/helper-replace-supers@^7.4.0":
+ version "7.4.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.4.0.tgz#4f56adb6aedcd449d2da9399c2dcf0545463b64c"
+ integrity sha512-PVwCVnWWAgnal+kJ+ZSAphzyl58XrFeSKSAJRiqg5QToTsjL+Xu1f9+RJ+d+Q0aPhPfBGaYfkox66k86thxNSg==
+ dependencies:
+ "@babel/helper-member-expression-to-functions" "^7.0.0"
+ "@babel/helper-optimise-call-expression" "^7.0.0"
+ "@babel/traverse" "^7.4.0"
+ "@babel/types" "^7.4.0"
+
"@babel/helper-simple-access@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c"
@@ -195,6 +248,13 @@
dependencies:
"@babel/types" "^7.0.0"
+"@babel/helper-split-export-declaration@^7.4.0":
+ version "7.4.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz#571bfd52701f492920d63b7f735030e9a3e10b55"
+ integrity sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==
+ dependencies:
+ "@babel/types" "^7.4.0"
+
"@babel/helper-wrap-function@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.1.0.tgz#8cf54e9190706067f016af8f75cb3df829cc8c66"
@@ -221,6 +281,15 @@
"@babel/traverse" "^7.1.5"
"@babel/types" "^7.3.0"
+"@babel/helpers@^7.4.3":
+ version "7.4.3"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.4.3.tgz#7b1d354363494b31cb9a2417ae86af32b7853a3b"
+ integrity sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q==
+ dependencies:
+ "@babel/template" "^7.4.0"
+ "@babel/traverse" "^7.4.3"
+ "@babel/types" "^7.4.0"
+
"@babel/highlight@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4"
@@ -238,6 +307,11 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.3.3.tgz#092d450db02bdb6ccb1ca8ffd47d8774a91aef87"
integrity sha512-xsH1CJoln2r74hR+y7cg2B5JCPaTh+Hd+EbBRk9nWGSNspuo6krjhX0Om6RnRQuIvFq8wVXCLKH3kwKDYhanSg==
+"@babel/parser@^7.4.0", "@babel/parser@^7.4.3":
+ version "7.4.3"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.3.tgz#eb3ac80f64aa101c907d4ce5406360fe75b7895b"
+ integrity sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ==
+
"@babel/plugin-proposal-async-generator-functions@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.1.0.tgz#41c1a702e10081456e23a7b74d891922dd1bb6ce"
@@ -246,6 +320,23 @@
"@babel/helper-remap-async-to-generator" "^7.1.0"
"@babel/plugin-syntax-async-generators" "^7.0.0"
+"@babel/plugin-proposal-class-properties@^7.3.4":
+ version "7.4.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.4.0.tgz#d70db61a2f1fd79de927eea91f6411c964e084b8"
+ integrity sha512-t2ECPNOXsIeK1JxJNKmgbzQtoG27KIlVE61vTqX0DKR9E9sZlVVxWUtEW9D5FlZ8b8j7SBNCHY47GgPKCKlpPg==
+ dependencies:
+ "@babel/helper-create-class-features-plugin" "^7.4.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-proposal-decorators@^7.3.0":
+ version "7.4.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.4.0.tgz#8e1bfd83efa54a5f662033afcc2b8e701f4bb3a9"
+ integrity sha512-d08TLmXeK/XbgCo7ZeZ+JaeZDtDai/2ctapTRsWWkkmy7G/cqz8DQN/HlWG7RR4YmfXxmExsbU3SuCjlM7AtUg==
+ dependencies:
+ "@babel/helper-create-class-features-plugin" "^7.4.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/plugin-syntax-decorators" "^7.2.0"
+
"@babel/plugin-proposal-json-strings@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0.tgz#3b4d7b5cf51e1f2e70f52351d28d44fc2970d01e"
@@ -281,6 +372,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
+"@babel/plugin-syntax-decorators@^7.2.0":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.2.0.tgz#c50b1b957dcc69e4b1127b65e1c33eef61570c1b"
+ integrity sha512-38QdqVoXdHUQfTpZo3rQwqQdWtCn5tMv4uV6r2RMfTqNBuv4ZBhz79SfaQWKTVmxHjeFv/DnXVC/+agHCklYWA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
"@babel/plugin-syntax-json-strings@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.0.0.tgz#0d259a68090e15b383ce3710e01d5b23f3770cbd"
@@ -447,6 +545,16 @@
dependencies:
regenerator-transform "^0.13.3"
+"@babel/plugin-transform-runtime@^7.2.0":
+ version "7.4.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.3.tgz#4d6691690ecdc9f5cb8c3ab170a1576c1f556371"
+ integrity sha512-7Q61bU+uEI7bCUFReT1NKn7/X6sDQsZ7wL1sJ9IYMAO7cI+eg6x9re1cEw2fCRMbbTVyoeUKWSV1M6azEfKCfg==
+ dependencies:
+ "@babel/helper-module-imports" "^7.0.0"
+ "@babel/helper-plugin-utils" "^7.0.0"
+ resolve "^1.8.1"
+ semver "^5.5.1"
+
"@babel/plugin-transform-shorthand-properties@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15"
@@ -540,6 +648,13 @@
js-levenshtein "^1.1.3"
semver "^5.3.0"
+"@babel/runtime@^7.2.0":
+ version "7.4.3"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.3.tgz#79888e452034223ad9609187a0ad1fe0d2ad4bdc"
+ integrity sha512-9lsJwJLxDh/T3Q3SZszfWOTkk3pHbkmH+3KY+zwIDmsNlxsumuhS2TH3NIpktU4kNvfzy+k3eLT7aTJSPTo0OA==
+ dependencies:
+ regenerator-runtime "^0.13.2"
+
"@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.1.2":
version "7.1.2"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644"
@@ -557,6 +672,15 @@
"@babel/parser" "^7.2.2"
"@babel/types" "^7.2.2"
+"@babel/template@^7.4.0":
+ version "7.4.0"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.0.tgz#12474e9c077bae585c5d835a95c0b0b790c25c8b"
+ integrity sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==
+ dependencies:
+ "@babel/code-frame" "^7.0.0"
+ "@babel/parser" "^7.4.0"
+ "@babel/types" "^7.4.0"
+
"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.0.tgz#503ec6669387efd182c3888c4eec07bcc45d91b2"
@@ -586,6 +710,21 @@
globals "^11.1.0"
lodash "^4.17.10"
+"@babel/traverse@^7.4.0", "@babel/traverse@^7.4.3":
+ version "7.4.3"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.4.3.tgz#1a01f078fc575d589ff30c0f71bf3c3d9ccbad84"
+ integrity sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==
+ dependencies:
+ "@babel/code-frame" "^7.0.0"
+ "@babel/generator" "^7.4.0"
+ "@babel/helper-function-name" "^7.1.0"
+ "@babel/helper-split-export-declaration" "^7.4.0"
+ "@babel/parser" "^7.4.3"
+ "@babel/types" "^7.4.0"
+ debug "^4.1.0"
+ globals "^11.1.0"
+ lodash "^4.17.11"
+
"@babel/types@^7.0.0", "@babel/types@^7.1.2":
version "7.1.2"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.2.tgz#183e7952cf6691628afdc2e2b90d03240bac80c0"
@@ -603,6 +742,15 @@
lodash "^4.17.11"
to-fast-properties "^2.0.0"
+"@babel/types@^7.4.0":
+ version "7.4.0"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.0.tgz#670724f77d24cce6cc7d8cf64599d511d164894c"
+ integrity sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==
+ dependencies:
+ esutils "^2.0.2"
+ lodash "^4.17.11"
+ to-fast-properties "^2.0.0"
+
"@ember/ordered-set@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@ember/ordered-set/-/ordered-set-1.0.0.tgz#cf9ab5fd7510bcad370370ebcded705f6d1c542b"
@@ -690,9 +838,9 @@
js-yaml "^3.10.0"
"@hashicorp/consul-api-double@^2.0.1":
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/@hashicorp/consul-api-double/-/consul-api-double-2.2.0.tgz#b72b086dd4c88485f83b6f2fe30c5cb45b8d0e6a"
- integrity sha512-9U+pqdBJn/ZruUYg7J2A3k9FS44FZQsMGBfKQSxaBRU50dgkpGLtOyOOFUqgi/RCAwn4GUOzgXgHRRs5TAeStg==
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/@hashicorp/consul-api-double/-/consul-api-double-2.3.0.tgz#1163f6dacb29d43d8dac4d1473263c257321682a"
+ integrity sha512-wbaOyOoA1X5Ur7Gj4VSZkor1zuJ2+GTbavPJGtpZZXd6CtL3RXC4HaldruBIF79j3lBXVgS/Y9ETMfGLdoAYgA==
"@hashicorp/ember-cli-api-double@^1.3.0":
version "1.7.0"
@@ -723,6 +871,11 @@
version "0.0.39"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
+"@types/minimatch@^3.0.3":
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
+ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
+
"@types/node@*":
version "10.11.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.11.3.tgz#c055536ac8a5e871701aa01914be5731539d01ee"
@@ -1493,6 +1646,13 @@ babel-plugin-debug-macros@^0.2.0-beta.6:
dependencies:
semver "^5.3.0"
+babel-plugin-debug-macros@^0.3.0:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-debug-macros/-/babel-plugin-debug-macros-0.3.1.tgz#cf45b497ab02cdd0c98e11f6da79b1e0773ceae1"
+ integrity sha512-1tnO63L4d9HFHguR4Xc+/Y7Og1+mDsXwiStVrsayyXIDauv6r1o9dnhRKPmmCV5digG2XgScnQJpWDsxNNLU7g==
+ dependencies:
+ semver "^5.3.0"
+
babel-plugin-ember-modules-api-polyfill@^1.4.2:
version "1.6.0"
resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-1.6.0.tgz#abd1afa4237b3121cb51222f9bf3283cad8990aa"
@@ -1517,6 +1677,13 @@ babel-plugin-ember-modules-api-polyfill@^2.6.0:
dependencies:
ember-rfc176-data "^0.3.6"
+babel-plugin-ember-modules-api-polyfill@^2.8.0:
+ version "2.9.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-2.9.0.tgz#8503e7b4192aeb336b00265e6235258ff6b754aa"
+ integrity sha512-c03h50291phJ2gQxo/aIOvFQE2c6glql1A7uagE3XbPXpKVAJOUxtVDjvWG6UAB6BC5ynsJfMWvY0w4TPRKIHQ==
+ dependencies:
+ ember-rfc176-data "^0.3.9"
+
babel-plugin-feature-flags@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/babel-plugin-feature-flags/-/babel-plugin-feature-flags-0.3.1.tgz#9c827cf9a4eb9a19f725ccb239e85cab02036fc1"
@@ -2156,6 +2323,23 @@ broccoli-babel-transpiler@^7.1.0:
rsvp "^4.8.3"
workerpool "^2.3.1"
+broccoli-babel-transpiler@^7.1.2:
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/broccoli-babel-transpiler/-/broccoli-babel-transpiler-7.2.0.tgz#5c0d694c4055106abb385e2d3d88936d35b7cb18"
+ integrity sha512-lkP9dNFfK810CRHHWsNl9rjyYqcXH3qg0kArnA6tV9Owx3nlZm3Eyr0cGo6sMUQCNLH+2oKrRjOdUGSc6Um6Cw==
+ dependencies:
+ "@babel/core" "^7.3.3"
+ "@babel/polyfill" "^7.0.0"
+ broccoli-funnel "^2.0.2"
+ broccoli-merge-trees "^3.0.2"
+ broccoli-persistent-filter "^2.2.1"
+ clone "^2.1.2"
+ hash-for-dep "^1.4.7"
+ heimdalljs-logger "^0.1.9"
+ json-stable-stringify "^1.0.1"
+ rsvp "^4.8.4"
+ workerpool "^3.1.1"
+
broccoli-brocfile-loader@^0.18.0:
version "0.18.0"
resolved "https://registry.yarnpkg.com/broccoli-brocfile-loader/-/broccoli-brocfile-loader-0.18.0.tgz#2e86021c805c34ffc8d29a2fb721cf273e819e4b"
@@ -2327,6 +2511,25 @@ broccoli-funnel@^2.0.0, broccoli-funnel@^2.0.1:
symlink-or-copy "^1.0.0"
walk-sync "^0.3.1"
+broccoli-funnel@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/broccoli-funnel/-/broccoli-funnel-2.0.2.tgz#0edf629569bc10bd02cc525f74b9a38e71366a75"
+ integrity sha512-/vDTqtv7ipjEZQOVqO4vGDVAOZyuYzQ/EgGoyewfOgh1M7IQAToBKZI0oAQPgMBeFPPlIbfMuAngk+ohPBuaHQ==
+ dependencies:
+ array-equal "^1.0.0"
+ blank-object "^1.0.1"
+ broccoli-plugin "^1.3.0"
+ debug "^2.2.0"
+ fast-ordered-set "^1.0.0"
+ fs-tree-diff "^0.5.3"
+ heimdalljs "^0.2.0"
+ minimatch "^3.0.0"
+ mkdirp "^0.5.0"
+ path-posix "^1.0.0"
+ rimraf "^2.4.3"
+ symlink-or-copy "^1.0.0"
+ walk-sync "^0.3.1"
+
broccoli-kitchen-sink-helpers@^0.2.5, broccoli-kitchen-sink-helpers@~0.2.0:
version "0.2.9"
resolved "https://registry.yarnpkg.com/broccoli-kitchen-sink-helpers/-/broccoli-kitchen-sink-helpers-0.2.9.tgz#a5e0986ed8d76fb5984b68c3f0450d3a96e36ecc"
@@ -2380,6 +2583,14 @@ broccoli-merge-trees@^3.0.0:
broccoli-plugin "^1.3.0"
merge-trees "^2.0.0"
+broccoli-merge-trees@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/broccoli-merge-trees/-/broccoli-merge-trees-3.0.2.tgz#f33b451994225522b5c9bcf27d59decfd8ba537d"
+ integrity sha512-ZyPAwrOdlCddduFbsMyyFzJUrvW6b04pMvDiAQZrCwghlvgowJDY+EfoXn+eR1RRA5nmGHJ+B68T63VnpRiT1A==
+ dependencies:
+ broccoli-plugin "^1.3.0"
+ merge-trees "^2.0.0"
+
broccoli-middleware@^1.0.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/broccoli-middleware/-/broccoli-middleware-1.2.1.tgz#a21f255f8bfe5a21c2f0fbf2417addd9d24c9436"
@@ -2405,6 +2616,25 @@ broccoli-persistent-filter@^1.0.3, broccoli-persistent-filter@^1.1.6, broccoli-p
symlink-or-copy "^1.0.1"
walk-sync "^0.3.1"
+broccoli-persistent-filter@^2.2.1:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/broccoli-persistent-filter/-/broccoli-persistent-filter-2.2.2.tgz#e0180e75ede5dd05d4c702f24f6c049e93fba915"
+ integrity sha512-PW12RD1yY+x5SASUADuUMJce+dVSmjBO3pV1rLNHmT1C31rp1P++TvX7AgUObFmGhL7qlwviSdhMbBkY1v3G2w==
+ dependencies:
+ async-disk-cache "^1.2.1"
+ async-promise-queue "^1.0.3"
+ broccoli-plugin "^1.0.0"
+ fs-tree-diff "^1.0.2"
+ hash-for-dep "^1.5.0"
+ heimdalljs "^0.2.1"
+ heimdalljs-logger "^0.1.7"
+ mkdirp "^0.5.1"
+ promise-map-series "^0.2.1"
+ rimraf "^2.6.1"
+ rsvp "^4.7.0"
+ symlink-or-copy "^1.0.1"
+ walk-sync "^1.0.0"
+
broccoli-plugin@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-1.1.0.tgz#73e2cfa05f8ea1e3fc1420c40c3d9e7dc724bf02"
@@ -3923,22 +4153,24 @@ ember-browserify@^1.2.2:
through2 "^2.0.0"
walk-sync "^0.2.7"
-ember-changeset-validations@^1.2.11:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/ember-changeset-validations/-/ember-changeset-validations-1.3.1.tgz#713c232321862a3c1dfcb41263dfe6f930bd0c40"
+ember-changeset-validations@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/ember-changeset-validations/-/ember-changeset-validations-2.1.0.tgz#454b5adc1e4b4bcb0bdf1896a5d50f0bee77b1f0"
+ integrity sha512-LOAA8KSjpmZkDFvUkFJwDlgiJrQGUwtYAM3ZBTEpbQ8uKo5KEkZ1KkV2hNBV3U9Dv6AEauKp/RpwB9Pn10fzdA==
dependencies:
- ember-changeset "1.5.0"
- ember-cli-babel "^6.6.0"
- ember-cli-htmlbars "^1.1.1"
+ ember-changeset "^2.0.0"
+ ember-cli-babel "^6.16.0"
+ ember-cli-htmlbars "^3.0.0"
ember-get-config "^0.2.4"
- ember-validators "^1.2.0"
+ ember-validators "^2.0.0"
-ember-changeset@1.5.0:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/ember-changeset/-/ember-changeset-1.5.0.tgz#730d0ca3ac7a54a471322d159c77e734d0f42751"
+ember-changeset@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/ember-changeset/-/ember-changeset-2.0.1.tgz#670c8f9925ae1dbc75df05de171b4212004d420f"
+ integrity sha512-FgxWG2qaI2koCX9hc2+2qewBBwOJTm+l0cop9S5hc9PbF33OVAK9l/0l6oVtv3bJeyUVQ83opgK9aocOqao41w==
dependencies:
- ember-cli-babel "^6.8.2"
- ember-deep-set "^0.1.4"
+ ember-cli-babel "^6.16.0"
+ ember-deep-set "^0.2.0"
ember-cli-app-version@^3.0.0:
version "3.2.0"
@@ -3954,6 +4186,11 @@ ember-cli-autoprefixer@^0.8.1:
broccoli-autoprefixer "^5.0.0"
lodash "^4.0.0"
+ember-cli-babel-plugin-helpers@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/ember-cli-babel-plugin-helpers/-/ember-cli-babel-plugin-helpers-1.1.0.tgz#de3baedd093163b6c2461f95964888c1676325ac"
+ integrity sha512-Zr4my8Xn+CzO0gIuFNXji0eTRml5AxZUTDQz/wsNJ5AJAtyFWCY4QtKdoELNNbiCVGt1lq5yLiwTm4scGKu6xA==
+
ember-cli-babel@6.12.0, ember-cli-babel@^6.0.0, ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.0.0-beta.7, ember-cli-babel@^6.10.0, ember-cli-babel@^6.11.0, ember-cli-babel@^6.12.0, ember-cli-babel@^6.3.0, ember-cli-babel@^6.6.0, ember-cli-babel@^6.7.2, ember-cli-babel@^6.8.0, ember-cli-babel@^6.8.1, ember-cli-babel@^6.9.0, ember-cli-babel@^6.9.2:
version "6.12.0"
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-6.12.0.tgz#3adcdbe1278da1fcd0b9038f1360cb4ac5d4414c"
@@ -4029,6 +4266,33 @@ ember-cli-babel@^7.1.0:
ensure-posix-path "^1.0.2"
semver "^5.5.0"
+ember-cli-babel@^7.1.2:
+ version "7.7.3"
+ resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-7.7.3.tgz#f94709f6727583d18685ca6773a995877b87b8a0"
+ integrity sha512-/LWwyKIoSlZQ7k52P+6agC7AhcOBqPJ5C2u27qXHVVxKvCtg6ahNuRk/KmfZmV4zkuw4EjTZxfJE1PzpFyHkXg==
+ dependencies:
+ "@babel/core" "^7.0.0"
+ "@babel/plugin-proposal-class-properties" "^7.3.4"
+ "@babel/plugin-proposal-decorators" "^7.3.0"
+ "@babel/plugin-transform-modules-amd" "^7.0.0"
+ "@babel/plugin-transform-runtime" "^7.2.0"
+ "@babel/polyfill" "^7.0.0"
+ "@babel/preset-env" "^7.0.0"
+ "@babel/runtime" "^7.2.0"
+ amd-name-resolver "^1.2.1"
+ babel-plugin-debug-macros "^0.3.0"
+ babel-plugin-ember-modules-api-polyfill "^2.8.0"
+ babel-plugin-module-resolver "^3.1.1"
+ broccoli-babel-transpiler "^7.1.2"
+ broccoli-debug "^0.6.4"
+ broccoli-funnel "^2.0.1"
+ broccoli-source "^1.1.0"
+ clone "^2.1.2"
+ ember-cli-babel-plugin-helpers "^1.1.0"
+ ember-cli-version-checker "^2.1.2"
+ ensure-posix-path "^1.0.2"
+ semver "^5.5.0"
+
ember-cli-babel@^7.1.3:
version "7.2.0"
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-7.2.0.tgz#5c5bd877fb73f6fb198c878d3127ba9e18e9b8a0"
@@ -4149,16 +4413,6 @@ ember-cli-htmlbars-inline-precompile@^1.0.0:
heimdalljs-logger "^0.1.9"
silent-error "^1.1.0"
-ember-cli-htmlbars@^1.1.1:
- version "1.3.4"
- resolved "https://registry.yarnpkg.com/ember-cli-htmlbars/-/ember-cli-htmlbars-1.3.4.tgz#461289724b34af372a6a0c4b6635819156963353"
- dependencies:
- broccoli-persistent-filter "^1.0.3"
- ember-cli-version-checker "^1.0.2"
- hash-for-dep "^1.0.2"
- json-stable-stringify "^1.0.0"
- strip-bom "^2.0.0"
-
ember-cli-htmlbars@^2.0.1, ember-cli-htmlbars@^2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/ember-cli-htmlbars/-/ember-cli-htmlbars-2.0.4.tgz#0bcda483f14271663c38756e1fd1cb89da6a50cf"
@@ -4341,12 +4595,6 @@ ember-cli-valid-component-name@^1.0.0:
dependencies:
silent-error "^1.0.0"
-ember-cli-version-checker@^1.0.2:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/ember-cli-version-checker/-/ember-cli-version-checker-1.3.1.tgz#0bc2d134c830142da64bf9627a0eded10b61ae72"
- dependencies:
- semver "^5.3.0"
-
ember-cli-version-checker@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/ember-cli-version-checker/-/ember-cli-version-checker-2.1.0.tgz#fc79a56032f3717cf844ada7cbdec1a06fedb604"
@@ -4533,11 +4781,12 @@ ember-data@^3.0.2:
semver "^5.1.0"
silent-error "^1.0.0"
-ember-deep-set@^0.1.4:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/ember-deep-set/-/ember-deep-set-0.1.4.tgz#a9989969498d89685be155b72109b037af4d5645"
+ember-deep-set@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/ember-deep-set/-/ember-deep-set-0.2.0.tgz#93428b599f884c3da0550cbcc062b9ec5969a71e"
+ integrity sha512-3vg9Cw4CIInXzufZMQmScClg23mUw+2ybO53L51spFYP/eGaVmGduWmhrVljyl4lHKN7hW/jvG/YVWtwTPSTKA==
dependencies:
- ember-cli-babel "^6.6.0"
+ ember-cli-babel "^7.1.2"
ember-exam@^2.0.1:
version "2.0.1"
@@ -4661,9 +4910,10 @@ ember-qunit@^3.3.2:
ember-cli-test-loader "^2.2.0"
qunit "^2.5.0"
-ember-require-module@^0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/ember-require-module/-/ember-require-module-0.2.0.tgz#eafe436737ead4762220a9166b78364abf754274"
+ember-require-module@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/ember-require-module/-/ember-require-module-0.3.0.tgz#65aff7908b5b846467e4526594d33cfe0c23456b"
+ integrity sha512-rYN4YoWbR9VlJISSmx0ZcYZOgMcXZLGR7kdvp3zDerjIvYmHm/3p+K56fEAYmJILA6W4F+cBe41Tq2HuQAZizA==
dependencies:
ember-cli-babel "^6.9.2"
@@ -4695,6 +4945,11 @@ ember-rfc176-data@^0.3.6:
version "0.3.6"
resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.6.tgz#7138db8dfccec39c9a832adfbd4c49d670028907"
+ember-rfc176-data@^0.3.9:
+ version "0.3.9"
+ resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.9.tgz#44b6e051ead6c044ea87bd551f402e2cf89a7e3d"
+ integrity sha512-EiTo5YQS0Duy0xp9gCP8ekzv9vxirNi7MnIB4zWs+thtWp/mEKgf5mkiiLU2+oo8C5DuavVHhoPQDmyxh8Io1Q==
+
ember-router-generator@^1.0.0, ember-router-generator@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/ember-router-generator/-/ember-router-generator-1.2.3.tgz#8ed2ca86ff323363120fc14278191e9e8f1315ee"
@@ -4800,12 +5055,13 @@ ember-url@^0.6.0:
dependencies:
ember-cli-babel "^6.12.0"
-ember-validators@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/ember-validators/-/ember-validators-1.2.0.tgz#b4bc9aeaf97921d80c41b7dc21acca288d1216ae"
+ember-validators@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ember-validators/-/ember-validators-2.0.0.tgz#4100e17feb9c3a6cf4072732010697bbd674f8cb"
+ integrity sha512-OhXGN2UbFQY+lhkWOdW347NZsIWGj/fpTJbOfNxjyMQW/c3fvPEIvrhlvWf1JwHGKQTJDHpMQJgA/Luq39GDgQ==
dependencies:
ember-cli-babel "^6.9.2"
- ember-require-module "^0.2.0"
+ ember-require-module "^0.3.0"
emojis-list@^2.0.0:
version "2.1.0"
@@ -4877,6 +5133,11 @@ ensure-posix-path@^1.0.0, ensure-posix-path@^1.0.1, ensure-posix-path@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/ensure-posix-path/-/ensure-posix-path-1.0.2.tgz#a65b3e42d0b71cfc585eb774f9943c8d9b91b0c2"
+ensure-posix-path@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/ensure-posix-path/-/ensure-posix-path-1.1.1.tgz#3c62bdb19fa4681544289edb2b382adc029179ce"
+ integrity sha512-VWU0/zXzVbeJNXvME/5EmLuEj2TauvoaTz6aFYK1Z92JCBlDlZ3Gu0tuGR42kpW1754ywTs+QB0g5TP0oj9Zaw==
+
entities@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
@@ -5798,6 +6059,16 @@ fs-tree-diff@^0.5.2, fs-tree-diff@^0.5.3, fs-tree-diff@^0.5.4, fs-tree-diff@^0.5
path-posix "^1.0.0"
symlink-or-copy "^1.1.8"
+fs-tree-diff@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/fs-tree-diff/-/fs-tree-diff-1.0.2.tgz#0e2931733a85b55feb3472c0b89a20b0c03ac0de"
+ integrity sha512-Zro2ACaPVDgVOx9+s5s5AfPlAD0kMJdbwGvTGF6KC1SjxjiGWxJvV4mUTDkFVSy3OUw2C/f1qpdjF81hGqSBAw==
+ dependencies:
+ heimdalljs-logger "^0.1.7"
+ object-assign "^4.1.0"
+ path-posix "^1.0.0"
+ symlink-or-copy "^1.1.8"
+
fs-tree@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs-tree/-/fs-tree-1.0.0.tgz#ef64da3e6dd32cc0df27c3b3e0c299ffa575c026"
@@ -6224,6 +6495,18 @@ hash-for-dep@^1.0.2, hash-for-dep@^1.2.3:
heimdalljs-logger "^0.1.7"
resolve "^1.4.0"
+hash-for-dep@^1.4.7, hash-for-dep@^1.5.0:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/hash-for-dep/-/hash-for-dep-1.5.1.tgz#497754b39bee2f1c4ade4521bfd2af0a7c1196e3"
+ integrity sha512-/dQ/A2cl7FBPI2pO0CANkvuuVi/IFS5oTyJ0PsOb6jW6WbVW1js5qJXMJTNbWHXBIPdFTWFbabjB+mE0d+gelw==
+ dependencies:
+ broccoli-kitchen-sink-helpers "^0.3.1"
+ heimdalljs "^0.2.3"
+ heimdalljs-logger "^0.1.7"
+ path-root "^0.1.1"
+ resolve "^1.10.0"
+ resolve-package-path "^1.0.11"
+
hash.js@^1.0.0, hash.js@^1.0.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846"
@@ -7809,6 +8092,13 @@ matcher-collection@^1.0.0, matcher-collection@^1.0.5:
dependencies:
minimatch "^3.0.2"
+matcher-collection@^1.1.1:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/matcher-collection/-/matcher-collection-1.1.2.tgz#1076f506f10ca85897b53d14ef54f90a5c426838"
+ integrity sha512-YQ/teqaOIIfUHedRam08PB3NK7Mjct6BvzRnJmpGDm8uFXpNr1sbY4yuflI5JcEs6COpYA0FpRQhSDBf1tT95g==
+ dependencies:
+ minimatch "^3.0.2"
+
math-random@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac"
@@ -8807,7 +9097,7 @@ path-key@^2.0.0, path-key@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
-path-parse@^1.0.5:
+path-parse@^1.0.5, path-parse@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
@@ -8819,6 +9109,18 @@ path-posix@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/path-posix/-/path-posix-1.0.0.tgz#06b26113f56beab042545a23bfa88003ccac260f"
+path-root-regex@^0.1.0:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d"
+ integrity sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=
+
+path-root@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7"
+ integrity sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=
+ dependencies:
+ path-root-regex "^0.1.0"
+
path-to-regexp@0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
@@ -9311,6 +9613,11 @@ regenerator-runtime@^0.11.0, regenerator-runtime@^0.11.1:
version "0.11.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
+regenerator-runtime@^0.13.2:
+ version "0.13.2"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447"
+ integrity sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==
+
regenerator-runtime@^0.9.5:
version "0.9.6"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz#d33eb95d0d2001a4be39659707c51b0cb71ce029"
@@ -9521,6 +9828,14 @@ resolve-from@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226"
+resolve-package-path@^1.0.11:
+ version "1.2.7"
+ resolved "https://registry.yarnpkg.com/resolve-package-path/-/resolve-package-path-1.2.7.tgz#2a7bc37ad96865e239330e3102c31322847e652e"
+ integrity sha512-fVEKHGeK85bGbVFuwO9o1aU0n3vqQGrezPc51JGu9UTXpFQfWq5qCeKxyaRUSvephs+06c5j5rPq/dzHGEo8+Q==
+ dependencies:
+ path-root "^0.1.1"
+ resolve "^1.10.0"
+
resolve-url@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
@@ -9541,6 +9856,13 @@ resolve@^1.1.3, resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.0,
dependencies:
path-parse "^1.0.5"
+resolve@^1.10.0, resolve@^1.8.1:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba"
+ integrity sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==
+ dependencies:
+ path-parse "^1.0.6"
+
resolve@^1.3.2, resolve@^1.3.3, resolve@^1.4.0, resolve@^1.7.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26"
@@ -9647,9 +9969,10 @@ rsvp@^4.8.2:
version "4.8.3"
resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.3.tgz#25d4b9fdd0f95e216eb5884d9b3767d3fbfbe2cd"
-rsvp@^4.8.3:
+rsvp@^4.8.3, rsvp@^4.8.4:
version "4.8.4"
resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.4.tgz#b50e6b34583f3dd89329a2f23a8a2be072845911"
+ integrity sha512-6FomvYPfs+Jy9TfXmBpBuMWNH94SgCsZmJKcanySzgNNP6LjWxBvyLTa9KaMfDDM5oxRfrKDB0r/qeRsLwnBfA==
rsvp@~3.0.6:
version "3.0.21"
@@ -9779,6 +10102,11 @@ semver@^5.3.0, semver@^5.4.1:
version "5.5.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477"
+semver@^5.5.1:
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
+ integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==
+
semver@~5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
@@ -10996,6 +11324,15 @@ walk-sync@^0.3.1, walk-sync@^0.3.3:
ensure-posix-path "^1.0.0"
matcher-collection "^1.0.0"
+walk-sync@^1.0.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/walk-sync/-/walk-sync-1.1.3.tgz#3b7b6468f068b5eba2278c931c57db3d39092969"
+ integrity sha512-23ivbET0Q/389y3EHpiIgxx881AS2mwdXA7iBqUDNSymoTPYb2jWlF3gkuuAP1iLgdNXmiHw/kZ/wZwrELU6Ag==
+ dependencies:
+ "@types/minimatch" "^3.0.3"
+ ensure-posix-path "^1.1.0"
+ matcher-collection "^1.1.1"
+
walker@1.x, walker@~1.0.5:
version "1.0.7"
resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb"
@@ -11137,6 +11474,15 @@ workerpool@^2.3.1:
dependencies:
object-assign "4.1.1"
+workerpool@^3.1.1:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-3.1.2.tgz#b34e79243647decb174b7481ab5b351dc565c426"
+ integrity sha512-WJFA0dGqIK7qj7xPTqciWBH5DlJQzoPjsANvc3Y4hNB0SScT+Emjvt0jPPkDBUjBNngX1q9hHgt1Gfwytu6pug==
+ dependencies:
+ "@babel/core" "^7.3.4"
+ object-assign "4.1.1"
+ rsvp "^4.8.4"
+
wrap-ansi@^2.0.0:
version "2.1.0"
resolved "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"