From 3d900f5a2bac750755129c13cc4d20996e12b58c Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 11 Aug 2021 16:38:20 -0700 Subject: [PATCH 1/9] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20group=20capabilities?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/mirage/factories/group.js | 8 ++++++ ui/admin/app/components/form/group/index.hbs | 15 ++++++----- .../scopes/scope/groups/group/-actions.hbs | 16 ++++++----- .../templates/scopes/scope/groups/index.hbs | 11 ++++++-- yarn.lock | 27 ++++--------------- 5 files changed, 39 insertions(+), 38 deletions(-) diff --git a/addons/api/mirage/factories/group.js b/addons/api/mirage/factories/group.js index 79b28cc2e..ab3c7a777 100644 --- a/addons/api/mirage/factories/group.js +++ b/addons/api/mirage/factories/group.js @@ -1,7 +1,15 @@ import factory from '../generated/factories/group'; import { trait } from 'ember-cli-mirage'; +import permissions from '../helpers/permissions'; export default factory.extend({ + authorized_actions: () => + permissions.authorizedActionsFor('account') || [ + 'no-op', + 'read', + 'update', + 'delete', + ], id: (i) => `group-${i}`, /** diff --git a/ui/admin/app/components/form/group/index.hbs b/ui/admin/app/components/form/group/index.hbs index a0c3230ef..7ed797846 100644 --- a/ui/admin/app/components/form/group/index.hbs +++ b/ui/admin/app/components/form/group/index.hbs @@ -46,11 +46,12 @@ {{/if}} - - + {{#if (can 'save model' @model)}} + + {{/if}} \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/groups/group/-actions.hbs b/ui/admin/app/templates/scopes/scope/groups/group/-actions.hbs index c1a11742e..4a8b822fa 100644 --- a/ui/admin/app/templates/scopes/scope/groups/group/-actions.hbs +++ b/ui/admin/app/templates/scopes/scope/groups/group/-actions.hbs @@ -7,11 +7,13 @@ {{t 'resources.group.actions.add-members'}} - - {{t 'resources.group.actions.delete'}} - + {{#if (can 'delete model' @model)}} + + {{t 'resources.group.actions.delete'}} + + {{/if}} \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/groups/index.hbs b/ui/admin/app/templates/scopes/scope/groups/index.hbs index 64abb45ad..cb59fde2e 100644 --- a/ui/admin/app/templates/scopes/scope/groups/index.hbs +++ b/ui/admin/app/templates/scopes/scope/groups/index.hbs @@ -35,9 +35,16 @@ {{#each @model as |group|}} - + {{#if (can 'read model' group)}} + + {{group.displayName}} + + {{else}} {{group.displayName}} - + {{/if}}

{{group.description}}

diff --git a/yarn.lock b/yarn.lock index e32eb765e..796961516 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7682,7 +7682,7 @@ debug@^3.0.0, debug@^3.0.1, debug@^3.1.0, debug@^3.1.1, debug@^3.2.6: dependencies: ms "^2.1.1" -debuglog@*, debuglog@^1.0.1: +debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= @@ -12399,7 +12399,7 @@ import-lazy@^4.0.0: resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== -imurmurhash@*, imurmurhash@^0.1.4: +imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= @@ -14091,11 +14091,6 @@ lodash._baseflatten@^3.0.0: lodash.isarguments "^3.0.0" lodash.isarray "^3.0.0" -lodash._baseindexof@*: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" - integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw= - lodash._baseuniq@~4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" @@ -14104,16 +14099,11 @@ lodash._baseuniq@~4.6.0: lodash._createset "~4.0.0" lodash._root "~3.0.0" -lodash._bindcallback@*, lodash._bindcallback@^3.0.0: +lodash._bindcallback@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4= -lodash._cacheindexof@*: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" - integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI= - lodash._createassigner@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11" @@ -14123,19 +14113,12 @@ lodash._createassigner@^3.0.0: lodash._isiterateecall "^3.0.0" lodash.restparam "^3.0.0" -lodash._createcache@*: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" - integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM= - dependencies: - lodash._getnative "^3.0.0" - lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= -lodash._getnative@*, lodash._getnative@^3.0.0: +lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U= @@ -14353,7 +14336,7 @@ lodash.pick@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM= -lodash.restparam@*, lodash.restparam@^3.0.0: +lodash.restparam@^3.0.0: version "3.6.1" resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU= From dbc06a4e0adb5533e9ed3b2cde8074f84b59a74c Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 11 Aug 2021 17:33:54 -0700 Subject: [PATCH 2/9] =?UTF-8?q?test:=20=F0=9F=92=8D=20add=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/tests/acceptance/groups-test.js | 101 ------------------ .../tests/acceptance/groups/delete-test.js | 85 +++++++++++++++ ui/admin/tests/acceptance/groups/read-test.js | 60 +++++++++++ .../tests/acceptance/groups/update-test.js | 100 +++++++++++++++++ 4 files changed, 245 insertions(+), 101 deletions(-) create mode 100644 ui/admin/tests/acceptance/groups/delete-test.js create mode 100644 ui/admin/tests/acceptance/groups/read-test.js create mode 100644 ui/admin/tests/acceptance/groups/update-test.js diff --git a/ui/admin/tests/acceptance/groups-test.js b/ui/admin/tests/acceptance/groups-test.js index 1dfb81a7c..38b95d60d 100644 --- a/ui/admin/tests/acceptance/groups-test.js +++ b/ui/admin/tests/acceptance/groups-test.js @@ -2,7 +2,6 @@ import { module, test } from 'qunit'; import { visit, currentURL, click, fillIn, find } from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; -import a11yAudit from 'ember-a11y-testing/test-support/audit'; import { Response } from 'miragejs'; import { authenticateSession, @@ -44,20 +43,6 @@ module('Acceptance | groups', function (hooks) { urls.newGroup = `${urls.groups}/new`; }); - test('visiting groups', async function (assert) { - assert.expect(1); - await visit(urls.groups); - await a11yAudit(); - assert.equal(currentURL(), urls.groups); - }); - - test('visiting a group', async function (assert) { - assert.expect(1); - await visit(urls.newGroup); - await a11yAudit(); - assert.equal(currentURL(), urls.newGroup); - }); - test('can create new group', async function (assert) { assert.expect(1); const groupsCount = this.server.db.groups.length; @@ -112,90 +97,4 @@ module('Acceptance | groups', function (hooks) { 'Displays field-level errors.' ); }); - - test('can save changes to an existing group', async function (assert) { - assert.expect(2); - await visit(urls.group); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'Updated admin group'); - await click('.rose-form-actions [type="submit"]'); - assert.equal(currentURL(), urls.group); - assert.equal(this.server.db.groups[0].name, 'Updated admin group'); - }); - - test('can cancel changes to an existing group', async function (assert) { - assert.expect(1); - await visit(urls.group); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'Updated admin group'); - await click('.rose-form-actions [type="button"]'); - assert.notEqual(find('[name="name"]').value, 'Updated admin group'); - }); - - test('can delete a group', async function (assert) { - assert.expect(1); - const groupsCount = this.server.db.groups.length; - await visit(urls.group); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(this.server.db.groups.length, groupsCount - 1); - }); - - test('saving an existing group with invalid fields displays error messages', async function (assert) { - assert.expect(2); - this.server.patch('/groups/:id', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: { - request_fields: [ - { - name: 'name', - description: 'Name is required.', - }, - ], - }, - } - ); - }); - await visit(urls.group); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'random string'); - await click('[type="submit"]'); - assert.ok( - find('[role="alert"]').textContent.trim(), - 'The request was invalid.', - 'Displays primary error message.' - ); - assert.ok( - find('.rose-form-error-message').textContent.trim(), - 'Name is required.', - 'Displays field-level errors.' - ); - }); - - test('errors are displayed when delete project fails', async function (assert) { - assert.expect(1); - this.server.del('/groups/:id', () => { - return new Response( - 490, - {}, - { - status: 490, - code: 'error', - message: 'Oops.', - } - ); - }); - await visit(urls.group); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.ok( - find('[role="alert"]').textContent.trim(), - 'Oops.', - 'Displays primary error message.' - ); - }); }); diff --git a/ui/admin/tests/acceptance/groups/delete-test.js b/ui/admin/tests/acceptance/groups/delete-test.js new file mode 100644 index 000000000..3d5fc8a09 --- /dev/null +++ b/ui/admin/tests/acceptance/groups/delete-test.js @@ -0,0 +1,85 @@ +import { module, test } from 'qunit'; +import { visit, click, find } from '@ember/test-helpers'; +import { setupApplicationTest } from 'ember-qunit'; +import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; +import { Response } from 'miragejs'; +import { + authenticateSession, + // These are left here intentionally for future reference. + //currentSession, + //invalidateSession, +} from 'ember-simple-auth/test-support'; + +module('Acceptance | groups', function (hooks) { + setupApplicationTest(hooks); + setupMirage(hooks); + + const instances = { + scopes: { + global: null, + org: null, + }, + group: null, + }; + const urls = { + orgScope: null, + groups: null, + group: null, + newGroup: null, + }; + + hooks.beforeEach(function () { + authenticateSession({}); + instances.scopes.global = this.server.create('scope', { id: 'global' }); + instances.scopes.org = this.server.create('scope', { + type: 'org', + scope: { id: 'global', type: 'global' }, + }); + instances.group = this.server.create('group', { + scope: instances.scopes.org, + }); + urls.groups = `/scopes/${instances.scopes.org.id}/groups`; + urls.group = `${urls.groups}/${instances.group.id}`; + urls.newGroup = `${urls.groups}/new`; + }); + + test('can delete a group', async function (assert) { + assert.expect(1); + const groupsCount = this.server.db.groups.length; + await visit(urls.group); + await click('.rose-layout-page-actions .rose-dropdown-button-danger'); + assert.equal(this.server.db.groups.length, groupsCount - 1); + }); + + test('cannot delete a group without proper authorization', async function (assert) { + assert.expect(1); + instances.group.authorized_actions = + instances.group.authorized_actions.filter((item) => item !== 'delete'); + await visit(urls.group); + assert.notOk( + find('.rose-layout-page-actions .rose-dropdown-button-danger') + ); + }); + + test('errors are displayed when delete project fails', async function (assert) { + assert.expect(1); + this.server.del('/groups/:id', () => { + return new Response( + 490, + {}, + { + status: 490, + code: 'error', + message: 'Oops.', + } + ); + }); + await visit(urls.group); + await click('.rose-layout-page-actions .rose-dropdown-button-danger'); + assert.ok( + find('[role="alert"]').textContent.trim(), + 'Oops.', + 'Displays primary error message.' + ); + }); +}); diff --git a/ui/admin/tests/acceptance/groups/read-test.js b/ui/admin/tests/acceptance/groups/read-test.js new file mode 100644 index 000000000..384289df5 --- /dev/null +++ b/ui/admin/tests/acceptance/groups/read-test.js @@ -0,0 +1,60 @@ +import { module, test } from 'qunit'; +import { visit, currentURL, find } from '@ember/test-helpers'; +import { setupApplicationTest } from 'ember-qunit'; +import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; +import a11yAudit from 'ember-a11y-testing/test-support/audit'; +import { + authenticateSession, + // These are left here intentionally for future reference. + //currentSession, + //invalidateSession, +} from 'ember-simple-auth/test-support'; + +module('Acceptance | groups', function (hooks) { + setupApplicationTest(hooks); + setupMirage(hooks); + + const instances = { + scopes: { + global: null, + org: null, + }, + group: null, + }; + const urls = { + orgScope: null, + groups: null, + group: null, + newGroup: null, + }; + + hooks.beforeEach(function () { + authenticateSession({}); + instances.scopes.global = this.server.create('scope', { id: 'global' }); + instances.scopes.org = this.server.create('scope', { + type: 'org', + scope: { id: 'global', type: 'global' }, + }); + instances.group = this.server.create('group', { + scope: instances.scopes.org, + }); + urls.groups = `/scopes/${instances.scopes.org.id}/groups`; + urls.group = `${urls.groups}/${instances.group.id}`; + urls.newGroup = `${urls.groups}/new`; + }); + + test('visiting a group', async function (assert) { + assert.expect(1); + await visit(urls.newGroup); + await a11yAudit(); + assert.equal(currentURL(), urls.newGroup); + }); + + test('cannot navigate to a group form without proper authorization', async function (assert) { + assert.expect(1); + instances.group.authorized_actions = + instances.group.authorized_actions.filter((item) => item !== 'read'); + await visit(urls.group); + assert.notOk(find('main tbody .rose-table-header-cell:nth-child(1) a')); + }); +}); diff --git a/ui/admin/tests/acceptance/groups/update-test.js b/ui/admin/tests/acceptance/groups/update-test.js new file mode 100644 index 000000000..9f96aff06 --- /dev/null +++ b/ui/admin/tests/acceptance/groups/update-test.js @@ -0,0 +1,100 @@ +import { module, test } from 'qunit'; +import { visit, currentURL, click, find, fillIn } from '@ember/test-helpers'; +import { setupApplicationTest } from 'ember-qunit'; +import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; +import { Response } from 'miragejs'; +import { + authenticateSession, + // These are left here intentionally for future reference. + //currentSession, + //invalidateSession, +} from 'ember-simple-auth/test-support'; + +module('Acceptance | groups', function (hooks) { + setupApplicationTest(hooks); + setupMirage(hooks); + + const instances = { + scopes: { + global: null, + org: null, + }, + group: null, + }; + const urls = { + orgScope: null, + groups: null, + group: null, + newGroup: null, + }; + + hooks.beforeEach(function () { + authenticateSession({}); + instances.scopes.global = this.server.create('scope', { id: 'global' }); + instances.scopes.org = this.server.create('scope', { + type: 'org', + scope: { id: 'global', type: 'global' }, + }); + instances.group = this.server.create('group', { + scope: instances.scopes.org, + }); + urls.groups = `/scopes/${instances.scopes.org.id}/groups`; + urls.group = `${urls.groups}/${instances.group.id}`; + urls.newGroup = `${urls.groups}/new`; + }); + test('can save changes to an existing group', async function (assert) { + assert.expect(2); + await visit(urls.group); + await click('form [type="button"]', 'Activate edit mode'); + await fillIn('[name="name"]', 'Updated admin group'); + await click('.rose-form-actions [type="submit"]'); + assert.equal(currentURL(), urls.group); + assert.equal(this.server.db.groups[0].name, 'Updated admin group'); + }); + + test('can cancel changes to an existing group', async function (assert) { + assert.expect(1); + await visit(urls.group); + await click('form [type="button"]', 'Activate edit mode'); + await fillIn('[name="name"]', 'Updated admin group'); + await click('.rose-form-actions [type="button"]'); + assert.notEqual(find('[name="name"]').value, 'Updated admin group'); + }); + + test('saving an existing group with invalid fields displays error messages', async function (assert) { + assert.expect(2); + this.server.patch('/groups/:id', () => { + return new Response( + 400, + {}, + { + status: 400, + code: 'invalid_argument', + message: 'The request was invalid.', + details: { + request_fields: [ + { + name: 'name', + description: 'Name is required.', + }, + ], + }, + } + ); + }); + await visit(urls.group); + await click('form [type="button"]', 'Activate edit mode'); + await fillIn('[name="name"]', 'random string'); + await click('[type="submit"]'); + assert.ok( + find('[role="alert"]').textContent.trim(), + 'The request was invalid.', + 'Displays primary error message.' + ); + assert.ok( + find('.rose-form-error-message').textContent.trim(), + 'Name is required.', + 'Displays field-level errors.' + ); + }); +}); From 84bb6403400586215a490faaa0167ca24c9ea651 Mon Sep 17 00:00:00 2001 From: dharini Date: Thu, 12 Aug 2021 08:29:28 -0700 Subject: [PATCH 3/9] =?UTF-8?q?fix:=20=F0=9F=90=9B=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/templates/scopes/scope/groups/group/-actions.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/admin/app/templates/scopes/scope/groups/group/-actions.hbs b/ui/admin/app/templates/scopes/scope/groups/group/-actions.hbs index 4a8b822fa..253b39ab0 100644 --- a/ui/admin/app/templates/scopes/scope/groups/group/-actions.hbs +++ b/ui/admin/app/templates/scopes/scope/groups/group/-actions.hbs @@ -6,8 +6,8 @@ {{t 'resources.group.actions.add-members'}} - {{#if (can 'delete model' @model)}} + Date: Thu, 12 Aug 2021 11:22:20 -0700 Subject: [PATCH 4/9] update name --- addons/api/mirage/factories/group.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/api/mirage/factories/group.js b/addons/api/mirage/factories/group.js index ab3c7a777..1f7256543 100644 --- a/addons/api/mirage/factories/group.js +++ b/addons/api/mirage/factories/group.js @@ -4,7 +4,7 @@ import permissions from '../helpers/permissions'; export default factory.extend({ authorized_actions: () => - permissions.authorizedActionsFor('account') || [ + permissions.authorizedActionsFor('group') || [ 'no-op', 'read', 'update', From 3fa6332ab47e73aae73022cf7b5df4640ccfa0da Mon Sep 17 00:00:00 2001 From: dharini Date: Thu, 12 Aug 2021 13:29:33 -0700 Subject: [PATCH 5/9] =?UTF-8?q?test:=20=F0=9F=92=8D=20add=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/tests/acceptance/groups/update-test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/admin/tests/acceptance/groups/update-test.js b/ui/admin/tests/acceptance/groups/update-test.js index 9f96aff06..5fc463b9f 100644 --- a/ui/admin/tests/acceptance/groups/update-test.js +++ b/ui/admin/tests/acceptance/groups/update-test.js @@ -42,6 +42,7 @@ module('Acceptance | groups', function (hooks) { urls.group = `${urls.groups}/${instances.group.id}`; urls.newGroup = `${urls.groups}/new`; }); + test('can save changes to an existing group', async function (assert) { assert.expect(2); await visit(urls.group); @@ -52,6 +53,14 @@ module('Acceptance | groups', function (hooks) { assert.equal(this.server.db.groups[0].name, 'Updated admin group'); }); + test('cannot make changes an existing group without proper authorization', async function (assert) { + assert.expect(1); + instances.group.authorized_actions = + instances.group.authorized_actions.filter((item) => item !== 'update'); + await visit(urls.group); + assert.notOk(find('.rose-layout-page-actions .rose-button-secondary')); + }); + test('can cancel changes to an existing group', async function (assert) { assert.expect(1); await visit(urls.group); From a1f428550deeab4bb4dcc03e8ac5cd2200619968 Mon Sep 17 00:00:00 2001 From: dharini Date: Thu, 12 Aug 2021 13:47:07 -0700 Subject: [PATCH 6/9] =?UTF-8?q?fix:=20=F0=9F=90=9B=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/tests/acceptance/groups/update-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/admin/tests/acceptance/groups/update-test.js b/ui/admin/tests/acceptance/groups/update-test.js index 5fc463b9f..f86d2f1c7 100644 --- a/ui/admin/tests/acceptance/groups/update-test.js +++ b/ui/admin/tests/acceptance/groups/update-test.js @@ -53,7 +53,7 @@ module('Acceptance | groups', function (hooks) { assert.equal(this.server.db.groups[0].name, 'Updated admin group'); }); - test('cannot make changes an existing group without proper authorization', async function (assert) { + test('cannot make changes to an existing group without proper authorization', async function (assert) { assert.expect(1); instances.group.authorized_actions = instances.group.authorized_actions.filter((item) => item !== 'update'); From 455b1a29b030cd894c2345db1da8e1524fe9bae3 Mon Sep 17 00:00:00 2001 From: Dharini Jeeva Date: Mon, 16 Aug 2021 17:06:34 -0700 Subject: [PATCH 7/9] Update delete-test.js --- ui/admin/tests/acceptance/groups/delete-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/admin/tests/acceptance/groups/delete-test.js b/ui/admin/tests/acceptance/groups/delete-test.js index 3d5fc8a09..c1dec7fdb 100644 --- a/ui/admin/tests/acceptance/groups/delete-test.js +++ b/ui/admin/tests/acceptance/groups/delete-test.js @@ -10,7 +10,7 @@ import { //invalidateSession, } from 'ember-simple-auth/test-support'; -module('Acceptance | groups', function (hooks) { +module('Acceptance | groups | delete', function (hooks) { setupApplicationTest(hooks); setupMirage(hooks); From 2cca6fe005af011a7e34dd042a14c21c6c005fa5 Mon Sep 17 00:00:00 2001 From: Dharini Jeeva Date: Mon, 16 Aug 2021 17:06:45 -0700 Subject: [PATCH 8/9] Update read-test.js --- ui/admin/tests/acceptance/groups/read-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/admin/tests/acceptance/groups/read-test.js b/ui/admin/tests/acceptance/groups/read-test.js index 384289df5..535ea1175 100644 --- a/ui/admin/tests/acceptance/groups/read-test.js +++ b/ui/admin/tests/acceptance/groups/read-test.js @@ -10,7 +10,7 @@ import { //invalidateSession, } from 'ember-simple-auth/test-support'; -module('Acceptance | groups', function (hooks) { +module('Acceptance | groups | read', function (hooks) { setupApplicationTest(hooks); setupMirage(hooks); From b0bd9b680806c812ea528ddaa96eb29d4d92fb2d Mon Sep 17 00:00:00 2001 From: Dharini Jeeva Date: Mon, 16 Aug 2021 17:07:00 -0700 Subject: [PATCH 9/9] Update update-test.js --- ui/admin/tests/acceptance/groups/update-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/admin/tests/acceptance/groups/update-test.js b/ui/admin/tests/acceptance/groups/update-test.js index f86d2f1c7..6d39cefbe 100644 --- a/ui/admin/tests/acceptance/groups/update-test.js +++ b/ui/admin/tests/acceptance/groups/update-test.js @@ -10,7 +10,7 @@ import { //invalidateSession, } from 'ember-simple-auth/test-support'; -module('Acceptance | groups', function (hooks) { +module('Acceptance | groups | update', function (hooks) { setupApplicationTest(hooks); setupMirage(hooks);