From 6f8afbb7af5927e45a45756150951fc1c63272ab Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Thu, 7 Jul 2022 11:18:51 -0700 Subject: [PATCH] Chore update eslint and plugins update (#1171) --- addons/api/package.json | 8 +- .../tests/unit/adapters/application-test.js | 32 +++---- .../tests/unit/adapters/host-catalog-test.js | 4 +- .../unit/mixins/adapter-build-url-test.js | 8 +- addons/api/tests/unit/models/account-test.js | 2 +- addons/api/tests/unit/models/base-test.js | 12 +-- addons/api/tests/unit/models/group-test.js | 10 +-- .../tests/unit/models/host-catalog-test.js | 12 +-- addons/api/tests/unit/models/host-set-test.js | 20 ++--- addons/api/tests/unit/models/host-test.js | 22 ++--- addons/api/tests/unit/models/scope-test.js | 10 +-- addons/api/tests/unit/models/session-test.js | 4 +- addons/api/tests/unit/models/target-test.js | 22 ++--- addons/api/tests/unit/models/user-test.js | 6 +- .../unit/serializers/auth-method-test.js | 8 +- .../unit/serializers/fragment-string-test.js | 2 +- .../services/resource-filter-store-test.js | 2 +- .../api/tests/unit/services/storage-test.js | 6 +- addons/auth/package.json | 8 +- .../tests/unit/session-stores/cookie-test.js | 2 +- addons/core/package.json | 8 +- .../components/error/message-test.js | 24 ++--- .../components/pending-confirmations-test.js | 4 +- .../integration/helpers/app-name-test.js | 2 +- .../helpers/company-copyright-test.js | 2 +- .../integration/helpers/company-name-test.js | 2 +- .../tests/integration/helpers/doc-url-test.js | 2 +- .../helpers/format-date-iso-human-test.js | 2 +- .../helpers/format-date-iso-test.js | 2 +- .../unit/authenticators/password-test.js | 4 +- .../core/tests/unit/services/confirm-test.js | 6 +- addons/rose/package.json | 8 +- .../components/rose/anonymous-test.js | 2 +- .../integration/components/rose/badge-test.js | 2 +- .../components/rose/button-test.js | 6 +- .../components/rose/card/link-test.js | 8 +- .../components/rose/dialog/body-test.js | 4 +- .../components/rose/dropdown-test.js | 8 +- .../components/rose/dropdown/button-test.js | 4 +- .../rose/dropdown/key-value-test.js | 4 +- .../components/rose/dropdown/link-test.js | 2 +- .../components/rose/dropdown/section-test.js | 4 +- .../components/rose/footer/nav-test.js | 2 +- .../components/rose/footer/text-test.js | 2 +- .../integration/components/rose/form-test.js | 48 +++++----- .../components/rose/form/checkbox-test.js | 14 +-- .../rose/form/checkbox/group-test.js | 12 +-- .../components/rose/form/errors-test.js | 4 +- .../rose/form/errors/message-test.js | 2 +- .../components/rose/form/fieldset-test.js | 12 +-- .../components/rose/form/helper-text-test.js | 2 +- .../components/rose/form/input-test.js | 20 ++--- .../components/rose/form/label-test.js | 2 +- .../components/rose/form/radio/card-test.js | 2 +- .../components/rose/form/radio/group-test.js | 10 +-- .../components/rose/form/radio/radio-test.js | 4 +- .../components/rose/form/select-test.js | 24 ++--- .../components/rose/form/textarea-test.js | 16 ++-- .../components/rose/header/brand-test.js | 2 +- .../components/rose/header/nav-test.js | 4 +- .../components/rose/header/utilities-test.js | 2 +- .../components/rose/layout/centered-test.js | 2 +- .../components/rose/list/key-value-test.js | 2 +- .../components/rose/message-test.js | 8 +- .../components/rose/nav/breadcrumbs-test.js | 2 +- .../components/rose/nav/link-test.js | 2 +- .../components/rose/nav/sidebar-test.js | 8 +- .../components/rose/nav/tabs-test.js | 2 +- .../components/rose/notification-test.js | 2 +- .../integration/components/rose/table-test.js | 2 +- .../components/rose/table/row/cell-test.js | 2 +- .../modifiers/on-click-inside-test.js | 2 +- .../modifiers/on-click-outside-test.js | 2 +- ui/admin/package.json | 8 +- .../accounts/change-password-test.js | 8 +- .../tests/acceptance/accounts/create-test.js | 12 +-- .../tests/acceptance/accounts/delete-test.js | 4 +- .../tests/acceptance/accounts/read-test.js | 2 +- .../acceptance/accounts/set-password-test.js | 4 +- .../tests/acceptance/accounts/update-test.js | 8 +- .../acceptance/auth-methods/create-test.js | 10 +-- .../acceptance/auth-methods/delete-test.js | 4 +- .../acceptance/auth-methods/oidc-test.js | 10 +-- .../acceptance/auth-methods/read-test.js | 4 +- .../acceptance/auth-methods/update-test.js | 6 +- .../tests/acceptance/authentication-test.js | 64 ++++++------- .../credential-library/create-test.js | 10 +-- .../credential-library/delete-test.js | 6 +- .../credential-library/read-test.js | 2 +- .../credential-library/update-test.js | 14 +-- .../credential-store/create-test.js | 6 +- .../credential-store/delete-test.js | 6 +- .../acceptance/credential-store/read-test.js | 6 +- .../credential-store/update-test.js | 14 +-- .../tests/acceptance/groups/create-test.js | 10 +-- .../tests/acceptance/groups/delete-test.js | 4 +- .../tests/acceptance/groups/members-test.js | 26 +++--- ui/admin/tests/acceptance/groups/read-test.js | 2 +- .../tests/acceptance/groups/update-test.js | 8 +- .../acceptance/host-catalogs/create-test.js | 12 +-- .../acceptance/host-catalogs/delete-test.js | 6 +- .../host-catalogs/host-sets/create-test.js | 6 +- .../host-catalogs/host-sets/delete-test.js | 6 +- .../host-catalogs/host-sets/hosts-test.js | 36 ++++---- .../host-catalogs/host-sets/read-test.js | 4 +- .../host-catalogs/host-sets/update-test.js | 10 +-- .../host-catalogs/hosts/create-test.js | 6 +- .../host-catalogs/hosts/delete-test.js | 6 +- .../host-catalogs/hosts/read-test.js | 4 +- .../host-catalogs/hosts/update-test.js | 14 +-- .../acceptance/host-catalogs/read-test.js | 4 +- .../acceptance/host-catalogs/update-test.js | 14 +-- .../acceptance/managed-groups/create-test.js | 12 +-- .../acceptance/managed-groups/delete-test.js | 4 +- .../acceptance/managed-groups/members-test.js | 4 +- .../acceptance/managed-groups/read-test.js | 2 +- .../acceptance/onboarding/choose-path-test.js | 8 +- .../onboarding/create-resource-test.js | 4 +- .../tests/acceptance/roles/create-test.js | 6 +- .../tests/acceptance/roles/delete-test.js | 4 +- .../tests/acceptance/roles/grants-test.js | 20 ++--- .../tests/acceptance/roles/principals-test.js | 24 ++--- ui/admin/tests/acceptance/roles/read-test.js | 4 +- .../tests/acceptance/roles/update-test.js | 8 +- ui/admin/tests/acceptance/scopes-test.js | 28 +++--- .../tests/acceptance/scopes/delete-test.js | 6 +- ui/admin/tests/acceptance/scopes/read-test.js | 4 +- .../tests/acceptance/scopes/update-test.js | 14 +-- ui/admin/tests/acceptance/sessions-test.js | 12 +-- .../tests/acceptance/targets/create-test.js | 22 ++--- .../targets/credential-sources-test.js | 30 +++---- .../tests/acceptance/targets/delete-test.js | 6 +- .../acceptance/targets/host-sources-test.js | 32 +++---- .../tests/acceptance/targets/read-test.js | 4 +- .../tests/acceptance/targets/update-test.js | 16 ++-- .../tests/acceptance/users/accounts-test.js | 26 +++--- .../tests/acceptance/users/create-test.js | 10 +-- .../tests/acceptance/users/delete-test.js | 4 +- ui/admin/tests/acceptance/users/read-test.js | 2 +- .../tests/acceptance/users/update-test.js | 8 +- .../integration/components/copyable-test.js | 4 +- .../unit/services/window-manager-test.js | 2 +- ui/desktop/package.json | 8 +- .../tests/acceptance/authentication-test.js | 16 ++-- ui/desktop/tests/acceptance/origin-test.js | 20 ++--- ui/desktop/tests/acceptance/projects-test.js | 4 +- .../acceptance/projects/sessions-test.js | 10 +-- .../tests/acceptance/projects/targets-test.js | 28 +++--- .../acceptance/projects/targets/hosts-test.js | 22 ++--- .../projects/targets/sessions-test.js | 28 +++--- ui/desktop/tests/acceptance/scopes-test.js | 36 ++++---- ui/desktop/tests/acceptance/targets-test.js | 4 +- .../components/branded-card-test.js | 4 +- .../tests/integration/components/card-test.js | 2 +- .../integration/components/copyable-test.js | 4 +- .../components/hidden-secret-test.js | 2 +- .../integration/helpers/group-by-test.js | 2 +- .../integration/helpers/raw-json-test.js | 4 +- ui/desktop/tests/unit/services/ipc-test.js | 6 +- ui/desktop/tests/unit/services/origin-test.js | 22 ++--- yarn.lock | 90 +++++++++++-------- 161 files changed, 786 insertions(+), 772 deletions(-) diff --git a/addons/api/package.json b/addons/api/package.json index 4115af17a..bbd4570b5 100644 --- a/addons/api/package.json +++ b/addons/api/package.json @@ -59,11 +59,11 @@ "ember-resolver": "^8.0.3", "ember-source": "~3.28.4", "ember-template-lint": "^3.7.0", - "eslint": "^8.12.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.9", + "eslint": "^8.18.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-ember": "^10.6.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-qunit": "^6.2.0", + "eslint-plugin-qunit": "^7.3.0", "js-bexpr": "hashicorp/js-bexpr#9b4a4b54d85eba67fdfc0990133d1518d890b1e1", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", diff --git a/addons/api/tests/unit/adapters/application-test.js b/addons/api/tests/unit/adapters/application-test.js index f06e308c0..129c3d9c5 100644 --- a/addons/api/tests/unit/adapters/application-test.js +++ b/addons/api/tests/unit/adapters/application-test.js @@ -19,20 +19,20 @@ module('Unit | Adapter | application', function (hooks) { assert.expect(2); const adapter = this.owner.lookup('adapter:application'); assert.ok(adapter.namespace); - assert.equal(adapter.namespace, config.api.namespace); + assert.strictEqual(adapter.namespace, config.api.namespace); }); test('it generates correct URL prefixes', function (assert) { assert.expect(2); const adapter = this.owner.lookup('adapter:application'); assert.ok(config.api.namespace); - assert.equal(adapter.urlPrefix(), config.api.namespace); + assert.strictEqual(adapter.urlPrefix(), config.api.namespace); }); test('it generates correct default URL suffixes', function (assert) { assert.expect(1); const adapter = this.owner.lookup('adapter:application'); - assert.equal(adapter.urlSuffix(), ''); + assert.strictEqual(adapter.urlSuffix(), ''); }); test('it generates URL suffixes with optional `method` from adapterOptions', function (assert) { @@ -43,7 +43,7 @@ module('Unit | Adapter | application', function (hooks) { adapterOptions: { method }, }); assert.ok(config.api.namespace); - assert.equal(suffix, ':set-something'); + assert.strictEqual(suffix, ':set-something'); }); test('it generates correct complete URLs', function (assert) { @@ -64,44 +64,44 @@ module('Unit | Adapter | application', function (hooks) { mockSnapshot, 'findRecord' ); - assert.equal(findRecordURL, '/v1/users/1:my-custom-method'); + assert.strictEqual(findRecordURL, '/v1/users/1:my-custom-method'); const findAllURL = adapter.buildURL('user', null, mockSnapshot, 'findAll'); - assert.equal(findAllURL, '/v1/users:my-custom-method'); + assert.strictEqual(findAllURL, '/v1/users:my-custom-method'); const findBelongsToURL = adapter.buildURL( 'user', '2', mockSnapshot, 'findBelongsTo' ); - assert.equal(findBelongsToURL, '/v1/users/2:my-custom-method'); + assert.strictEqual(findBelongsToURL, '/v1/users/2:my-custom-method'); const createRecordURL = adapter.buildURL( 'user', null, mockSnapshot, 'createRecord' ); - assert.equal(createRecordURL, '/v1/users:my-custom-method'); + assert.strictEqual(createRecordURL, '/v1/users:my-custom-method'); const updateRecordURL = adapter.buildURL( 'user', '3', mockSnapshot, 'updateRecord' ); - assert.equal(updateRecordURL, '/v1/users/3:my-custom-method'); + assert.strictEqual(updateRecordURL, '/v1/users/3:my-custom-method'); const deleteRecordURL = adapter.buildURL( 'user', '4', mockSnapshot, 'deleteRecord' ); - assert.equal(deleteRecordURL, '/v1/users/4:my-custom-method'); + assert.strictEqual(deleteRecordURL, '/v1/users/4:my-custom-method'); }); test('it can request records through the store from a specified scope', async function (assert) { assert.expect(1); const store = this.owner.lookup('service:store'); this.server.get('/v1/groups', (_, { queryParams: { scope_id } }) => { - assert.equal(scope_id, 'p_456', 'Scoped resource URL was requested.'); + assert.strictEqual(scope_id, 'p_456', 'Scoped resource URL was requested.'); return { items: [] }; }); await store.query('group', { scope_id: 'p_456' }); @@ -113,7 +113,7 @@ module('Unit | Adapter | application', function (hooks) { // TODO this is icky, should be changed to a spy or stub const originalAjax = RESTAdapter.prototype.ajax; RESTAdapter.prototype.ajax = (url, type) => { - assert.equal(type, 'PATCH'); + assert.strictEqual(type, 'PATCH'); RESTAdapter.prototype.ajax = originalAjax; }; adapter.ajax('/', 'PUT'); @@ -130,7 +130,7 @@ module('Unit | Adapter | application', function (hooks) { // TODO this is icky, should be changed to a spy or stub const originalAjax = RESTAdapter.prototype.ajax; RESTAdapter.prototype.ajax = (url, type) => { - assert.equal(type, 'POST'); + assert.strictEqual(type, 'POST'); RESTAdapter.prototype.ajax = originalAjax; }; adapter.updateRecord(store, { modelName: 'user' }, snapshot); @@ -167,8 +167,8 @@ module('Unit | Adapter | application', function (hooks) { }; const handledResponse = adapter.handleResponse(400, {}, payload); assert.ok(handledResponse instanceof InvalidError); - assert.equal(handledResponse.errors.length, 1); - assert.equal(handledResponse.message, 'The request was invalid.'); + assert.strictEqual(handledResponse.errors.length, 1); + assert.strictEqual(handledResponse.message, 'The request was invalid.'); assert.ok(handledResponse.errors[0].isInvalid); }); @@ -197,7 +197,7 @@ module('Unit | Adapter | application', function (hooks) { }, }; const handledResponse = adapter.handleResponse(400, {}, payload); - assert.equal( + assert.strictEqual( handledResponse.errors.length, 2, 'A base error plus one field error' diff --git a/addons/api/tests/unit/adapters/host-catalog-test.js b/addons/api/tests/unit/adapters/host-catalog-test.js index 2df45a117..9fe34cd63 100644 --- a/addons/api/tests/unit/adapters/host-catalog-test.js +++ b/addons/api/tests/unit/adapters/host-catalog-test.js @@ -22,7 +22,7 @@ module('Unit | Adapter | host catalog', function (hooks) { mockSnapshot, 'createRecord' ); - assert.equal(createRecordURL, '/v1/host-catalogs'); + assert.strictEqual(createRecordURL, '/v1/host-catalogs'); }); test('it generates correct createRecord URLs for dynamic host catalogs with extra query parameter ?plugin_name', function (assert) { @@ -43,6 +43,6 @@ module('Unit | Adapter | host catalog', function (hooks) { mockSnapshot, 'createRecord' ); - assert.equal(createRecordURL, '/v1/host-catalogs?plugin_name=aws'); + assert.strictEqual(createRecordURL, '/v1/host-catalogs?plugin_name=aws'); }); }); diff --git a/addons/api/tests/unit/mixins/adapter-build-url-test.js b/addons/api/tests/unit/mixins/adapter-build-url-test.js index 796b6bed6..b2e392bb4 100644 --- a/addons/api/tests/unit/mixins/adapter-build-url-test.js +++ b/addons/api/tests/unit/mixins/adapter-build-url-test.js @@ -14,7 +14,7 @@ module('Unit | Mixin | build-url', function (hooks) { this.owner.register('adapter:adapter', Adapter); const adapter = this.owner.lookup('adapter:adapter'); const url = adapter._buildURL('model', 1); - assert.equal(url, '/models/1'); + assert.strictEqual(url, '/models/1'); }); test('it does not interfere with namespaced URLs', function (assert) { @@ -26,7 +26,7 @@ module('Unit | Mixin | build-url', function (hooks) { this.owner.register('adapter:adapter', Adapter); const adapter = this.owner.lookup('adapter:adapter'); const url = adapter._buildURL('model', 1); - assert.equal(url, '/api/v1/models/1'); + assert.strictEqual(url, '/api/v1/models/1'); }); test('it can prepend a prefix', function (assert) { @@ -40,7 +40,7 @@ module('Unit | Mixin | build-url', function (hooks) { this.owner.register('adapter:adapter', Adapter); const adapter = this.owner.lookup('adapter:adapter'); const url = adapter._buildURL('model', 1); - assert.equal(url, '/foo/bars/models/1'); + assert.strictEqual(url, '/foo/bars/models/1'); }); test('it can append a suffix', function (assert) { @@ -54,6 +54,6 @@ module('Unit | Mixin | build-url', function (hooks) { this.owner.register('adapter:adapter', Adapter); const adapter = this.owner.lookup('adapter:adapter'); const url = adapter._buildURL('model', 1); - assert.equal(url, '/models/1:method'); + assert.strictEqual(url, '/models/1:method'); }); }); diff --git a/addons/api/tests/unit/models/account-test.js b/addons/api/tests/unit/models/account-test.js index cc4225e89..8e6d87abb 100644 --- a/addons/api/tests/unit/models/account-test.js +++ b/addons/api/tests/unit/models/account-test.js @@ -18,6 +18,6 @@ module('Unit | Model | account', function (hooks) { }); assert.notOk(model.accountName); model.login_name = 'foobar'; - assert.equal(model.accountName, 'foobar'); + assert.strictEqual(model.accountName, 'foobar'); }); }); diff --git a/addons/api/tests/unit/models/base-test.js b/addons/api/tests/unit/models/base-test.js index 8073aae39..3b6d21391 100644 --- a/addons/api/tests/unit/models/base-test.js +++ b/addons/api/tests/unit/models/base-test.js @@ -36,8 +36,8 @@ module('Unit | Model | base', function (hooks) { }); const scope = store.peekRecord('scope', 'o_1'); const model = store.peekRecord('user', '123abc'); - assert.equal(model.scope.scope_id, scope.id); - assert.equal(model.scopeModel.id, scope.id); + assert.strictEqual(model.scope.scope_id, scope.id); + assert.strictEqual(model.scopeModel.id, scope.id); }); test('it may accept a `scopeModel` for convenience, instead of a fragment', function (assert) { @@ -47,7 +47,7 @@ module('Unit | Model | base', function (hooks) { const model = store.createRecord('user', '123abc'); assert.notEqual(model.scopeID, scope.id); model.scopeModel = scope; - assert.equal(model.scopeID, scope.id); + assert.strictEqual(model.scopeID, scope.id); assert.true(model.scope.isOrg); }); @@ -62,10 +62,10 @@ module('Unit | Model | base', function (hooks) { }, }); const model = store.peekRecord('user', '123abc'); - assert.equal(model.name, null); - assert.equal(model.displayName, '123abc'); + assert.strictEqual(model.name, undefined); + assert.strictEqual(model.displayName, '123abc'); model.name = 'Test'; - assert.equal(model.displayName, 'Test'); + assert.strictEqual(model.displayName, 'Test'); }); test('it has canSave and cannotSave attributes', function (assert) { diff --git a/addons/api/tests/unit/models/group-test.js b/addons/api/tests/unit/models/group-test.js index 7b93a0cef..eb22de3f4 100644 --- a/addons/api/tests/unit/models/group-test.js +++ b/addons/api/tests/unit/models/group-test.js @@ -19,12 +19,12 @@ module('Unit | Model | group', function (hooks) { }, }); const group = store.peekRecord('group', 'group_123'); - assert.equal( + assert.strictEqual( group.member_ids.length, 2, 'Group has two entires in member_ids' ); - assert.equal( + assert.strictEqual( group.members.length, 0, 'Group has no resolved members because they are not loaded yet' @@ -45,12 +45,12 @@ module('Unit | Model | group', function (hooks) { }); // eslint-disable-next-line no-self-assign group.member_ids = [...group.member_ids]; - assert.equal( + assert.strictEqual( group.member_ids.length, 2, 'Group has two entires in member_ids' ); - assert.equal(group.members.length, 2, 'Group has two resolved members'); + assert.strictEqual(group.members.length, 2, 'Group has two resolved members'); }); test('it has an `addMembers` method that groups a specific POST API endpoint and serialization', async function (assert) { @@ -156,7 +156,7 @@ module('Unit | Model | group', function (hooks) { }, }); const group = store.peekRecord('group', 'group_123'); - assert.equal( + assert.strictEqual( group.member_ids.length, 0, 'Group has empty member_ids by default' diff --git a/addons/api/tests/unit/models/host-catalog-test.js b/addons/api/tests/unit/models/host-catalog-test.js index fb2c2cf51..54788d3ed 100644 --- a/addons/api/tests/unit/models/host-catalog-test.js +++ b/addons/api/tests/unit/models/host-catalog-test.js @@ -95,9 +95,9 @@ module('Unit | Model | host catalog', function (hooks) { type: 'plugin', plugin: { name: 'no-such-type' }, }); - assert.equal(modelA.compositeType, 'static'); - assert.equal(modelB.compositeType, 'aws'); - assert.equal(modelC.compositeType, 'unknown'); + assert.strictEqual(modelA.compositeType, 'static'); + assert.strictEqual(modelB.compositeType, 'aws'); + assert.strictEqual(modelC.compositeType, 'unknown'); }); test('set compositeType sets expected values', async function (assert) { @@ -109,8 +109,8 @@ module('Unit | Model | host catalog', function (hooks) { const modelStatic = store.createRecord('host-catalog', { compositeType: 'static', }); - assert.equal(modelPlugin.type, 'plugin'); - assert.equal(modelPlugin.plugin.name, 'aws'); - assert.equal(modelStatic.type, 'static'); + assert.strictEqual(modelPlugin.type, 'plugin'); + assert.strictEqual(modelPlugin.plugin.name, 'aws'); + assert.strictEqual(modelStatic.type, 'static'); }); }); diff --git a/addons/api/tests/unit/models/host-set-test.js b/addons/api/tests/unit/models/host-set-test.js index f3dd6c020..0acfe89a5 100644 --- a/addons/api/tests/unit/models/host-set-test.js +++ b/addons/api/tests/unit/models/host-set-test.js @@ -135,7 +135,7 @@ module('Unit | Model | host set', function (hooks) { const store = this.owner.lookup('service:store'); const modelA = store.createRecord('host-set', { type: 'static' }); const modelB = store.createRecord('host-set', { type: 'plugin' }); - assert.equal(typeof modelA.isStatic, 'boolean'); + assert.strictEqual(typeof modelA.isStatic, 'boolean'); assert.true(modelA.isStatic); assert.false(modelB.isStatic); }); @@ -145,7 +145,7 @@ module('Unit | Model | host set', function (hooks) { const store = this.owner.lookup('service:store'); const modelPlugin = store.createRecord('host-set', { type: 'plugin' }); const modelStatic = store.createRecord('host-set', { type: 'static' }); - assert.equal(typeof modelPlugin.isPlugin, 'boolean'); + assert.strictEqual(typeof modelPlugin.isPlugin, 'boolean'); assert.true(modelPlugin.isPlugin); assert.false(modelStatic.isPlugin); }); @@ -160,7 +160,7 @@ module('Unit | Model | host set', function (hooks) { const modelRandom = store.createRecord('host-set', { plugin: { name: 'random' }, }); - assert.equal(typeof modelAws.isAWS, 'boolean'); + assert.strictEqual(typeof modelAws.isAWS, 'boolean'); assert.true(modelAws.isAWS); assert.false(modelRandom.isAWS); }); @@ -175,7 +175,7 @@ module('Unit | Model | host set', function (hooks) { const modelRandom = store.createRecord('host-set', { plugin: { name: 'random' }, }); - assert.equal(typeof modelAzure.isAzure, 'boolean'); + assert.strictEqual(typeof modelAzure.isAzure, 'boolean'); assert.true(modelAzure.isAzure); assert.false(modelRandom.isAzure); }); @@ -194,9 +194,9 @@ module('Unit | Model | host set', function (hooks) { const modelStatic = store.createRecord('host-set', { type: 'static', }); - assert.equal(modelPlugin1.compositeType, 'aws'); - assert.equal(modelPlugin2.compositeType, 'unknown'); - assert.equal(modelStatic.compositeType, 'static'); + assert.strictEqual(modelPlugin1.compositeType, 'aws'); + assert.strictEqual(modelPlugin2.compositeType, 'unknown'); + assert.strictEqual(modelStatic.compositeType, 'static'); }); test('set compositeType sets expected values', async function (assert) { @@ -209,8 +209,8 @@ module('Unit | Model | host set', function (hooks) { compositeType: 'static', }); - assert.equal(modelPlugin.type, 'plugin'); - assert.equal(modelPlugin.plugin.name, 'aws'); - assert.equal(modelStatic.type, 'static'); + assert.strictEqual(modelPlugin.type, 'plugin'); + assert.strictEqual(modelPlugin.plugin.name, 'aws'); + assert.strictEqual(modelStatic.type, 'static'); }); }); diff --git a/addons/api/tests/unit/models/host-test.js b/addons/api/tests/unit/models/host-test.js index e6a4141f0..cc01b84d5 100644 --- a/addons/api/tests/unit/models/host-test.js +++ b/addons/api/tests/unit/models/host-test.js @@ -20,7 +20,7 @@ module('Unit | Model | host', function (hooks) { address: '127.0.0.1', }, }); - assert.equal(model.attributes.address, '127.0.0.1'); + assert.strictEqual(model.attributes.address, '127.0.0.1'); }); test('it has isStatic and returns the expected values', async function (assert) { @@ -28,7 +28,7 @@ module('Unit | Model | host', function (hooks) { const store = this.owner.lookup('service:store'); const modelA = store.createRecord('host', { type: 'static' }); const modelB = store.createRecord('host', { type: 'plugin' }); - assert.equal(typeof modelA.isStatic, 'boolean'); + assert.strictEqual(typeof modelA.isStatic, 'boolean'); assert.true(modelA.isStatic); assert.false(modelB.isStatic); }); @@ -38,7 +38,7 @@ module('Unit | Model | host', function (hooks) { const store = this.owner.lookup('service:store'); const modelPlugin = store.createRecord('host', { type: 'plugin' }); const modelStatic = store.createRecord('host', { type: 'static' }); - assert.equal(typeof modelPlugin.isPlugin, 'boolean'); + assert.strictEqual(typeof modelPlugin.isPlugin, 'boolean'); assert.true(modelPlugin.isPlugin); assert.false(modelStatic.isPlugin); }); @@ -53,7 +53,7 @@ module('Unit | Model | host', function (hooks) { const modelRandom = store.createRecord('host', { plugin: { name: 'random' }, }); - assert.equal(typeof modelAws.isAWS, 'boolean'); + assert.strictEqual(typeof modelAws.isAWS, 'boolean'); assert.true(modelAws.isAWS); assert.false(modelRandom.isAWS); }); @@ -68,7 +68,7 @@ module('Unit | Model | host', function (hooks) { const modelRandom = store.createRecord('host', { plugin: { name: 'random' }, }); - assert.equal(typeof modelAzure.isAzure, 'boolean'); + assert.strictEqual(typeof modelAzure.isAzure, 'boolean'); assert.true(modelAzure.isAzure); assert.false(modelRandom.isAzure); }); @@ -83,9 +83,9 @@ module('Unit | Model | host', function (hooks) { const modelStatic = store.createRecord('host', { type: 'static', }); - assert.equal(typeof modelPlugin.compositeType, 'string'); - assert.equal(modelPlugin.compositeType, 'Test name'); - assert.equal(modelStatic.compositeType, 'static'); + assert.strictEqual(typeof modelPlugin.compositeType, 'string'); + assert.strictEqual(modelPlugin.compositeType, 'Test name'); + assert.strictEqual(modelStatic.compositeType, 'static'); }); test('set compositeType sets expected values', async function (assert) { @@ -98,8 +98,8 @@ module('Unit | Model | host', function (hooks) { compositeType: 'static', }); - assert.equal(modelPlugin.type, 'plugin'); - assert.equal(modelPlugin.plugin.name, 'aws'); - assert.equal(modelStatic.type, 'static'); + assert.strictEqual(modelPlugin.type, 'plugin'); + assert.strictEqual(modelPlugin.plugin.name, 'aws'); + assert.strictEqual(modelStatic.type, 'static'); }); }); diff --git a/addons/api/tests/unit/models/scope-test.js b/addons/api/tests/unit/models/scope-test.js index 1ac318e57..abb2cd038 100644 --- a/addons/api/tests/unit/models/scope-test.js +++ b/addons/api/tests/unit/models/scope-test.js @@ -25,27 +25,27 @@ module('Unit | Model | scope', function (hooks) { await scopes.firstObject.get('scope'), 'Global scope has no parent' ); - assert.equal( + assert.strictEqual( await scopes.objectAt(1).get('scope.scope_id'), 'global', 'Org 1 parent scope is global' ); - assert.equal( + assert.strictEqual( await scopes.objectAt(2).get('scope.scope_id'), 'global', 'Org 2 parent scope is global' ); - assert.equal( + assert.strictEqual( await scopes.objectAt(3).get('scope.scope_id'), 'o_1', 'Project 1 parent scope is org 1' ); - assert.equal( + assert.strictEqual( await scopes.objectAt(4).get('scope.scope_id'), 'o_1', 'Project 2 parent scope is org 1' ); - assert.equal( + assert.strictEqual( await scopes.objectAt(5).get('scope.scope_id'), 'o_2', 'Project 3 parent scope is org 2' diff --git a/addons/api/tests/unit/models/session-test.js b/addons/api/tests/unit/models/session-test.js index 43cf7caf4..1c53c15ac 100644 --- a/addons/api/tests/unit/models/session-test.js +++ b/addons/api/tests/unit/models/session-test.js @@ -52,11 +52,11 @@ module('Unit | Model | session', function (hooks) { test('it computes a proxy attribute', function (assert) { let store = this.owner.lookup('service:store'); let model = store.createRecord('session'); - assert.equal(model.proxy, null); + assert.strictEqual(model.proxy, null); model.setProperties({ proxy_address: 'localhost', proxy_port: '12345', }); - assert.equal(model.proxy, 'localhost:12345'); + assert.strictEqual(model.proxy, 'localhost:12345'); }); }); diff --git a/addons/api/tests/unit/models/target-test.js b/addons/api/tests/unit/models/target-test.js index f3afdb333..2f0cb33ac 100644 --- a/addons/api/tests/unit/models/target-test.js +++ b/addons/api/tests/unit/models/target-test.js @@ -22,12 +22,12 @@ module('Unit | Model | target', function (hooks) { }, }); const target = store.peekRecord('target', '123abc'); - assert.equal( + assert.strictEqual( target.host_sources.length, 2, 'Target has two entires in host_sources' ); - assert.equal( + assert.strictEqual( target.hostSets.length, 0, 'Target has no resolved hostSets because they are not loaded yet' @@ -50,12 +50,12 @@ module('Unit | Model | target', function (hooks) { // it's necessary to do this assignment to kick-off the computed update. // eslint-disable-next-line no-self-assign target.host_sources = target.host_sources; - assert.equal( + assert.strictEqual( target.host_sources.length, 2, 'Target has two entires in host_sources' ); - assert.equal(target.hostSets.length, 2, 'Target has two resolved hostSets'); + assert.strictEqual(target.hostSets.length, 2, 'Target has two resolved hostSets'); assert.notOk( target.hostSets[0].hostCatalog, 'Host catalog was not resolved because it is not loaded yet' @@ -193,7 +193,7 @@ module('Unit | Model | target', function (hooks) { }, }); const target = store.peekRecord('target', '123abc'); - assert.equal(target.sessions.length, 0); + assert.strictEqual(target.sessions.length, 0); store.push({ data: { id: '1', @@ -215,12 +215,12 @@ module('Unit | Model | target', function (hooks) { attributes: { target_id: '456xyz' }, }, }); - assert.equal( + assert.strictEqual( store.peekAll('session').length, 3, 'There are 3 sessions loaded in the store' ); - assert.equal( + assert.strictEqual( target.sessions.length, 2, 'Target has two associated sessions loaded in the store' @@ -240,12 +240,12 @@ module('Unit | Model | target', function (hooks) { }, }); const target = store.peekRecord('target', '123abc'); - assert.equal( + assert.strictEqual( target.application_credential_source_ids.length, 2, 'Target has two entires in application_credential_source_ids' ); - assert.equal( + assert.strictEqual( target.credentialLibraries.length, 0, 'Target has no resolved credentialLibraries because they are not loaded yet' @@ -271,12 +271,12 @@ module('Unit | Model | target', function (hooks) { target.application_credential_source_ids = target.application_credential_source_ids; /* eslint-enable no-self-assign */ - assert.equal( + assert.strictEqual( target.application_credential_source_ids.length, 2, 'Target has two entires in application_credential_source_ids' ); - assert.equal( + assert.strictEqual( target.credentialLibraries.length, 2, 'Target has two resolved credentialLibraries' diff --git a/addons/api/tests/unit/models/user-test.js b/addons/api/tests/unit/models/user-test.js index 1527af817..43b195ce3 100644 --- a/addons/api/tests/unit/models/user-test.js +++ b/addons/api/tests/unit/models/user-test.js @@ -109,7 +109,7 @@ module('Unit | Model | user', function (hooks) { }, }); const user = store.peekRecord('user', 'user_123'); - assert.equal( + assert.strictEqual( user.account_ids.length, 0, 'User has empty account_ids by default' @@ -147,7 +147,7 @@ module('Unit | Model | user', function (hooks) { const model = store.peekRecord('user', '123abc'); await model.removeAccount('3'); - assert.equal(model.login_name, null); - assert.equal(model.name, 'newName'); + assert.strictEqual(model.login_name, null); + assert.strictEqual(model.name, 'newName'); }); }); diff --git a/addons/api/tests/unit/serializers/auth-method-test.js b/addons/api/tests/unit/serializers/auth-method-test.js index c28338b8e..ae878d744 100644 --- a/addons/api/tests/unit/serializers/auth-method-test.js +++ b/addons/api/tests/unit/serializers/auth-method-test.js @@ -158,9 +158,9 @@ module('Unit | Serializer | auth method', function (hooks) { })); const record = await store.findRecord('auth-method', 'oidc123'); const { account_claim_maps } = record.attributes; - assert.equal(account_claim_maps.firstObject.from, 'from'); - assert.equal(account_claim_maps.firstObject.to, 'to'); - assert.equal(account_claim_maps.lastObject.from, 'foo'); - assert.equal(account_claim_maps.lastObject.to, 'bar'); + assert.strictEqual(account_claim_maps.firstObject.from, 'from'); + assert.strictEqual(account_claim_maps.firstObject.to, 'to'); + assert.strictEqual(account_claim_maps.lastObject.from, 'foo'); + assert.strictEqual(account_claim_maps.lastObject.to, 'bar'); }); }); diff --git a/addons/api/tests/unit/serializers/fragment-string-test.js b/addons/api/tests/unit/serializers/fragment-string-test.js index 0dac16e71..93b0c8397 100644 --- a/addons/api/tests/unit/serializers/fragment-string-test.js +++ b/addons/api/tests/unit/serializers/fragment-string-test.js @@ -20,7 +20,7 @@ module('Unit | Serializer | fragment string', function (hooks) { let serializedRecord = record.serialize(); - assert.equal(serializedRecord, 'string value'); + assert.strictEqual(serializedRecord, 'string value'); }); test('it normalizes records', function (assert) { diff --git a/addons/api/tests/unit/services/resource-filter-store-test.js b/addons/api/tests/unit/services/resource-filter-store-test.js index c748f6751..849578344 100644 --- a/addons/api/tests/unit/services/resource-filter-store-test.js +++ b/addons/api/tests/unit/services/resource-filter-store-test.js @@ -14,6 +14,6 @@ module('Unit | Service | resource-filter-store', function (hooks) { }); const expected = '("/item/type" == "oidc") and ("/item/status" == "active" or "/item/status" == "pending") and ("read" in "/item/authorized_actions")'; - assert.equal(filter.queryExpression, expected); + assert.strictEqual(filter.queryExpression, expected); }); }); diff --git a/addons/api/tests/unit/services/storage-test.js b/addons/api/tests/unit/services/storage-test.js index 5b955dc21..26adae04f 100644 --- a/addons/api/tests/unit/services/storage-test.js +++ b/addons/api/tests/unit/services/storage-test.js @@ -8,14 +8,14 @@ module('Unit | Service | storage', function (hooks) { assert.expect(1); const service = this.owner.lookup('service:storage'); service.setItem('foo', 'bar'); - assert.equal(service.getItem('foo'), 'bar'); + assert.strictEqual(service.getItem('foo'), 'bar'); }); test('it can remove persisted values', function (assert) { assert.expect(2); const service = this.owner.lookup('service:storage'); service.setItem('foo', 'bar'); - assert.equal(service.getItem('foo'), 'bar'); + assert.strictEqual(service.getItem('foo'), 'bar'); service.removeItem('foo'); assert.notOk(service.getItem('foo')); }); @@ -27,7 +27,7 @@ module('Unit | Service | storage', function (hooks) { assert.expect(1); const service = this.owner.lookup('service:storage'); service.setItem('foo', 'bar'); - assert.equal(service.getItem('foo'), 'bar'); + assert.strictEqual(service.getItem('foo'), 'bar'); }); test("it's in-memory storage is implicitly refreshed for every test case, and thus values from previous runs are not present", function (assert) { diff --git a/addons/auth/package.json b/addons/auth/package.json index 152deaa58..7d5bcdb7a 100644 --- a/addons/auth/package.json +++ b/addons/auth/package.json @@ -52,11 +52,11 @@ "ember-resolver": "^8.0.3", "ember-source": "~3.28.4", "ember-template-lint": "^3.7.0", - "eslint": "^8.12.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.9", + "eslint": "^8.18.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-ember": "^10.6.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-qunit": "^6.2.0", + "eslint-plugin-qunit": "^7.3.0", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", "prettier": "^2.4.0", diff --git a/addons/auth/tests/unit/session-stores/cookie-test.js b/addons/auth/tests/unit/session-stores/cookie-test.js index 464ebab52..beac67e98 100644 --- a/addons/auth/tests/unit/session-stores/cookie-test.js +++ b/addons/auth/tests/unit/session-stores/cookie-test.js @@ -84,7 +84,7 @@ module('Unit | Session Store | cookie', function (hooks) { sessionStore.cookies.exists(sessionStore.cookieName), 'session cookie was not set' ); - assert.equal( + assert.strictEqual( sessionStore.cookies.read(sessionStore.authenticatorCookieName), 'foobar' ); diff --git a/addons/core/package.json b/addons/core/package.json index a992466b8..e2f031db0 100644 --- a/addons/core/package.json +++ b/addons/core/package.json @@ -68,11 +68,11 @@ "ember-resolver": "^8.0.3", "ember-source": "~3.28.4", "ember-template-lint": "^3.7.0", - "eslint": "^8.12.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.9", + "eslint": "^8.18.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-ember": "^10.6.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-qunit": "^6.2.0", + "eslint-plugin-qunit": "^7.3.0", "faker": "^5.5.3", "js-bexpr": "hashicorp/js-bexpr#9b4a4b54d85eba67fdfc0990133d1518d890b1e1", "loader.js": "^4.7.0", diff --git a/addons/core/tests/integration/components/error/message-test.js b/addons/core/tests/integration/components/error/message-test.js index 45194503b..90a97a9ce 100644 --- a/addons/core/tests/integration/components/error/message-test.js +++ b/addons/core/tests/integration/components/error/message-test.js @@ -8,41 +8,41 @@ module('Integration | Component | error/message', function (hooks) { test('it renders predefined message for known error status', async function (assert) { await render(hbs``); - assert.equal( + assert.strictEqual( find('.rose-message-title').textContent.trim(), 'You are not signed in' ); - assert.equal( + assert.strictEqual( find('.rose-message-subtitle').textContent.trim(), 'Error 401' ); - assert.equal( + assert.strictEqual( find('.rose-message-description').textContent.trim(), 'You are not signed in. Please sign in and try again later.' ); await render(hbs``); - assert.equal( + assert.strictEqual( find('.rose-message-title').textContent.trim(), 'You are not authorized' ); - assert.equal( + assert.strictEqual( find('.rose-message-subtitle').textContent.trim(), 'Error 403' ); - assert.equal( + assert.strictEqual( find('.rose-message-description').textContent.trim(), 'You must be granted permissions to view this data. Ask your administrator if you think you should have access.' ); await render(hbs``); - assert.equal( + assert.strictEqual( find('.rose-message-title').textContent.trim(), 'Resource not found' ); - assert.equal( + assert.strictEqual( find('.rose-message-subtitle').textContent.trim(), 'Error 404' ); - assert.equal( + assert.strictEqual( find('.rose-message-description').textContent.trim(), 'We could not find the requested resource. You can ask your administrator or try again later.' ); @@ -50,15 +50,15 @@ module('Integration | Component | error/message', function (hooks) { test('it renders default error for unknown error status', async function (assert) { await render(hbs``); - assert.equal( + assert.strictEqual( find('.rose-message-title').textContent.trim(), 'Something went wrong' ); - assert.equal( + assert.strictEqual( find('.rose-message-subtitle').textContent.trim(), 'Error 599' ); - assert.equal( + assert.strictEqual( find('.rose-message-description').textContent.trim(), "We're not sure what happened. Please contact your administrator or try again later." ); diff --git a/addons/core/tests/integration/components/pending-confirmations-test.js b/addons/core/tests/integration/components/pending-confirmations-test.js index 865e32866..5e8227ddc 100644 --- a/addons/core/tests/integration/components/pending-confirmations-test.js +++ b/addons/core/tests/integration/components/pending-confirmations-test.js @@ -15,14 +15,14 @@ module('Integration | Component | pending-confirmations', function (hooks) {
Pending
`); - assert.equal(findAll('.pending').length, 0, 'No pending confirmations'); + assert.strictEqual(findAll('.pending').length, 0, 'No pending confirmations'); service.confirm(); await render(hbs`
Pending
`); - assert.equal(findAll('.pending').length, 1, 'One pending confirmations'); + assert.strictEqual(findAll('.pending').length, 1, 'One pending confirmations'); }); test('it exposes a confirm action that confirms the confirmation', async function (assert) { diff --git a/addons/core/tests/integration/helpers/app-name-test.js b/addons/core/tests/integration/helpers/app-name-test.js index e12d9e19a..ebea27e84 100644 --- a/addons/core/tests/integration/helpers/app-name-test.js +++ b/addons/core/tests/integration/helpers/app-name-test.js @@ -9,6 +9,6 @@ module('Integration | Helper | app-name', function (hooks) { test('it renders', async function (assert) { assert.expect(1); await render(hbs`{{app-name}}`); - assert.equal(this.element.textContent.trim(), 'App Name'); + assert.strictEqual(this.element.textContent.trim(), 'App Name'); }); }); diff --git a/addons/core/tests/integration/helpers/company-copyright-test.js b/addons/core/tests/integration/helpers/company-copyright-test.js index 2965f90e0..596300059 100644 --- a/addons/core/tests/integration/helpers/company-copyright-test.js +++ b/addons/core/tests/integration/helpers/company-copyright-test.js @@ -10,7 +10,7 @@ module('Integration | Helper | company-copyright', function (hooks) { assert.expect(1); const currentYear = new Date().getFullYear(); await render(hbs`{{company-copyright}}`); - assert.equal( + assert.strictEqual( this.element.textContent.trim(), `© ${currentYear} Company Name` ); diff --git a/addons/core/tests/integration/helpers/company-name-test.js b/addons/core/tests/integration/helpers/company-name-test.js index e34ef582b..5c1089b3a 100644 --- a/addons/core/tests/integration/helpers/company-name-test.js +++ b/addons/core/tests/integration/helpers/company-name-test.js @@ -9,6 +9,6 @@ module('Integration | Helper | company-name', function (hooks) { test('it renders', async function (assert) { assert.expect(1); await render(hbs`{{company-name}}`); - assert.equal(this.element.textContent.trim(), 'Company Name'); + assert.strictEqual(this.element.textContent.trim(), 'Company Name'); }); }); diff --git a/addons/core/tests/integration/helpers/doc-url-test.js b/addons/core/tests/integration/helpers/doc-url-test.js index 6267c73e6..b5ee0adbc 100644 --- a/addons/core/tests/integration/helpers/doc-url-test.js +++ b/addons/core/tests/integration/helpers/doc-url-test.js @@ -14,7 +14,7 @@ module('Integration | Helper | doc-url', function (hooks) { await render(hbs`{{doc-url 'account'}}`); assert.ok(baseURL); assert.ok(path); - assert.equal(this.element.textContent.trim(), `${baseURL}${path}`); + assert.strictEqual(this.element.textContent.trim(), `${baseURL}${path}`); }); test('it throws an error if the specified documentation path cannot be found', async function (assert) { diff --git a/addons/core/tests/integration/helpers/format-date-iso-human-test.js b/addons/core/tests/integration/helpers/format-date-iso-human-test.js index 35f7c06e3..dbd625e87 100644 --- a/addons/core/tests/integration/helpers/format-date-iso-human-test.js +++ b/addons/core/tests/integration/helpers/format-date-iso-human-test.js @@ -11,6 +11,6 @@ module('Integration | Helper | format-date-iso-human', function (hooks) { await render(hbs`{{format-date-iso-human inputValue}}`); - assert.equal(this.element.textContent.trim(), '2020-01-01 00:00:00'); + assert.strictEqual(this.element.textContent.trim(), '2020-01-01 00:00:00'); }); }); diff --git a/addons/core/tests/integration/helpers/format-date-iso-test.js b/addons/core/tests/integration/helpers/format-date-iso-test.js index 0914b6a3a..ee931143d 100644 --- a/addons/core/tests/integration/helpers/format-date-iso-test.js +++ b/addons/core/tests/integration/helpers/format-date-iso-test.js @@ -11,6 +11,6 @@ module('Integration | Helper | format-date-iso', function (hooks) { await render(hbs`{{format-date-iso inputValue}}`); - assert.equal(this.element.textContent.trim(), '2020-01-01T00:00:00.999Z'); + assert.strictEqual(this.element.textContent.trim(), '2020-01-01T00:00:00.999Z'); }); }); diff --git a/addons/core/tests/unit/authenticators/password-test.js b/addons/core/tests/unit/authenticators/password-test.js index 2542aed56..b57b463df 100644 --- a/addons/core/tests/unit/authenticators/password-test.js +++ b/addons/core/tests/unit/authenticators/password-test.js @@ -32,7 +32,7 @@ module('Unit | Authenticator | password', function (hooks) { return new Response(200); }); authenticator.restore(mockData); - assert.equal(applicationAdapter.headers.Authorization, 'Bearer token1234'); + assert.strictEqual(applicationAdapter.headers.Authorization, 'Bearer token1234'); }); test('it adds an authorization header to application adapter on authenticate', async function (assert) { @@ -44,7 +44,7 @@ module('Unit | Authenticator | password', function (hooks) { this.server.create('auth-method', { id: authMethod.id, scopeId: 'global' }); this.server.create('user', { scopeId: 'global' }); await authenticator.authenticate(creds, null, { scope, authMethod }); - assert.equal( + assert.strictEqual( applicationAdapter.headers.Authorization, 'Bearer thetokenstring' ); diff --git a/addons/core/tests/unit/services/confirm-test.js b/addons/core/tests/unit/services/confirm-test.js index c421c90d6..56d31e210 100644 --- a/addons/core/tests/unit/services/confirm-test.js +++ b/addons/core/tests/unit/services/confirm-test.js @@ -18,11 +18,11 @@ module('Unit | Service | confirm', function (hooks) { assert.expect(3); const service = this.owner.lookup('service:confirm'); service.enabled = true; - assert.equal(service.pending.length, 0, 'No pending confirmations yet'); + assert.strictEqual(service.pending.length, 0, 'No pending confirmations yet'); const confirmation = service.confirm(); - assert.equal(service.pending.length, 1, 'One pending confirmation created'); + assert.strictEqual(service.pending.length, 1, 'One pending confirmation created'); confirmation.confirm(); - assert.equal(service.pending.length, 0, 'Confirmation was confirmed'); + assert.strictEqual(service.pending.length, 0, 'Confirmation was confirmed'); }); test('confirmations may be confirmed or dismissed', function (assert) { diff --git a/addons/rose/package.json b/addons/rose/package.json index 67db29f1f..2d9d93e61 100644 --- a/addons/rose/package.json +++ b/addons/rose/package.json @@ -83,11 +83,11 @@ "ember-resolver": "^8.0.3", "ember-source": "~3.28.4", "ember-template-lint": "^3.7.0", - "eslint": "^8.12.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.9", + "eslint": "^8.18.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-ember": "^10.6.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-qunit": "^6.2.0", + "eslint-plugin-qunit": "^7.3.0", "jest": "^27.4.7", "loader.js": "^4.7.0", "npm-run-all": "^4.1.5", diff --git a/addons/rose/tests/integration/components/rose/anonymous-test.js b/addons/rose/tests/integration/components/rose/anonymous-test.js index d5b65eac0..bacbe1058 100644 --- a/addons/rose/tests/integration/components/rose/anonymous-test.js +++ b/addons/rose/tests/integration/components/rose/anonymous-test.js @@ -13,6 +13,6 @@ module('Integration | Component | rose/anonymous', function (hooks) { {{/rose/anonymous}} `); assert.ok(find('main')); - assert.equal(this.element.textContent.trim(), 'template block text'); + assert.strictEqual(this.element.textContent.trim(), 'template block text'); }); }); diff --git a/addons/rose/tests/integration/components/rose/badge-test.js b/addons/rose/tests/integration/components/rose/badge-test.js index f006308ee..742cb9f32 100644 --- a/addons/rose/tests/integration/components/rose/badge-test.js +++ b/addons/rose/tests/integration/components/rose/badge-test.js @@ -13,7 +13,7 @@ module('Integration | Component | rose/badge', function (hooks) { test('it renders with content', async function (assert) { await render(hbs`host-catalog-1`); - assert.equal(find('.rose-badge').textContent.trim(), 'host-catalog-1'); + assert.strictEqual(find('.rose-badge').textContent.trim(), 'host-catalog-1'); }); test('it renders an icon using @icon', async function (assert) { diff --git a/addons/rose/tests/integration/components/rose/button-test.js b/addons/rose/tests/integration/components/rose/button-test.js index e5a685be5..f9be7f3e7 100644 --- a/addons/rose/tests/integration/components/rose/button-test.js +++ b/addons/rose/tests/integration/components/rose/button-test.js @@ -8,17 +8,17 @@ module('Integration | Component | rose/button', function (hooks) { test('it renders', async function (assert) { await render(hbs`Button`); - assert.equal(this.element.textContent.trim(), 'Button'); + assert.strictEqual(this.element.textContent.trim(), 'Button'); }); test('it is type="button" by default', async function (assert) { await render(hbs`Button`); - assert.equal(find('button').type, 'button'); + assert.strictEqual(find('button').type, 'button'); }); test('it is type="submit" when @submit={{true}}', async function (assert) { await render(hbs``); - assert.equal(find('button').type, 'submit'); + assert.strictEqual(find('button').type, 'submit'); }); test('it is disabled when @disabled={{true}}', async function (assert) { diff --git a/addons/rose/tests/integration/components/rose/card/link-test.js b/addons/rose/tests/integration/components/rose/card/link-test.js index 1362447d0..8ea0790e5 100644 --- a/addons/rose/tests/integration/components/rose/card/link-test.js +++ b/addons/rose/tests/integration/components/rose/card/link-test.js @@ -17,8 +17,8 @@ module('Integration | Component | rose/card/link', function (hooks) { test('it renders with @title', async function (assert) { await render(hbs``); - assert.equal(find('a').title, 'card title'); - assert.equal( + assert.strictEqual(find('a').title, 'card title'); + assert.strictEqual( find('.rose-card-link-title').textContent.trim(), 'card title' ); @@ -26,7 +26,7 @@ module('Integration | Component | rose/card/link', function (hooks) { test('it renders with @description', async function (assert) { await render(hbs``); - assert.equal( + assert.strictEqual( find('.rose-card-link-body').textContent.trim(), 'card description' ); @@ -34,7 +34,7 @@ module('Integration | Component | rose/card/link', function (hooks) { test('it renders with @id', async function (assert) { await render(hbs``); - assert.equal( + assert.strictEqual( find('.rose-card-link-footer-id').textContent.trim(), 'card_id' ); diff --git a/addons/rose/tests/integration/components/rose/dialog/body-test.js b/addons/rose/tests/integration/components/rose/dialog/body-test.js index 252f745a3..57d2a9da1 100644 --- a/addons/rose/tests/integration/components/rose/dialog/body-test.js +++ b/addons/rose/tests/integration/components/rose/dialog/body-test.js @@ -12,7 +12,7 @@ module('Integration | Component | rose/dialog/body', function (hooks) { await render(hbs``); - assert.equal(this.element.textContent.trim(), ''); + assert.strictEqual(this.element.textContent.trim(), ''); // Template block usage: await render(hbs` @@ -21,6 +21,6 @@ module('Integration | Component | rose/dialog/body', function (hooks) { `); - assert.equal(this.element.textContent.trim(), 'template block text'); + assert.strictEqual(this.element.textContent.trim(), 'template block text'); }); }); diff --git a/addons/rose/tests/integration/components/rose/dropdown-test.js b/addons/rose/tests/integration/components/rose/dropdown-test.js index 2e1fd20cc..368dddd42 100644 --- a/addons/rose/tests/integration/components/rose/dropdown-test.js +++ b/addons/rose/tests/integration/components/rose/dropdown-test.js @@ -20,12 +20,12 @@ module('Integration | Component | rose/dropdown', function (hooks) { test('it renders with trigger', async function (assert) { await render(hbs``); - assert.equal(find('.rose-dropdown-trigger').textContent.trim(), 'Click me'); + assert.strictEqual(find('.rose-dropdown-trigger').textContent.trim(), 'Click me'); }); test('it supports a count', async function (assert) { await render(hbs``); - assert.equal(find('.rose-badge').textContent.trim(), '2'); + assert.strictEqual(find('.rose-badge').textContent.trim(), '2'); }); test('it supports an icon', async function (assert) { @@ -64,8 +64,8 @@ module('Integration | Component | rose/dropdown', function (hooks) { `); assert.ok(find('.rose-dropdown-content')); - assert.equal(findAll('a').length, 2); - assert.equal(findAll('button').length, 3); + assert.strictEqual(findAll('a').length, 2); + assert.strictEqual(findAll('button').length, 3); }); test('it is toggled on click on trigger content', async function (assert) { diff --git a/addons/rose/tests/integration/components/rose/dropdown/button-test.js b/addons/rose/tests/integration/components/rose/dropdown/button-test.js index 92129e5a7..2365d1e04 100644 --- a/addons/rose/tests/integration/components/rose/dropdown/button-test.js +++ b/addons/rose/tests/integration/components/rose/dropdown/button-test.js @@ -13,12 +13,12 @@ module('Integration | Component | rose/dropdown/button', function (hooks) { test('it is type="button" by default', async function (assert) { await render(hbs``); - assert.equal(find('button').type, 'button'); + assert.strictEqual(find('button').type, 'button'); }); test('it is type="submit" when @submit={{true}}', async function (assert) { await render(hbs``); - assert.equal(find('button').type, 'submit'); + assert.strictEqual(find('button').type, 'submit'); }); test('it is disabled when @disabled={{true}}', async function (assert) { diff --git a/addons/rose/tests/integration/components/rose/dropdown/key-value-test.js b/addons/rose/tests/integration/components/rose/dropdown/key-value-test.js index 7381e9560..85cb68183 100644 --- a/addons/rose/tests/integration/components/rose/dropdown/key-value-test.js +++ b/addons/rose/tests/integration/components/rose/dropdown/key-value-test.js @@ -14,7 +14,7 @@ module('Integration | Component | rose/dropdown/key-value', function (hooks) { `); - assert.equal(find('.rose-dropdown-key').textContent.trim(), 'key'); - assert.equal(find('.rose-dropdown-value').textContent.trim(), 'value'); + assert.strictEqual(find('.rose-dropdown-key').textContent.trim(), 'key'); + assert.strictEqual(find('.rose-dropdown-value').textContent.trim(), 'value'); }); }); diff --git a/addons/rose/tests/integration/components/rose/dropdown/link-test.js b/addons/rose/tests/integration/components/rose/dropdown/link-test.js index da0759450..8e7d1a6f6 100644 --- a/addons/rose/tests/integration/components/rose/dropdown/link-test.js +++ b/addons/rose/tests/integration/components/rose/dropdown/link-test.js @@ -21,7 +21,7 @@ module('Integration | Component | rose/dropdown/link', function (hooks) { await render(hbs` content `); - assert.equal(find('.rose-dropdown-link').textContent.trim(), 'content'); + assert.strictEqual(find('.rose-dropdown-link').textContent.trim(), 'content'); }); test('it supports style', async function (assert) { diff --git a/addons/rose/tests/integration/components/rose/dropdown/section-test.js b/addons/rose/tests/integration/components/rose/dropdown/section-test.js index 201ba9c82..7090b360b 100644 --- a/addons/rose/tests/integration/components/rose/dropdown/section-test.js +++ b/addons/rose/tests/integration/components/rose/dropdown/section-test.js @@ -13,7 +13,7 @@ module('Integration | Component | rose/dropdown/section', function (hooks) { `); assert.ok(find('.rose-dropdown-section')); - assert.equal(this.element.textContent.trim(), 'template block text'); + assert.strictEqual(this.element.textContent.trim(), 'template block text'); }); test('it renders with optional @title', async function (assert) { @@ -22,7 +22,7 @@ module('Integration | Component | rose/dropdown/section', function (hooks) { template block text `); - assert.equal( + assert.strictEqual( find('.rose-dropdown-section-title').textContent.trim(), 'Section Title' ); diff --git a/addons/rose/tests/integration/components/rose/footer/nav-test.js b/addons/rose/tests/integration/components/rose/footer/nav-test.js index 4c60c2de2..49fbfbe3c 100644 --- a/addons/rose/tests/integration/components/rose/footer/nav-test.js +++ b/addons/rose/tests/integration/components/rose/footer/nav-test.js @@ -18,6 +18,6 @@ module('Integration | Component | rose/footer/nav', function (hooks) { `); - assert.equal(findAll('a').length, 2); + assert.strictEqual(findAll('a').length, 2); }); }); diff --git a/addons/rose/tests/integration/components/rose/footer/text-test.js b/addons/rose/tests/integration/components/rose/footer/text-test.js index fea89e0cd..82476327f 100644 --- a/addons/rose/tests/integration/components/rose/footer/text-test.js +++ b/addons/rose/tests/integration/components/rose/footer/text-test.js @@ -19,6 +19,6 @@ module('Integration | Component | rose/footer/text', function (hooks) { await render(hbs` content `); - assert.equal(find('.rose-footer-text').textContent.trim(), 'content'); + assert.strictEqual(find('.rose-footer-text').textContent.trim(), 'content'); }); }); diff --git a/addons/rose/tests/integration/components/rose/form-test.js b/addons/rose/tests/integration/components/rose/form-test.js index eae79f40e..19700869c 100644 --- a/addons/rose/tests/integration/components/rose/form-test.js +++ b/addons/rose/tests/integration/components/rose/form-test.js @@ -91,23 +91,23 @@ module('Integration | Component | rose/form', function (hooks) { `); // Before enabling edit mode, fields are disabled and the edit mode button is displayed assert.ok(find('.rose-form')); - assert.equal(findAll('input[disabled]').length, 1); - assert.equal(findAll('button').length, 1); - assert.equal(find('button').textContent.trim(), 'Edit'); + assert.strictEqual(findAll('input[disabled]').length, 1); + assert.strictEqual(findAll('button').length, 1); + assert.strictEqual(find('button').textContent.trim(), 'Edit'); // After entering edit mode, fields are enabled and save/cancel buttons are displayed await click('button'); - assert.equal(findAll('input[disabled]').length, 0); - assert.equal(findAll('button').length, 2); - assert.equal(find('[type="submit"]').textContent.trim(), 'Save'); - assert.equal( + assert.strictEqual(findAll('input[disabled]').length, 0); + assert.strictEqual(findAll('button').length, 2); + assert.strictEqual(find('[type="submit"]').textContent.trim(), 'Save'); + assert.strictEqual( find('button:not([type="submit"])').textContent.trim(), 'Cancel' ); // After canceling, fields are disabled again and the edit mode button is displayed await click('button:not([type="submit"])'); - assert.equal(findAll('input[disabled]').length, 1); - assert.equal(findAll('button').length, 1); - assert.equal(find('button').textContent.trim(), 'Edit'); + assert.strictEqual(findAll('input[disabled]').length, 1); + assert.strictEqual(findAll('button').length, 1); + assert.strictEqual(find('button').textContent.trim(), 'Edit'); }); test('it re-enables read-only mode if the submit handler returns a resolving promise', async function (assert) { @@ -129,32 +129,32 @@ module('Integration | Component | rose/form', function (hooks) { `); // Before enabling edit mode, fields are disabled and the edit mode button is displayed assert.ok(find('.rose-form')); - assert.equal(findAll('input[disabled]').length, 1); - assert.equal(findAll('button').length, 1); - assert.equal(find('button').textContent.trim(), 'Edit'); + assert.strictEqual(findAll('input[disabled]').length, 1); + assert.strictEqual(findAll('button').length, 1); + assert.strictEqual(find('button').textContent.trim(), 'Edit'); // After entering edit mode, fields are enabled and save/cancel buttons are displayed await click('button'); - assert.equal(findAll('input[disabled]').length, 0); - assert.equal(findAll('button').length, 2); - assert.equal(find('[type="submit"]').textContent.trim(), 'Save'); - assert.equal( + assert.strictEqual(findAll('input[disabled]').length, 0); + assert.strictEqual(findAll('button').length, 2); + assert.strictEqual(find('[type="submit"]').textContent.trim(), 'Save'); + assert.strictEqual( find('button:not([type="submit"])').textContent.trim(), 'Cancel' ); // After saving with failure, fields are enabled and save/cancel buttons are displayed this.submit = () => reject(); - assert.equal(findAll('input[disabled]').length, 0); - assert.equal(findAll('button').length, 2); - assert.equal(find('[type="submit"]').textContent.trim(), 'Save'); - assert.equal( + assert.strictEqual(findAll('input[disabled]').length, 0); + assert.strictEqual(findAll('button').length, 2); + assert.strictEqual(find('[type="submit"]').textContent.trim(), 'Save'); + assert.strictEqual( find('button:not([type="submit"])').textContent.trim(), 'Cancel' ); // After saving with success, fields are disabled again and the edit mode button is displayed this.submit = () => resolve(); await click('button[type="submit"]'); - assert.equal(findAll('input[disabled]').length, 1); - assert.equal(findAll('button').length, 1); - assert.equal(find('button').textContent.trim(), 'Edit'); + assert.strictEqual(findAll('input[disabled]').length, 1); + assert.strictEqual(findAll('button').length, 1); + assert.strictEqual(find('button').textContent.trim(), 'Edit'); }); }); diff --git a/addons/rose/tests/integration/components/rose/form/checkbox-test.js b/addons/rose/tests/integration/components/rose/form/checkbox-test.js index cd131f0b1..f5754edef 100644 --- a/addons/rose/tests/integration/components/rose/form/checkbox-test.js +++ b/addons/rose/tests/integration/components/rose/form/checkbox-test.js @@ -9,7 +9,7 @@ module('Integration | Component | rose/form/checkbox', function (hooks) { test('it renders', async function (assert) { assert.expect(3); await render(hbs``); - assert.equal(find('label').textContent.trim(), 'Label'); + assert.strictEqual(find('label').textContent.trim(), 'Label'); assert.ok(find('input')); assert.notOk(find('.rose-form-checkbox-label-description')); }); @@ -19,11 +19,11 @@ module('Integration | Component | rose/form/checkbox', function (hooks) { await render( hbs`` ); - assert.equal( + assert.strictEqual( find('.rose-form-checkbox-label-text').textContent.trim(), 'Label' ); - assert.equal( + assert.strictEqual( find('.rose-form-checkbox-label-description').textContent.trim(), 'Hello world' ); @@ -35,7 +35,7 @@ module('Integration | Component | rose/form/checkbox', function (hooks) { await render( hbs`` ); - assert.equal( + assert.strictEqual( find('.rose-form-helper-text').textContent.trim(), 'Hello world' ); @@ -53,9 +53,9 @@ module('Integration | Component | rose/form/checkbox', function (hooks) { const id = fieldEl.id; const errorsId = `errors-${id}`; const errorMessageEl = find('.rose-form-errors'); - assert.equal(errorMessageEl.id, errorsId); - assert.equal(errorMessageEl.textContent.trim(), 'An error occurred.'); - assert.equal(fieldEl.getAttribute('aria-describedby').trim(), errorsId); + assert.strictEqual(errorMessageEl.id, errorsId); + assert.strictEqual(errorMessageEl.textContent.trim(), 'An error occurred.'); + assert.strictEqual(fieldEl.getAttribute('aria-describedby').trim(), errorsId); }); test('it is not checked by default', async function (assert) { diff --git a/addons/rose/tests/integration/components/rose/form/checkbox/group-test.js b/addons/rose/tests/integration/components/rose/form/checkbox/group-test.js index ae77a2355..49f026771 100644 --- a/addons/rose/tests/integration/components/rose/form/checkbox/group-test.js +++ b/addons/rose/tests/integration/components/rose/form/checkbox/group-test.js @@ -31,7 +31,7 @@ module('Integration | Component | rose/form/checkbox/group', function (hooks) { value={{group.item.id}} /> `); - assert.equal(findAll('input').length, 3); + assert.strictEqual(findAll('input').length, 3); }); test('it checks checkboxes for items present in a selectedItems array', async function (assert) { @@ -49,7 +49,7 @@ module('Integration | Component | rose/form/checkbox/group', function (hooks) { value={{group.item.id}} /> `); - assert.equal(findAll(':checked').length, 1); + assert.strictEqual(findAll(':checked').length, 1); }); test('it fires onChange when items are checked, passing an array of selected items', async function (assert) { @@ -57,8 +57,8 @@ module('Integration | Component | rose/form/checkbox/group', function (hooks) { this.items = items; this.selectedItems = selectedItems; this.onChange = (newlySelectedItems) => { - assert.equal(selectedItems.length, 1); - assert.equal(newlySelectedItems.length, 2); + assert.strictEqual(selectedItems.length, 1); + assert.strictEqual(newlySelectedItems.length, 2); }; await render(hbs` { - assert.equal(selectedItems.length, 1); - assert.equal(newlySelectedItems.length, 0); + assert.strictEqual(selectedItems.length, 1); + assert.strictEqual(newlySelectedItems.length, 0); }; await render(hbs` `); assert.ok(find('.rose-form-errors')); - assert.equal( + assert.strictEqual( find('.rose-form-error-message:first-child').textContent.trim(), 'An error occurred.' ); - assert.equal( + assert.strictEqual( find('.rose-form-error-message:last-child').textContent.trim(), 'Another error occurred.' ); diff --git a/addons/rose/tests/integration/components/rose/form/errors/message-test.js b/addons/rose/tests/integration/components/rose/form/errors/message-test.js index 66662d440..91b538c56 100644 --- a/addons/rose/tests/integration/components/rose/form/errors/message-test.js +++ b/addons/rose/tests/integration/components/rose/form/errors/message-test.js @@ -12,6 +12,6 @@ module('Integration | Component | rose/form/errors/message', function (hooks) { An error occurred. `); - assert.equal(this.element.textContent.trim(), 'An error occurred.'); + assert.strictEqual(this.element.textContent.trim(), 'An error occurred.'); }); }); diff --git a/addons/rose/tests/integration/components/rose/form/fieldset-test.js b/addons/rose/tests/integration/components/rose/form/fieldset-test.js index a75efce1a..793452f64 100644 --- a/addons/rose/tests/integration/components/rose/form/fieldset-test.js +++ b/addons/rose/tests/integration/components/rose/form/fieldset-test.js @@ -35,15 +35,15 @@ module('Integration | Component | rose/form/fieldset', function (hooks) { assert.expect(4); await renderComponent(false); assert.ok(find('.rose-form-fieldset')); - assert.equal( + assert.strictEqual( find('.rose-form-fieldset-title').textContent.trim(), this.mockTitle ); - assert.equal( + assert.strictEqual( find('.rose-form-fieldset-description').textContent.trim(), this.mockDescription ); - assert.equal( + assert.strictEqual( find('.rose-form-fieldset-body').textContent.trim(), this.mockBody ); @@ -53,12 +53,12 @@ module('Integration | Component | rose/form/fieldset', function (hooks) { assert.expect(4); await renderComponent(true); assert.ok(find('.rose-form-fieldset')); - assert.equal( + assert.strictEqual( find('.rose-form-fieldset-title').textContent.trim(), this.mockTitle ); assert.notOk(find('.rose-form-fieldset-description')); - assert.equal( + assert.strictEqual( find('.rose-form-fieldset-body').textContent.trim(), this.mockBody ); @@ -70,7 +70,7 @@ module('Integration | Component | rose/form/fieldset', function (hooks) { const descriptionElement = find('.rose-form-fieldset-description'); const fieldsetElement = find('.rose-form-fieldset'); - assert.equal( + assert.strictEqual( fieldsetElement.getAttribute('aria-describedby'), descriptionElement.id, 'Fieldset is described by description' diff --git a/addons/rose/tests/integration/components/rose/form/helper-text-test.js b/addons/rose/tests/integration/components/rose/form/helper-text-test.js index 76aef0308..14c775da6 100644 --- a/addons/rose/tests/integration/components/rose/form/helper-text-test.js +++ b/addons/rose/tests/integration/components/rose/form/helper-text-test.js @@ -14,7 +14,7 @@ module('Integration | Component | rose/form/helper-text', function (hooks) { `); assert.ok(find('.rose-form-helper-text')); - assert.equal( + assert.strictEqual( find('.rose-form-helper-text').textContent.trim(), 'Helper text' ); diff --git a/addons/rose/tests/integration/components/rose/form/input-test.js b/addons/rose/tests/integration/components/rose/form/input-test.js index d053698ab..413939e9c 100644 --- a/addons/rose/tests/integration/components/rose/form/input-test.js +++ b/addons/rose/tests/integration/components/rose/form/input-test.js @@ -8,8 +8,8 @@ module('Integration | Component | rose/form/input', function (hooks) { test('it renders', async function (assert) { await render(hbs``); - assert.equal(await find('label').textContent.trim(), 'Label'); - assert.equal(await find('input').value, 'Text'); + assert.strictEqual(await find('label').textContent.trim(), 'Label'); + assert.strictEqual(await find('input').value, 'Text'); }); test('it displays optional helper text', async function (assert) { @@ -18,9 +18,9 @@ module('Integration | Component | rose/form/input', function (hooks) { const id = fieldEl.id; const helperId = `helper-text-${id}`; const helperTextEl = find('.rose-form-helper-text'); - assert.equal(helperTextEl.textContent.trim(), 'Help me'); - assert.equal(helperTextEl.id, helperId); - assert.equal(fieldEl.getAttribute('aria-describedby').trim(), helperId); + assert.strictEqual(helperTextEl.textContent.trim(), 'Help me'); + assert.strictEqual(helperTextEl.id, helperId); + assert.strictEqual(fieldEl.getAttribute('aria-describedby').trim(), helperId); }); test('it displays optional errors', async function (assert) { @@ -35,9 +35,9 @@ module('Integration | Component | rose/form/input', function (hooks) { const id = fieldEl.id; const errorsId = `errors-${id}`; const errorMessageEl = find('.rose-form-errors'); - assert.equal(errorMessageEl.id, errorsId); - assert.equal(errorMessageEl.textContent.trim(), 'An error occurred.'); - assert.equal( + assert.strictEqual(errorMessageEl.id, errorsId); + assert.strictEqual(errorMessageEl.textContent.trim(), 'An error occurred.'); + assert.strictEqual( fieldEl.getAttribute('aria-describedby').split(' ')[1], errorsId ); @@ -45,12 +45,12 @@ module('Integration | Component | rose/form/input', function (hooks) { test('it is type="text" by default', async function (assert) { await render(hbs``); - assert.equal(await find('input').type, 'text'); + assert.strictEqual(await find('input').type, 'text'); }); test('it supports a @type attribute', async function (assert) { await render(hbs``); - assert.equal(await find('input').type, 'password'); + assert.strictEqual(await find('input').type, 'password'); }); test('it supports disabled attribute', async function (assert) { diff --git a/addons/rose/tests/integration/components/rose/form/label-test.js b/addons/rose/tests/integration/components/rose/form/label-test.js index ac74b210c..cd08687e3 100644 --- a/addons/rose/tests/integration/components/rose/form/label-test.js +++ b/addons/rose/tests/integration/components/rose/form/label-test.js @@ -14,6 +14,6 @@ module('Integration | Component | rose/form/label', function (hooks) { `); assert.ok(find('.rose-form-label')); - assert.equal(find('.rose-form-label').textContent.trim(), 'Form Label'); + assert.strictEqual(find('.rose-form-label').textContent.trim(), 'Form Label'); }); }); diff --git a/addons/rose/tests/integration/components/rose/form/radio/card-test.js b/addons/rose/tests/integration/components/rose/form/radio/card-test.js index f3dff2206..5bc55dd0e 100644 --- a/addons/rose/tests/integration/components/rose/form/radio/card-test.js +++ b/addons/rose/tests/integration/components/rose/form/radio/card-test.js @@ -9,7 +9,7 @@ module('Integration | Component | rose/form/radio/card', function (hooks) { test('it renders', async function (assert) { await render(hbs``); assert.ok(await find('input')); - assert.equal(await find('input').type, 'radio'); + assert.strictEqual(await find('input').type, 'radio'); }); test('it renders in a tile format when tile layout is applied', async function (assert) { diff --git a/addons/rose/tests/integration/components/rose/form/radio/group-test.js b/addons/rose/tests/integration/components/rose/form/radio/group-test.js index c1706fe5e..72387ca5a 100644 --- a/addons/rose/tests/integration/components/rose/form/radio/group-test.js +++ b/addons/rose/tests/integration/components/rose/form/radio/group-test.js @@ -22,9 +22,9 @@ module('Integration | Component | rose/form/radio/group', function (hooks) { `); - assert.equal(findAll('input').length, 2); - assert.equal(findAll('input')[0].name, 'bird'); - assert.equal(findAll('input')[1].name, 'bird'); + assert.strictEqual(findAll('input').length, 2); + assert.strictEqual(findAll('input')[0].name, 'bird'); + assert.strictEqual(findAll('input')[1].name, 'bird'); }); test('it renders with @selectedValue value selected', async function (assert) { @@ -80,10 +80,10 @@ module('Integration | Component | rose/form/radio/group', function (hooks) { assert.notOk(this.selectedValue); await click(findAll('[type="radio"]')[0]); - assert.equal(this.selectedValue, 'pegion'); + assert.strictEqual(this.selectedValue, 'pegion'); await click(findAll('[type="radio"]')[1]); - assert.equal(this.selectedValue, 'flamingo'); + assert.strictEqual(this.selectedValue, 'flamingo'); }); test('it uses @selectedValue value to set active radiofield', async function (assert) { diff --git a/addons/rose/tests/integration/components/rose/form/radio/radio-test.js b/addons/rose/tests/integration/components/rose/form/radio/radio-test.js index af0be8d54..a9afd1e67 100644 --- a/addons/rose/tests/integration/components/rose/form/radio/radio-test.js +++ b/addons/rose/tests/integration/components/rose/form/radio/radio-test.js @@ -9,12 +9,12 @@ module('Integration | Component | rose/form/radio/radio', function (hooks) { test('it renders', async function (assert) { await render(hbs``); assert.ok(await find('input')); - assert.equal(await find('input').type, 'radio'); + assert.strictEqual(await find('input').type, 'radio'); }); test('it renders with label', async function (assert) { await render(hbs``); - assert.equal(await find('label').textContent.trim(), 'Label'); + assert.strictEqual(await find('label').textContent.trim(), 'Label'); }); test('it supports an icon', async function (assert) { diff --git a/addons/rose/tests/integration/components/rose/form/select-test.js b/addons/rose/tests/integration/components/rose/form/select-test.js index 692efe098..6d02cb902 100644 --- a/addons/rose/tests/integration/components/rose/form/select-test.js +++ b/addons/rose/tests/integration/components/rose/form/select-test.js @@ -22,9 +22,9 @@ module('Integration | Component | rose/form/select', function (hooks) { `); - assert.equal(find('label').textContent.trim(), 'Label'); + assert.strictEqual(find('label').textContent.trim(), 'Label'); assert.ok(find('select')); - assert.equal(findAll('option').length, 4); + assert.strictEqual(findAll('option').length, 4); }); test('it displays optional helper text', async function (assert) { @@ -45,9 +45,9 @@ module('Integration | Component | rose/form/select', function (hooks) { const id = fieldEl.id; const helperId = `helper-text-${id}`; const helperTextEl = find('.rose-form-helper-text'); - assert.equal(helperTextEl.textContent.trim(), 'Help me'); - assert.equal(helperTextEl.id, helperId); - assert.equal(fieldEl.getAttribute('aria-describedby').trim(), helperId); + assert.strictEqual(helperTextEl.textContent.trim(), 'Help me'); + assert.strictEqual(helperTextEl.id, helperId); + assert.strictEqual(fieldEl.getAttribute('aria-describedby').trim(), helperId); }); test('it displays optional errors', async function (assert) { @@ -72,9 +72,9 @@ module('Integration | Component | rose/form/select', function (hooks) { const id = fieldEl.id; const errorsId = `errors-${id}`; const errorMessageEl = find('.rose-form-errors'); - assert.equal(errorMessageEl.id, errorsId); - assert.equal(errorMessageEl.textContent.trim(), 'An error occurred.'); - assert.equal( + assert.strictEqual(errorMessageEl.id, errorsId); + assert.strictEqual(errorMessageEl.textContent.trim(), 'An error occurred.'); + assert.strictEqual( fieldEl.getAttribute('aria-describedby').split(' ')[1], errorsId ); @@ -111,15 +111,15 @@ module('Integration | Component | rose/form/select', function (hooks) { `); - assert.equal(find('select').value, 'value-1'); + assert.strictEqual(find('select').value, 'value-1'); this.set('value', 'value-2'); - assert.equal(find('select').value, 'value-2'); + assert.strictEqual(find('select').value, 'value-2'); }); test('it triggers an action on change', async function (assert) { assert.expect(2); this.onChange1 = (value) => { - assert.equal( + assert.strictEqual( value, null, 'On initial render, onChange is triggered with null' @@ -127,7 +127,7 @@ module('Integration | Component | rose/form/select', function (hooks) { this.set('onChange', this.onChange2); }; this.onChange2 = (value) => { - assert.equal(value, 'value-1', 'On change, value is passed in.'); + assert.strictEqual(value, 'value-1', 'On change, value is passed in.'); }; this.onChange = this.onChange1; await render(hbs` diff --git a/addons/rose/tests/integration/components/rose/form/textarea-test.js b/addons/rose/tests/integration/components/rose/form/textarea-test.js index 938aeba9d..03bd88500 100644 --- a/addons/rose/tests/integration/components/rose/form/textarea-test.js +++ b/addons/rose/tests/integration/components/rose/form/textarea-test.js @@ -8,8 +8,8 @@ module('Integration | Component | rose/form/textarea', function (hooks) { test('it renders', async function (assert) { await render(hbs``); - assert.equal(await find('label').textContent.trim(), 'Label'); - assert.equal(await find('textarea').value, 'Text'); + assert.strictEqual(await find('label').textContent.trim(), 'Label'); + assert.strictEqual(await find('textarea').value, 'Text'); }); test('it displays optional helper text', async function (assert) { @@ -18,9 +18,9 @@ module('Integration | Component | rose/form/textarea', function (hooks) { const id = fieldEl.id; const helperId = `helper-text-${id}`; const helperTextEl = find('.rose-form-helper-text'); - assert.equal(helperTextEl.textContent.trim(), 'Help me'); - assert.equal(helperTextEl.id, helperId); - assert.equal(fieldEl.getAttribute('aria-describedby').trim(), helperId); + assert.strictEqual(helperTextEl.textContent.trim(), 'Help me'); + assert.strictEqual(helperTextEl.id, helperId); + assert.strictEqual(fieldEl.getAttribute('aria-describedby').trim(), helperId); }); test('it displays optional errors', async function (assert) { @@ -35,9 +35,9 @@ module('Integration | Component | rose/form/textarea', function (hooks) { const id = fieldEl.id; const errorsId = `errors-${id}`; const errorMessageEl = find('.rose-form-errors'); - assert.equal(errorMessageEl.id, errorsId); - assert.equal(errorMessageEl.textContent.trim(), 'An error occurred.'); - assert.equal( + assert.strictEqual(errorMessageEl.id, errorsId); + assert.strictEqual(errorMessageEl.textContent.trim(), 'An error occurred.'); + assert.strictEqual( fieldEl.getAttribute('aria-describedby').split(' ')[1], errorsId ); diff --git a/addons/rose/tests/integration/components/rose/header/brand-test.js b/addons/rose/tests/integration/components/rose/header/brand-test.js index e89327632..8927db706 100644 --- a/addons/rose/tests/integration/components/rose/header/brand-test.js +++ b/addons/rose/tests/integration/components/rose/header/brand-test.js @@ -13,7 +13,7 @@ module('Integration | Component | rose/header/brand', function (hooks) { `); assert.ok(find('.rose-header-brand')); assert.ok(find('.rose-header-brand svg')); - assert.equal( + assert.strictEqual( find('.rose-header-brand-text').textContent.trim(), 'Product Name' ); diff --git a/addons/rose/tests/integration/components/rose/header/nav-test.js b/addons/rose/tests/integration/components/rose/header/nav-test.js index fd713c0db..c876e7620 100644 --- a/addons/rose/tests/integration/components/rose/header/nav-test.js +++ b/addons/rose/tests/integration/components/rose/header/nav-test.js @@ -16,7 +16,7 @@ module('Integration | Component | rose/header/nav', function (hooks) { `); - assert.equal(findAll('a').length, 2); + assert.strictEqual(findAll('a').length, 2); }); test('it renders nav dropdown elements', async function (assert) { @@ -24,6 +24,6 @@ module('Integration | Component | rose/header/nav', function (hooks) { `); - assert.equal(findAll('.rose-dropdown').length, 2); + assert.strictEqual(findAll('.rose-dropdown').length, 2); }); }); diff --git a/addons/rose/tests/integration/components/rose/header/utilities-test.js b/addons/rose/tests/integration/components/rose/header/utilities-test.js index 1bb44de8e..fa8693e5e 100644 --- a/addons/rose/tests/integration/components/rose/header/utilities-test.js +++ b/addons/rose/tests/integration/components/rose/header/utilities-test.js @@ -16,7 +16,7 @@ module('Integration | Component | rose/header/utilities', function (hooks) { `); - assert.equal(findAll('.rose-dropdown').length, 2); + assert.strictEqual(findAll('.rose-dropdown').length, 2); }); test('it renders nav dropdown elements as right aligned', async function (assert) { diff --git a/addons/rose/tests/integration/components/rose/layout/centered-test.js b/addons/rose/tests/integration/components/rose/layout/centered-test.js index 1900a1a5a..3fff7c34c 100644 --- a/addons/rose/tests/integration/components/rose/layout/centered-test.js +++ b/addons/rose/tests/integration/components/rose/layout/centered-test.js @@ -22,7 +22,7 @@ module('Integration | Component | rose/layout/centered', function (hooks) { await render(hbs` Layout content `); - assert.equal( + assert.strictEqual( find('.rose-layout-centered').textContent.trim(), 'Layout content' ); diff --git a/addons/rose/tests/integration/components/rose/list/key-value-test.js b/addons/rose/tests/integration/components/rose/list/key-value-test.js index 38e10c345..3882f7b71 100644 --- a/addons/rose/tests/integration/components/rose/list/key-value-test.js +++ b/addons/rose/tests/integration/components/rose/list/key-value-test.js @@ -23,7 +23,7 @@ module('Integration | Component | rose/list/key-value', function (hooks) { const itemLabelledBy = find( '.rose-list-key-value-item:first-child' ).getAttribute('aria-labelledby'); - assert.equal( + assert.strictEqual( findAll('.rose-list-key-value-item').length, 2, 'it has two items' diff --git a/addons/rose/tests/integration/components/rose/message-test.js b/addons/rose/tests/integration/components/rose/message-test.js index e14d74f2e..14fb47448 100644 --- a/addons/rose/tests/integration/components/rose/message-test.js +++ b/addons/rose/tests/integration/components/rose/message-test.js @@ -15,12 +15,12 @@ module('Integration | Component | rose/message', function (hooks) { `); assert.ok(find('.rose-message')); - assert.equal(find('.rose-message-title').textContent.trim(), 'Title'); - assert.equal(find('.rose-message-subtitle').textContent.trim(), 'Subtitle'); - assert.equal( + assert.strictEqual(find('.rose-message-title').textContent.trim(), 'Title'); + assert.strictEqual(find('.rose-message-subtitle').textContent.trim(), 'Subtitle'); + assert.strictEqual( find('.rose-message-description').textContent.trim(), 'Description' ); - assert.equal(find('.rose-message-link').textContent.trim(), 'Link'); + assert.strictEqual(find('.rose-message-link').textContent.trim(), 'Link'); }); }); diff --git a/addons/rose/tests/integration/components/rose/nav/breadcrumbs-test.js b/addons/rose/tests/integration/components/rose/nav/breadcrumbs-test.js index bd935bae3..4d00882eb 100644 --- a/addons/rose/tests/integration/components/rose/nav/breadcrumbs-test.js +++ b/addons/rose/tests/integration/components/rose/nav/breadcrumbs-test.js @@ -21,6 +21,6 @@ module('Integration | Component | rose/nav/breadcrumbs', function (hooks) { `); - assert.equal(findAll('.rose-nav-link').length, 2); + assert.strictEqual(findAll('.rose-nav-link').length, 2); }); }); diff --git a/addons/rose/tests/integration/components/rose/nav/link-test.js b/addons/rose/tests/integration/components/rose/nav/link-test.js index 2887900bc..98f25312f 100644 --- a/addons/rose/tests/integration/components/rose/nav/link-test.js +++ b/addons/rose/tests/integration/components/rose/nav/link-test.js @@ -13,6 +13,6 @@ module('Integration | Component | rose/nav/link', function (hooks) { Item Name `); - assert.equal(find('.rose-nav-link').textContent.trim(), 'Item Name'); + assert.strictEqual(find('.rose-nav-link').textContent.trim(), 'Item Name'); }); }); diff --git a/addons/rose/tests/integration/components/rose/nav/sidebar-test.js b/addons/rose/tests/integration/components/rose/nav/sidebar-test.js index 293079caa..d4aa21c34 100644 --- a/addons/rose/tests/integration/components/rose/nav/sidebar-test.js +++ b/addons/rose/tests/integration/components/rose/nav/sidebar-test.js @@ -13,8 +13,8 @@ module('Integration | Component | rose/nav/sidebar', function (hooks) { Item Name `); - assert.equal(find('.rose-nav-title').textContent.trim(), 'Title'); - assert.equal(find('.rose-nav-link').textContent.trim(), 'Item Name'); + assert.strictEqual(find('.rose-nav-title').textContent.trim(), 'Title'); + assert.strictEqual(find('.rose-nav-link').textContent.trim(), 'Item Name'); }); test('it associates title with nav via aria-labelledby', async function (assert) { @@ -27,7 +27,7 @@ module('Integration | Component | rose/nav/sidebar', function (hooks) { const el = find('.rose-nav-sidebar'); const id = el.id; const titleId = `title-${id}`; - assert.equal(find('.rose-nav-title').id, titleId); - assert.equal(el.getAttribute('aria-labelledby').trim(), titleId); + assert.strictEqual(find('.rose-nav-title').id, titleId); + assert.strictEqual(el.getAttribute('aria-labelledby').trim(), titleId); }); }); diff --git a/addons/rose/tests/integration/components/rose/nav/tabs-test.js b/addons/rose/tests/integration/components/rose/nav/tabs-test.js index 733f9e997..7499f4903 100644 --- a/addons/rose/tests/integration/components/rose/nav/tabs-test.js +++ b/addons/rose/tests/integration/components/rose/nav/tabs-test.js @@ -14,6 +14,6 @@ module('Integration | Component | rose/nav/tabs', function (hooks) { `); assert.ok(find('.rose-nav-tabs')); - assert.equal(find('.rose-nav-link').textContent.trim(), 'Item Name'); + assert.strictEqual(find('.rose-nav-link').textContent.trim(), 'Item Name'); }); }); diff --git a/addons/rose/tests/integration/components/rose/notification-test.js b/addons/rose/tests/integration/components/rose/notification-test.js index f8c1573b5..a4976b039 100644 --- a/addons/rose/tests/integration/components/rose/notification-test.js +++ b/addons/rose/tests/integration/components/rose/notification-test.js @@ -16,7 +16,7 @@ module('Integration | Component | rose/notification', function (hooks) { `); assert.ok(find('.rose-notification')); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'An error occurred.' ); diff --git a/addons/rose/tests/integration/components/rose/table-test.js b/addons/rose/tests/integration/components/rose/table-test.js index aa78b58eb..ce813f197 100644 --- a/addons/rose/tests/integration/components/rose/table-test.js +++ b/addons/rose/tests/integration/components/rose/table-test.js @@ -20,7 +20,7 @@ module('Integration | Component | rose/table', function (hooks) { test('it renders with caption', async function (assert) { await render(hbs``); assert.ok(find('caption')); - assert.equal(find('caption').textContent.trim(), 'table caption'); + assert.strictEqual(find('caption').textContent.trim(), 'table caption'); }); test('it renders with header', async function (assert) { diff --git a/addons/rose/tests/integration/components/rose/table/row/cell-test.js b/addons/rose/tests/integration/components/rose/table/row/cell-test.js index 4b8c3332d..6b22fb9fa 100644 --- a/addons/rose/tests/integration/components/rose/table/row/cell-test.js +++ b/addons/rose/tests/integration/components/rose/table/row/cell-test.js @@ -12,7 +12,7 @@ module('Integration | Component | rose/table/row/cell', function (hooks) { content `); assert.ok(find('td')); - assert.equal(find('.rose-table-cell').textContent.trim(), 'content'); + assert.strictEqual(find('.rose-table-cell').textContent.trim(), 'content'); }); test('it renders with attributes', async function (assert) { diff --git a/addons/rose/tests/integration/modifiers/on-click-inside-test.js b/addons/rose/tests/integration/modifiers/on-click-inside-test.js index 8197a2258..88502cc73 100644 --- a/addons/rose/tests/integration/modifiers/on-click-inside-test.js +++ b/addons/rose/tests/integration/modifiers/on-click-inside-test.js @@ -10,7 +10,7 @@ module('Integration | Modifier | on-click-inside', function (hooks) { assert.expect(2); this.set('clickedInside', (element) => { assert.ok(element); - assert.equal(element.id, 'inside'); + assert.strictEqual(element.id, 'inside'); }); await render(hbs`
diff --git a/addons/rose/tests/integration/modifiers/on-click-outside-test.js b/addons/rose/tests/integration/modifiers/on-click-outside-test.js index 294134263..5d0b75356 100644 --- a/addons/rose/tests/integration/modifiers/on-click-outside-test.js +++ b/addons/rose/tests/integration/modifiers/on-click-outside-test.js @@ -10,7 +10,7 @@ module('Integration | Modifier | on-click-outside', function (hooks) { assert.expect(2); this.set('clickedOutside', (element, event) => { assert.ok(element); - assert.equal(event.target.id, 'outside'); + assert.strictEqual(event.target.id, 'outside'); }); await render(hbs`
diff --git a/ui/admin/package.json b/ui/admin/package.json index bae74a064..2c701ac3d 100644 --- a/ui/admin/package.json +++ b/ui/admin/package.json @@ -78,11 +78,11 @@ "ember-source": "~3.28.4", "ember-template-lint": "^3.12.0", "ember-template-lint-plugin-prettier": "^2.0.0", - "eslint": "^8.12.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.9", + "eslint": "^8.18.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-ember": "^10.6.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-qunit": "^6.2.0", + "eslint-plugin-qunit": "^7.3.0", "faker": "^5.5.3", "js-bexpr": "hashicorp/js-bexpr#9b4a4b54d85eba67fdfc0990133d1518d890b1e1", "loader.js": "^4.7.0", diff --git a/ui/admin/tests/acceptance/accounts/change-password-test.js b/ui/admin/tests/acceptance/accounts/change-password-test.js index 2e7899a82..d28c9882f 100644 --- a/ui/admin/tests/acceptance/accounts/change-password-test.js +++ b/ui/admin/tests/acceptance/accounts/change-password-test.js @@ -51,7 +51,7 @@ module('Acceptance | accounts | change password', function (hooks) { assert.expect(1); await visit(urls.changePassword); await a11yAudit(); - assert.equal(currentURL(), urls.changePassword); + assert.strictEqual(currentURL(), urls.changePassword); }); test('visiting account change password from header', async function (assert) { @@ -63,7 +63,7 @@ module('Acceptance | accounts | change password', function (hooks) { await click( '.rose-header-utilities .rose-dropdown .rose-dropdown-content a' ); - assert.equal(currentURL(), urls.changePassword); + assert.strictEqual(currentURL(), urls.changePassword); }); test('can change password for account', async function (assert) { @@ -72,12 +72,12 @@ module('Acceptance | accounts | change password', function (hooks) { '/accounts/:idMethod', (_, { params: { idMethod }, requestBody }) => { const attrs = JSON.parse(requestBody); - assert.equal( + assert.strictEqual( attrs.current_password, 'current password', 'current password is provided' ); - assert.equal( + assert.strictEqual( attrs.new_password, 'new password', 'new password is provided' diff --git a/ui/admin/tests/acceptance/accounts/create-test.js b/ui/admin/tests/acceptance/accounts/create-test.js index e019df150..b4dd70160 100644 --- a/ui/admin/tests/acceptance/accounts/create-test.js +++ b/ui/admin/tests/acceptance/accounts/create-test.js @@ -65,7 +65,7 @@ module('Acceptance | accounts | create', function (hooks) { assert.expect(1); await visit(urls.accounts); await a11yAudit(); - assert.equal(currentURL(), urls.accounts); + assert.strictEqual(currentURL(), urls.accounts); }); test('can create a new account', async function (assert) { @@ -77,7 +77,7 @@ module('Acceptance | accounts | create', function (hooks) { await fillIn('[name="login_name"]', 'username'); await fillIn('[name="password"]', 'password'); await click('form [type="submit"]:not(:disabled)'); - assert.equal(this.server.db.accounts.length, accountsCount + 1); + assert.strictEqual(this.server.db.accounts.length, accountsCount + 1); }); test('Users cannot create a new account without proper authorization', async function (assert) { @@ -121,8 +121,8 @@ module('Acceptance | accounts | create', function (hooks) { await visit(urls.newAccount); await fillIn('[name="name"]', 'Account name'); await click('form button:not([type="submit"])'); - assert.equal(this.server.db.accounts.length, accountsCount); - assert.equal(currentURL(), urls.accounts); + assert.strictEqual(this.server.db.accounts.length, accountsCount); + assert.strictEqual(currentURL(), urls.accounts); }); test('saving a new account with invalid fields displays error messages', async function (assert) { @@ -150,12 +150,12 @@ module('Acceptance | accounts | create', function (hooks) { await fillIn('[name="name"]', 'new account'); await click('form [type="submit"]'); await a11yAudit(); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'The request was invalid.', 'Displays primary error message.' ); - assert.equal( + assert.strictEqual( find('.rose-form-error-message').textContent.trim(), 'Name is required.', 'Displays field-level errors.' diff --git a/ui/admin/tests/acceptance/accounts/delete-test.js b/ui/admin/tests/acceptance/accounts/delete-test.js index da71a395a..5c4168e93 100644 --- a/ui/admin/tests/acceptance/accounts/delete-test.js +++ b/ui/admin/tests/acceptance/accounts/delete-test.js @@ -64,7 +64,7 @@ module('Acceptance | accounts | delete', function (hooks) { const accountsCount = this.server.db.accounts.length; await visit(urls.account); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(this.server.db.accounts.length, accountsCount - 1); + assert.strictEqual(this.server.db.accounts.length, accountsCount - 1); }); test('cannot delete an account without proper authorization', async function (assert) { @@ -93,7 +93,7 @@ module('Acceptance | accounts | delete', function (hooks) { await visit(urls.account); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); await a11yAudit(); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'Oops.', 'Displays primary error message.' diff --git a/ui/admin/tests/acceptance/accounts/read-test.js b/ui/admin/tests/acceptance/accounts/read-test.js index b32e5e865..97c047ff2 100644 --- a/ui/admin/tests/acceptance/accounts/read-test.js +++ b/ui/admin/tests/acceptance/accounts/read-test.js @@ -63,7 +63,7 @@ module('Acceptance | accounts | read', function (hooks) { await visit(urls.accounts); await click('main tbody .rose-table-header-cell:nth-child(1) a'); await a11yAudit(); - assert.equal(currentURL(), urls.account); + assert.strictEqual(currentURL(), urls.account); }); test('cannot navigate to an account form without proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/accounts/set-password-test.js b/ui/admin/tests/acceptance/accounts/set-password-test.js index 67939ab83..daded2a75 100644 --- a/ui/admin/tests/acceptance/accounts/set-password-test.js +++ b/ui/admin/tests/acceptance/accounts/set-password-test.js @@ -57,7 +57,7 @@ module('Acceptance | accounts | set password', function (hooks) { assert.expect(1); await visit(urls.setPassword); await a11yAudit(); - assert.equal(currentURL(), urls.setPassword); + assert.strictEqual(currentURL(), urls.setPassword); }); test('can navigate to route with proper authorization', async function (assert) { @@ -86,7 +86,7 @@ module('Acceptance | accounts | set password', function (hooks) { '/accounts/:idMethod', (_, { params: { idMethod }, requestBody }) => { const attrs = JSON.parse(requestBody); - assert.equal(attrs.password, 'update password', 'new password is set'); + assert.strictEqual(attrs.password, 'update password', 'new password is set'); const id = idMethod.split(':')[0]; return { id }; } diff --git a/ui/admin/tests/acceptance/accounts/update-test.js b/ui/admin/tests/acceptance/accounts/update-test.js index 139beeccf..602c957b6 100644 --- a/ui/admin/tests/acceptance/accounts/update-test.js +++ b/ui/admin/tests/acceptance/accounts/update-test.js @@ -65,7 +65,7 @@ module('Acceptance | accounts | update', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'update name'); await click('form [type="submit"]:not(:disabled)'); - assert.equal(this.server.db.accounts[0].name, 'update name'); + assert.strictEqual(this.server.db.accounts[0].name, 'update name'); }); test('cannot update resource without proper authorization', async function (assert) { @@ -103,7 +103,7 @@ module('Acceptance | accounts | update', function (hooks) { await fillIn('[name="name"]', 'save account'); await click('form [type="submit"]'); await a11yAudit(); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'Oops.', 'Displays primary error message.' @@ -136,12 +136,12 @@ module('Acceptance | accounts | update', function (hooks) { await fillIn('[name="name"]', 'existing account'); await click('form [type="submit"]'); await a11yAudit(); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'The request was invalid.', 'Displays primary error message.' ); - assert.equal( + assert.strictEqual( find('.rose-form-error-message').textContent.trim(), 'Name is required.', 'Displays field-level errors.' diff --git a/ui/admin/tests/acceptance/auth-methods/create-test.js b/ui/admin/tests/acceptance/auth-methods/create-test.js index 62ee0638e..9e6eec879 100644 --- a/ui/admin/tests/acceptance/auth-methods/create-test.js +++ b/ui/admin/tests/acceptance/auth-methods/create-test.js @@ -66,7 +66,7 @@ module('Acceptance | auth-methods | create ', function (hooks) { await fillIn('[name="name"]', 'AuthMethod name'); await fillIn('[name="description"]', 'description'); await click('form [type="submit"]:not(:disabled)'); - assert.equal(this.server.db.authMethods.length, authMethodsCount + 1); + assert.strictEqual(this.server.db.authMethods.length, authMethodsCount + 1); }); test('Users can navigate to new auth-methods route with proper authorization', async function (assert) { @@ -103,8 +103,8 @@ module('Acceptance | auth-methods | create ', function (hooks) { await fillIn('[name="name"]', 'AuthMethod name'); await fillIn('[name="description"]', 'description'); await click('form button:not([type="submit"])'); - assert.equal(this.server.db.authMethods.length, authMethodsCount); - assert.equal(currentURL(), urls.authMethods); + assert.strictEqual(this.server.db.authMethods.length, authMethodsCount); + assert.strictEqual(currentURL(), urls.authMethods); }); test('user can make primary an auth method', async function (assert) { @@ -119,7 +119,7 @@ module('Acceptance | auth-methods | create ', function (hooks) { '.rose-layout-page-actions .rose-dropdown-content [type="button"]:first-child' ); const scope = this.server.schema.scopes.find(instances.orgScope.id); - assert.equal( + assert.strictEqual( scope.primaryAuthMethodId, instances.authMethod.id, 'Primary auth method is set.' @@ -209,7 +209,7 @@ module('Acceptance | auth-methods | create ', function (hooks) { '.rose-table-body .rose-table-row:first-child .rose-dropdown-content [type="button"]:first-child' ); let scope = this.server.schema.scopes.find(instances.orgScope.id); - assert.equal( + assert.strictEqual( scope.primaryAuthMethodId, instances.authMethod.id, 'Primary auth method is set.' diff --git a/ui/admin/tests/acceptance/auth-methods/delete-test.js b/ui/admin/tests/acceptance/auth-methods/delete-test.js index d2f32c18e..960f4538e 100644 --- a/ui/admin/tests/acceptance/auth-methods/delete-test.js +++ b/ui/admin/tests/acceptance/auth-methods/delete-test.js @@ -53,7 +53,7 @@ module('Acceptance | auth methods | delete', function (hooks) { const authMethodsCount = this.server.db.authMethods.length; await visit(urls.authMethod); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(this.server.db.authMethods.length, authMethodsCount - 1); + assert.strictEqual(this.server.db.authMethods.length, authMethodsCount - 1); }); test('errors are displayed when delete on an auth method fails', async function (assert) { @@ -72,7 +72,7 @@ module('Acceptance | auth methods | delete', function (hooks) { await visit(urls.authMethod); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); await a11yAudit(); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'Oops.', 'Displays primary error message.' diff --git a/ui/admin/tests/acceptance/auth-methods/oidc-test.js b/ui/admin/tests/acceptance/auth-methods/oidc-test.js index a9a784cb8..62198c160 100644 --- a/ui/admin/tests/acceptance/auth-methods/oidc-test.js +++ b/ui/admin/tests/acceptance/auth-methods/oidc-test.js @@ -56,14 +56,14 @@ module('Acceptance | auth methods | oidc', function (hooks) { assert.expect(1); await visit(urls.authMethod); await a11yAudit(); - assert.equal(currentURL(), urls.authMethod); + assert.strictEqual(currentURL(), urls.authMethod); }); test('can view oidc state', async function (assert) { assert.expect(1); await visit(urls.authMethod); await click('.rose-layout-page-actions .rose-dropdown-trigger'); - assert.equal( + assert.strictEqual( find('.rose-dropdown[open] input:checked').value, instances.authMethod.attributes.state ); @@ -76,7 +76,7 @@ module('Acceptance | auth methods | oidc', function (hooks) { await click('.rose-layout-page-actions .rose-dropdown-trigger'); await click(`.rose-dropdown[open] input[value="${updateValue}"]`); const authMethod = this.server.db.authMethods.find(instances.authMethod.id); - assert.equal(authMethod.attributes.state, updateValue); + assert.strictEqual(authMethod.attributes.state, updateValue); }); test('can update oidc state to active-private', async function (assert) { @@ -86,7 +86,7 @@ module('Acceptance | auth methods | oidc', function (hooks) { await click('.rose-layout-page-actions .rose-dropdown-trigger'); await click(`.rose-dropdown[open] input[value="${updateValue}"]`); const authMethod = this.server.db.authMethods.find(instances.authMethod.id); - assert.equal(authMethod.attributes.state, updateValue); + assert.strictEqual(authMethod.attributes.state, updateValue); }); test('can update oidc state to active-public', async function (assert) { @@ -98,7 +98,7 @@ module('Acceptance | auth methods | oidc', function (hooks) { await click('.rose-layout-page-actions .rose-dropdown-trigger'); await click(`.rose-dropdown[open] input[value="${updateValue}"]`); const authMethod = this.server.db.authMethods.find(instances.authMethod.id); - assert.equal(authMethod.attributes.state, updateValue); + assert.strictEqual(authMethod.attributes.state, updateValue); }); // FIXME: How to mock just one request routed to /auth-methods and let everything else passthrough? diff --git a/ui/admin/tests/acceptance/auth-methods/read-test.js b/ui/admin/tests/acceptance/auth-methods/read-test.js index 93da8e83a..5a7e38a84 100644 --- a/ui/admin/tests/acceptance/auth-methods/read-test.js +++ b/ui/admin/tests/acceptance/auth-methods/read-test.js @@ -51,7 +51,7 @@ module('Acceptance | auth methods | read', function (hooks) { assert.expect(1); await visit(urls.authMethods); await a11yAudit(); - assert.equal(currentURL(), urls.authMethods); + assert.strictEqual(currentURL(), urls.authMethods); }); test('can navigate to an auth method form', async function (assert) { @@ -59,7 +59,7 @@ module('Acceptance | auth methods | read', function (hooks) { await visit(urls.authMethods); await click('main tbody .rose-table-header-cell:nth-child(1) a'); await a11yAudit(); - assert.equal(currentURL(), urls.authMethod); + assert.strictEqual(currentURL(), urls.authMethod); }); test('cannot navigate to an auth method form without proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/auth-methods/update-test.js b/ui/admin/tests/acceptance/auth-methods/update-test.js index 859b0ae57..4c32cfce3 100644 --- a/ui/admin/tests/acceptance/auth-methods/update-test.js +++ b/ui/admin/tests/acceptance/auth-methods/update-test.js @@ -54,7 +54,7 @@ module('Acceptance | auth methods | update', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'update name'); await click('form [type="submit"]:not(:disabled)'); - assert.equal(this.server.db.authMethods[0].name, 'update name'); + assert.strictEqual(this.server.db.authMethods[0].name, 'update name'); }); test('can update an auth method and cancel changes', async function (assert) { @@ -102,12 +102,12 @@ module('Acceptance | auth methods | update', function (hooks) { await fillIn('[name="name"]', 'existing auth method'); await click('form [type="submit"]'); await a11yAudit(); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'The request was invalid.', 'Displays primary error message.' ); - assert.equal( + assert.strictEqual( find('.rose-form-error-message').textContent.trim(), 'Name is required.', 'Displays field-level errors.' diff --git a/ui/admin/tests/acceptance/authentication-test.js b/ui/admin/tests/acceptance/authentication-test.js index b4ed094ea..9e8b28872 100644 --- a/ui/admin/tests/acceptance/authentication-test.js +++ b/ui/admin/tests/acceptance/authentication-test.js @@ -110,7 +110,7 @@ module('Acceptance | authentication', function (hooks) { assert.expect(1); await visit(authenticateURL); await a11yAudit(); - assert.equal(currentURL(), authMethodAuthenticateURL); + assert.strictEqual(currentURL(), authMethodAuthenticateURL); }); test('visiting auth methods authenticate route when there no methods shows a message', async function (assert) { @@ -119,7 +119,7 @@ module('Acceptance | authentication', function (hooks) { authMethodOIDC.destroy(); await visit(authenticateURL); await a11yAudit(); - assert.equal(currentURL(), authenticateURL); + assert.strictEqual(currentURL(), authenticateURL); assert.ok(find('.rose-message')); }); @@ -130,99 +130,99 @@ module('Acceptance | authentication', function (hooks) { }); await visit(authMethodAuthenticateURL); await a11yAudit(); - assert.equal(currentURL(), authMethodAuthenticateURL); + assert.strictEqual(currentURL(), authMethodAuthenticateURL); }); test('visiting any authentication parent route while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(3); await visit(indexURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); await visit(scopesURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); test('visiting change password while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(2); await visit(changePasswordURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); test('visiting orgs while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(2); await visit(orgsURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); test('visiting org edit while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(2); await visit(orgEditURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); test('visiting projects while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(2); await visit(projectsURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); test('visiting new project while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(2); await visit(newProjectURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); test('visiting users while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(2); await visit(usersURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); test('visiting roles while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(2); await visit(rolesURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); test('visiting groups while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(2); await visit(groupsURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); test('visiting host catalogs while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(2); await visit(hostCatalogsURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); test('visiting targets while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(2); await visit(targetsURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); test('visiting sessions while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(2); await visit(sessionsURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); test('visiting auth methods while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(2); await visit(authMethodsURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); @@ -230,22 +230,22 @@ module('Acceptance | authentication', function (hooks) { assert.expect(1); await visit(authMethodAuthenticateURL); await a11yAudit(); - assert.equal(currentURL(), authMethodAuthenticateURL); + assert.strictEqual(currentURL(), authMethodAuthenticateURL); }); test('visiting any authentication parent route while already authenticated with an org redirects to projects', async function (assert) { assert.expect(6); authenticateSession({ scope }); await visit(indexURL); - assert.equal(currentURL(), projectsURL); + assert.strictEqual(currentURL(), projectsURL); await visit(scopesURL); - assert.equal(currentURL(), projectsURL); + assert.strictEqual(currentURL(), projectsURL); await visit(orgScopeURL); - assert.equal(currentURL(), projectsURL); + assert.strictEqual(currentURL(), projectsURL); await visit(authenticateURL); - assert.equal(currentURL(), projectsURL); + assert.strictEqual(currentURL(), projectsURL); await visit(authMethodAuthenticateURL); - assert.equal(currentURL(), projectsURL); + assert.strictEqual(currentURL(), projectsURL); assert.ok(currentSession().isAuthenticated); }); @@ -255,11 +255,11 @@ module('Acceptance | authentication', function (hooks) { scope: { id: globalScope.id, type: globalScope.type }, }); await visit(indexURL); - assert.equal(currentURL(), orgsURL); + assert.strictEqual(currentURL(), orgsURL); await visit(scopesURL); - assert.equal(currentURL(), orgsURL); + assert.strictEqual(currentURL(), orgsURL); await visit(globalAuthenticateURL); - assert.equal(currentURL(), orgsURL); + assert.strictEqual(currentURL(), orgsURL); assert.ok(currentSession().isAuthenticated); }); @@ -277,11 +277,11 @@ module('Acceptance | authentication', function (hooks) { assert.expect(4); await visit(authMethodGlobalAuthenticateURL); assert.notOk(currentSession().isAuthenticated); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.strictEqual(currentURL(), authMethodGlobalAuthenticateURL); await fillIn('[name="identification"]', 'test'); await fillIn('[name="password"]', 'test'); await click('[type="submit"]'); - assert.equal(currentURL(), orgsURL); + assert.strictEqual(currentURL(), orgsURL); assert.ok(currentSession().isAuthenticated); }); @@ -289,11 +289,11 @@ module('Acceptance | authentication', function (hooks) { assert.expect(4); await visit(authMethodAuthenticateURL); assert.notOk(currentSession().isAuthenticated); - assert.equal(currentURL(), authMethodAuthenticateURL); + assert.strictEqual(currentURL(), authMethodAuthenticateURL); await fillIn('[name="identification"]', 'test'); await fillIn('[name="password"]', 'test'); await click('[type="submit"]'); - assert.equal(currentURL(), projectsURL); + assert.strictEqual(currentURL(), projectsURL); assert.ok(currentSession().isAuthenticated); }); @@ -348,12 +348,12 @@ module('Acceptance | authentication', function (hooks) { assert.notOk(getRootElement().classList.contains('rose-theme-dark')); // toggle light mode await click('[name="theme"][value="light"]'); - assert.equal(currentSession().get('data.theme'), 'light'); + assert.strictEqual(currentSession().get('data.theme'), 'light'); assert.ok(getRootElement().classList.contains('rose-theme-light')); assert.notOk(getRootElement().classList.contains('rose-theme-dark')); // toggle dark mode await click('[name="theme"][value="dark"]'); - assert.equal(currentSession().get('data.theme'), 'dark'); + assert.strictEqual(currentSession().get('data.theme'), 'dark'); assert.notOk(getRootElement().classList.contains('rose-theme-light')); assert.ok(getRootElement().classList.contains('rose-theme-dark')); // toggle system default diff --git a/ui/admin/tests/acceptance/credential-library/create-test.js b/ui/admin/tests/acceptance/credential-library/create-test.js index d19c0b2b1..2ca075dae 100644 --- a/ui/admin/tests/acceptance/credential-library/create-test.js +++ b/ui/admin/tests/acceptance/credential-library/create-test.js @@ -68,10 +68,10 @@ module('Acceptance | credential-libraries | create', function (hooks) { assert.expect(2); await visit(urls.credentialLibraries); await a11yAudit(); - assert.equal(currentURL(), urls.credentialLibraries); + assert.strictEqual(currentURL(), urls.credentialLibraries); await visit(urls.credentialLibrary); await a11yAudit(); - assert.equal(currentURL(), urls.credentialLibrary); + assert.strictEqual(currentURL(), urls.credentialLibrary); }); test('can create a credential library', async function (assert) { @@ -80,7 +80,7 @@ module('Acceptance | credential-libraries | create', function (hooks) { await visit(urls.newCredentialLibrary); await fillIn('[name="name"]', 'random string'); await click('[type="submit"]'); - assert.equal(getCredentialLibraryCount(), count + 1); + assert.strictEqual(getCredentialLibraryCount(), count + 1); }); test('Users cannot navigate to new credential library route without proper authorization', async function (assert) { @@ -103,8 +103,8 @@ module('Acceptance | credential-libraries | create', function (hooks) { await visit(urls.newCredentialLibrary); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), urls.credentialLibraries); - assert.equal(getCredentialLibraryCount(), count); + assert.strictEqual(currentURL(), urls.credentialLibraries); + assert.strictEqual(getCredentialLibraryCount(), count); }); test('saving a new credential library with invalid fields displays error messasges', async function (assert) { diff --git a/ui/admin/tests/acceptance/credential-library/delete-test.js b/ui/admin/tests/acceptance/credential-library/delete-test.js index e539d00e9..705df87d0 100644 --- a/ui/admin/tests/acceptance/credential-library/delete-test.js +++ b/ui/admin/tests/acceptance/credential-library/delete-test.js @@ -72,7 +72,7 @@ module('Acceptance | credential-libraries | delete', function (hooks) { const count = getCredentialLibraryCount(); await visit(urls.credentialLibrary); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getCredentialLibraryCount(), count - 1); + assert.strictEqual(getCredentialLibraryCount(), count - 1); }); test('cannot delete resource without proper authorization', async function (assert) { @@ -95,7 +95,7 @@ module('Acceptance | credential-libraries | delete', function (hooks) { const count = getCredentialLibraryCount(); await visit(urls.credentialLibrary); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getCredentialLibraryCount(), count - 1); + assert.strictEqual(getCredentialLibraryCount(), count - 1); assert.ok(confirmService.confirm.calledOnce); }); @@ -107,7 +107,7 @@ module('Acceptance | credential-libraries | delete', function (hooks) { const count = getCredentialLibraryCount(); await visit(urls.credentialLibrary); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getCredentialLibraryCount(), count); + assert.strictEqual(getCredentialLibraryCount(), count); assert.ok(confirmService.confirm.calledOnce); }); diff --git a/ui/admin/tests/acceptance/credential-library/read-test.js b/ui/admin/tests/acceptance/credential-library/read-test.js index 91886f93e..6900dc023 100644 --- a/ui/admin/tests/acceptance/credential-library/read-test.js +++ b/ui/admin/tests/acceptance/credential-library/read-test.js @@ -65,7 +65,7 @@ module('Acceptance | credential-libraries | read', function (hooks) { await visit(urls.credentialLibraries); await click('main tbody .rose-table-header-cell a'); await a11yAudit(); - assert.equal(currentURL(), urls.credentialLibrary); + assert.strictEqual(currentURL(), urls.credentialLibrary); }); test('cannot navigate to resource without proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/credential-library/update-test.js b/ui/admin/tests/acceptance/credential-library/update-test.js index 7958ccc6f..b1abad358 100644 --- a/ui/admin/tests/acceptance/credential-library/update-test.js +++ b/ui/admin/tests/acceptance/credential-library/update-test.js @@ -67,8 +67,8 @@ module('Acceptance | credential-libraries | update', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="submit"]'); - assert.equal(currentURL(), urls.credentialLibrary); - assert.equal( + assert.strictEqual(currentURL(), urls.credentialLibrary); + assert.strictEqual( this.server.schema.credentialLibraries.all().models[0].name, 'random string' ); @@ -94,7 +94,7 @@ module('Acceptance | credential-libraries | update', function (hooks) { this.server.schema.credentialLibraries.all().models[0].name, 'random string' ); - assert.equal(find('[name="name"]').value, instances.credentialLibrary.name); + assert.strictEqual(find('[name="name"]').value, instances.credentialLibrary.name); }); test('saving an existing credential library with invalid fields displays error messages', async function (assert) { @@ -141,14 +141,14 @@ module('Acceptance | credential-libraries | update', function (hooks) { await visit(urls.credentialLibrary); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), urls.credentialLibrary); + assert.strictEqual(currentURL(), urls.credentialLibrary); try { await visit(urls.credentialLibraries); } catch (e) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:first-child', 'Click Discard'); - assert.equal(currentURL(), urls.credentialLibraries); + assert.strictEqual(currentURL(), urls.credentialLibraries); assert.notEqual( this.server.schema.credentialLibraries.all().models[0].name, 'random string' @@ -164,14 +164,14 @@ module('Acceptance | credential-libraries | update', function (hooks) { await visit(urls.credentialLibrary); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), urls.credentialLibrary); + assert.strictEqual(currentURL(), urls.credentialLibrary); try { await visit(urls.credentialLibraries); } catch (e) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:last-child'); - assert.equal(currentURL(), urls.credentialLibrary); + assert.strictEqual(currentURL(), urls.credentialLibrary); assert.notEqual( this.server.schema.credentialLibraries.all().models[0].name, 'random string' diff --git a/ui/admin/tests/acceptance/credential-store/create-test.js b/ui/admin/tests/acceptance/credential-store/create-test.js index 647baacd2..95d8880be 100644 --- a/ui/admin/tests/acceptance/credential-store/create-test.js +++ b/ui/admin/tests/acceptance/credential-store/create-test.js @@ -60,7 +60,7 @@ module('Acceptance | credential-stores | create', function (hooks) { await visit(urls.newCredentialStore); await fillIn('[name="name"]', 'random string'); await click('[type="submit"]'); - assert.equal(getCredentialStoresCount(), count + 1); + assert.strictEqual(getCredentialStoresCount(), count + 1); }); test('Users can cancel create new credential stores', async function (assert) { @@ -69,8 +69,8 @@ module('Acceptance | credential-stores | create', function (hooks) { await visit(urls.newCredentialStore); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), urls.credentialStores); - assert.equal(getCredentialStoresCount(), count); + assert.strictEqual(currentURL(), urls.credentialStores); + assert.strictEqual(getCredentialStoresCount(), count); }); test('Users cannot navigate to new credential stores route without proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/credential-store/delete-test.js b/ui/admin/tests/acceptance/credential-store/delete-test.js index 67f689357..eb61ad62f 100644 --- a/ui/admin/tests/acceptance/credential-store/delete-test.js +++ b/ui/admin/tests/acceptance/credential-store/delete-test.js @@ -65,7 +65,7 @@ module('Acceptance | credential-stores | delete', function (hooks) { const count = getCredentialStoresCount(); await visit(urls.credentialStore); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getCredentialStoresCount(), count - 1); + assert.strictEqual(getCredentialStoresCount(), count - 1); }); test('cannot delete a credential store without proper authorization', async function (assert) { @@ -88,7 +88,7 @@ module('Acceptance | credential-stores | delete', function (hooks) { const count = getCredentialStoresCount(); await visit(urls.credentialStore); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getCredentialStoresCount(), count - 1); + assert.strictEqual(getCredentialStoresCount(), count - 1); assert.ok(confirmService.confirm.calledOnce); }); @@ -100,7 +100,7 @@ module('Acceptance | credential-stores | delete', function (hooks) { const count = getCredentialStoresCount(); await visit(urls.credentialStore); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getCredentialStoresCount(), count); + assert.strictEqual(getCredentialStoresCount(), count); assert.ok(confirmService.confirm.calledOnce); }); diff --git a/ui/admin/tests/acceptance/credential-store/read-test.js b/ui/admin/tests/acceptance/credential-store/read-test.js index dd204b41d..278d3b9aa 100644 --- a/ui/admin/tests/acceptance/credential-store/read-test.js +++ b/ui/admin/tests/acceptance/credential-store/read-test.js @@ -56,10 +56,10 @@ module('Acceptance | credential-stores | read', function (hooks) { assert.expect(2); await visit(urls.credentialStores); await a11yAudit(); - assert.equal(currentURL(), urls.credentialStores); + assert.strictEqual(currentURL(), urls.credentialStores); await visit(urls.credentialStore); await a11yAudit(); - assert.equal(currentURL(), urls.credentialStore); + assert.strictEqual(currentURL(), urls.credentialStore); }); test('cannot navigate to a credential store form without proper authorization', async function (assert) { @@ -76,7 +76,7 @@ module('Acceptance | credential-stores | read', function (hooks) { assert.expect(1); await visit(urls.unknownCredentialStore); await a11yAudit(); - assert.equal( + assert.strictEqual( find('.rose-message-subtitle').textContent.trim(), 'Error 404' ); diff --git a/ui/admin/tests/acceptance/credential-store/update-test.js b/ui/admin/tests/acceptance/credential-store/update-test.js index 25f694cdb..ff5c00b90 100644 --- a/ui/admin/tests/acceptance/credential-store/update-test.js +++ b/ui/admin/tests/acceptance/credential-store/update-test.js @@ -59,8 +59,8 @@ module('Acceptance | credential-stores | update', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="submit"]'); - assert.equal(currentURL(), urls.credentialStore); - assert.equal( + assert.strictEqual(currentURL(), urls.credentialStore); + assert.strictEqual( this.server.schema.credentialStores.all().models[0].name, 'random string' ); @@ -83,7 +83,7 @@ module('Acceptance | credential-stores | update', function (hooks) { await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); assert.notEqual(instances.credentialStore.name, 'random string'); - assert.equal(find('[name="name"]').value, instances.credentialStore.name); + assert.strictEqual(find('[name="name"]').value, instances.credentialStore.name); }); test('saving an existing credential store with invalid fields displays error messages', async function (assert) { @@ -130,14 +130,14 @@ module('Acceptance | credential-stores | update', function (hooks) { await visit(urls.credentialStore); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), urls.credentialStore); + assert.strictEqual(currentURL(), urls.credentialStore); try { await visit(urls.credentialStores); } catch (e) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:first-child', 'Click Discard'); - assert.equal(currentURL(), urls.credentialStores); + assert.strictEqual(currentURL(), urls.credentialStores); assert.notEqual( this.server.schema.credentialStores.all().models[0].name, 'random string' @@ -153,14 +153,14 @@ module('Acceptance | credential-stores | update', function (hooks) { await visit(urls.credentialStore); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), urls.credentialStore); + assert.strictEqual(currentURL(), urls.credentialStore); try { await visit(urls.credentialStores); } catch (e) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:last-child'); - assert.equal(currentURL(), urls.credentialStore); + assert.strictEqual(currentURL(), urls.credentialStore); assert.notEqual( this.server.schema.credentialStores.all().models[0].name, 'random string' diff --git a/ui/admin/tests/acceptance/groups/create-test.js b/ui/admin/tests/acceptance/groups/create-test.js index 740760d45..a2325db8f 100644 --- a/ui/admin/tests/acceptance/groups/create-test.js +++ b/ui/admin/tests/acceptance/groups/create-test.js @@ -52,7 +52,7 @@ module('Acceptance | groups | create', function (hooks) { await visit(urls.newGroup); await fillIn('[name="name"]', 'group name'); await click('[type="submit"]'); - assert.equal(this.server.db.groups.length, groupsCount + 1); + assert.strictEqual(this.server.db.groups.length, groupsCount + 1); }); test('can navigate to new groups route with proper authorization', async function (assert) { @@ -79,8 +79,8 @@ module('Acceptance | groups | create', function (hooks) { await visit(urls.newGroup); await fillIn('[name="name"]', 'group name'); await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), urls.groups); - assert.equal(this.server.db.groups.length, groupsCount); + assert.strictEqual(currentURL(), urls.groups); + assert.strictEqual(this.server.db.groups.length, groupsCount); }); test('saving a new group with invalid fields displays error messages', async function (assert) { @@ -107,12 +107,12 @@ module('Acceptance | groups | create', function (hooks) { await visit(urls.newGroup); await fillIn('[name="name"]', 'group name'); await click('[type="submit"]'); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'The request was invalid.', 'Displays primary error message.' ); - assert.equal( + assert.strictEqual( find('.rose-form-error-message').textContent.trim(), 'Name is required.', 'Displays field-level errors.' diff --git a/ui/admin/tests/acceptance/groups/delete-test.js b/ui/admin/tests/acceptance/groups/delete-test.js index 58f7498b1..e744d61c2 100644 --- a/ui/admin/tests/acceptance/groups/delete-test.js +++ b/ui/admin/tests/acceptance/groups/delete-test.js @@ -48,7 +48,7 @@ module('Acceptance | groups | delete', function (hooks) { 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); + assert.strictEqual(this.server.db.groups.length, groupsCount - 1); }); test('cannot delete a group without proper authorization', async function (assert) { @@ -76,7 +76,7 @@ module('Acceptance | groups | delete', function (hooks) { }); await visit(urls.group); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'Oops.', 'Displays primary error message.' diff --git a/ui/admin/tests/acceptance/groups/members-test.js b/ui/admin/tests/acceptance/groups/members-test.js index 295db8404..57635736a 100644 --- a/ui/admin/tests/acceptance/groups/members-test.js +++ b/ui/admin/tests/acceptance/groups/members-test.js @@ -56,16 +56,16 @@ module('Acceptance | groups | members', function (hooks) { assert.expect(2); await visit(urls.members); await a11yAudit(); - assert.equal(currentURL(), urls.members); - assert.equal(findAll('tbody tr').length, membersCount); + assert.strictEqual(currentURL(), urls.members); + assert.strictEqual(findAll('tbody tr').length, membersCount); }); test('can remove a member', async function (assert) { assert.expect(2); await visit(urls.members); - assert.equal(findAll('tbody tr').length, membersCount); + assert.strictEqual(findAll('tbody tr').length, membersCount); await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, membersCount - 1); + assert.strictEqual(findAll('tbody tr').length, membersCount - 1); }); test('cannot remove a member without proper authorization', async function (assert) { @@ -93,7 +93,7 @@ module('Acceptance | groups | members', function (hooks) { ); }); await visit(urls.members); - assert.equal(findAll('tbody tr').length, membersCount); + assert.strictEqual(findAll('tbody tr').length, membersCount); await click('tbody tr .rose-dropdown-button-danger'); assert.ok(find('[role="alert"]')); }); @@ -102,7 +102,7 @@ module('Acceptance | groups | members', function (hooks) { assert.expect(1); await visit(urls.addMembers); await a11yAudit(); - assert.equal(currentURL(), urls.addMembers); + assert.strictEqual(currentURL(), urls.addMembers); }); test('can navigate to add members with proper authorization', async function (assert) { @@ -125,30 +125,30 @@ module('Acceptance | groups | members', function (hooks) { assert.expect(3); instances.group.update({ memberIds: [] }); await visit(urls.members); - assert.equal(findAll('tbody tr').length, 0); + assert.strictEqual(findAll('tbody tr').length, 0); await click('.rose-layout-page-actions a'); - assert.equal(currentURL(), urls.addMembers); + assert.strictEqual(currentURL(), urls.addMembers); // Click three times to select, unselect, then reselect (for coverage) await click('tbody label'); await click('tbody label'); await click('tbody label'); await click('form [type="submit"]'); await visit(urls.members); - assert.equal(findAll('tbody tr').length, 1); + assert.strictEqual(findAll('tbody tr').length, 1); }); test('select and cancel members to add', async function (assert) { assert.expect(4); await visit(urls.members); - assert.equal(findAll('tbody tr').length, membersCount); + assert.strictEqual(findAll('tbody tr').length, membersCount); await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, membersCount - 1); + assert.strictEqual(findAll('tbody tr').length, membersCount - 1); await click('.rose-layout-page-actions a'); - assert.equal(currentURL(), urls.addMembers); + assert.strictEqual(currentURL(), urls.addMembers); await click('tbody label'); await click('form [type="button"]'); await visit(urls.members); - assert.equal(findAll('tbody tr').length, membersCount - 1); + assert.strictEqual(findAll('tbody tr').length, membersCount - 1); }); test('shows error message on member add', async function (assert) { diff --git a/ui/admin/tests/acceptance/groups/read-test.js b/ui/admin/tests/acceptance/groups/read-test.js index 535ea1175..ebfc047c8 100644 --- a/ui/admin/tests/acceptance/groups/read-test.js +++ b/ui/admin/tests/acceptance/groups/read-test.js @@ -47,7 +47,7 @@ module('Acceptance | groups | read', function (hooks) { assert.expect(1); await visit(urls.newGroup); await a11yAudit(); - assert.equal(currentURL(), urls.newGroup); + assert.strictEqual(currentURL(), urls.newGroup); }); test('cannot navigate to a group form without proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/groups/update-test.js b/ui/admin/tests/acceptance/groups/update-test.js index 696a88e48..d9b9ce8cd 100644 --- a/ui/admin/tests/acceptance/groups/update-test.js +++ b/ui/admin/tests/acceptance/groups/update-test.js @@ -49,8 +49,8 @@ module('Acceptance | groups | update', function (hooks) { 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'); + assert.strictEqual(currentURL(), urls.group); + assert.strictEqual(this.server.db.groups[0].name, 'Updated admin group'); }); test('cannot make changes to an existing group without proper authorization', async function (assert) { @@ -95,12 +95,12 @@ module('Acceptance | groups | update', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); await click('[type="submit"]'); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'The request was invalid.', 'Displays primary error message.' ); - assert.equal( + assert.strictEqual( find('.rose-form-error-message').textContent.trim(), 'Name is required.', 'Displays field-level errors.' diff --git a/ui/admin/tests/acceptance/host-catalogs/create-test.js b/ui/admin/tests/acceptance/host-catalogs/create-test.js index 19fc1dd3d..e189f5488 100644 --- a/ui/admin/tests/acceptance/host-catalogs/create-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/create-test.js @@ -83,7 +83,7 @@ module('Acceptance | host-catalogs | create', function (hooks) { await fillIn('[name="description"]', 'random string'); await fillIn('[name="types"]', 'static'); await click('[type="submit"]'); - assert.equal(gethostCatalogCount(), count + 1); + assert.strictEqual(gethostCatalogCount(), count + 1); }); test('Users can create new dynamic host catalogs', async function (assert) { @@ -94,7 +94,7 @@ module('Acceptance | host-catalogs | create', function (hooks) { await fillIn('[name="description"]', 'random string'); await fillIn('[name="types"]', 'aws'); await click('[type="submit"]'); - assert.equal(gethostCatalogCount(), count + 1); + assert.strictEqual(gethostCatalogCount(), count + 1); }); test('Users can cancel creation of new static host catalogs', async function (assert) { @@ -103,8 +103,8 @@ module('Acceptance | host-catalogs | create', function (hooks) { await visit(urls.newStaticHostCatalog); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), urls.hostCatalogs); - assert.equal(gethostCatalogCount(), count); + assert.strictEqual(currentURL(), urls.hostCatalogs); + assert.strictEqual(gethostCatalogCount(), count); }); test('Users can cancel creation of new dynamic host catalogs', async function (assert) { @@ -113,8 +113,8 @@ module('Acceptance | host-catalogs | create', function (hooks) { await visit(urls.newDynamicHostCatalog); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), urls.hostCatalogs); - assert.equal(gethostCatalogCount(), count); + assert.strictEqual(currentURL(), urls.hostCatalogs); + assert.strictEqual(gethostCatalogCount(), count); }); test('Users can navigate to new static host catalogs route with proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/host-catalogs/delete-test.js b/ui/admin/tests/acceptance/host-catalogs/delete-test.js index 997a559aa..84d613cdc 100644 --- a/ui/admin/tests/acceptance/host-catalogs/delete-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/delete-test.js @@ -67,7 +67,7 @@ module('Acceptance | host-catalogs | delete', function (hooks) { const count = gethostCatalogCount(); await visit(urls.hostCatalog); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(gethostCatalogCount(), count - 1); + assert.strictEqual(gethostCatalogCount(), count - 1); }); test('cannot delete host catalog without proper authorization', async function (assert) { @@ -90,7 +90,7 @@ module('Acceptance | host-catalogs | delete', function (hooks) { const count = gethostCatalogCount(); await visit(urls.hostCatalog); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(gethostCatalogCount(), count - 1); + assert.strictEqual(gethostCatalogCount(), count - 1); assert.ok(confirmService.confirm.calledOnce); }); @@ -102,7 +102,7 @@ module('Acceptance | host-catalogs | delete', function (hooks) { const count = gethostCatalogCount(); await visit(urls.hostCatalog); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(gethostCatalogCount(), count); + assert.strictEqual(gethostCatalogCount(), count); assert.ok(confirmService.confirm.calledOnce); }); diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/create-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/create-test.js index 0c37a98ab..4204509d3 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/create-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/create-test.js @@ -76,7 +76,7 @@ module('Acceptance | host-catalogs | host sets | create', function (hooks) { await visit(urls.newHostSet); await fillIn('[name="name"]', 'random string'); await click('[type="submit"]'); - assert.equal(getHostSetCount(), count + 1); + assert.strictEqual(getHostSetCount(), count + 1); }); test('Users cannot create a new host set without proper authorization', async function (assert) { @@ -109,8 +109,8 @@ module('Acceptance | host-catalogs | host sets | create', function (hooks) { await visit(urls.newHostSet); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), urls.hostSets); - assert.equal(getHostSetCount(), count); + assert.strictEqual(currentURL(), urls.hostSets); + assert.strictEqual(getHostSetCount(), count); }); test('saving a new host set with invalid fields displays error messages', async function (assert) { diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/delete-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/delete-test.js index ed60de6f2..b4d4e592b 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/delete-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/delete-test.js @@ -77,7 +77,7 @@ module('Acceptance | host-catalogs | host sets | delete', function (hooks) { const count = getHostSetCount(); await visit(urls.hostSet); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getHostSetCount(), count - 1); + assert.strictEqual(getHostSetCount(), count - 1); }); test('can accept delete host set via dialog', async function (assert) { @@ -88,7 +88,7 @@ module('Acceptance | host-catalogs | host sets | delete', function (hooks) { const count = getHostSetCount(); await visit(urls.hostSet); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getHostSetCount(), count - 1); + assert.strictEqual(getHostSetCount(), count - 1); assert.ok(confirmService.confirm.calledOnce); }); @@ -110,7 +110,7 @@ module('Acceptance | host-catalogs | host sets | delete', function (hooks) { const count = getHostSetCount(); await visit(urls.hostSet); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getHostSetCount(), count); + assert.strictEqual(getHostSetCount(), count); assert.ok(confirmService.confirm.calledOnce); }); diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js index 2423c62ca..887f93721 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js @@ -86,17 +86,17 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { assert.expect(2); await visit(urls.hostSetHosts); await a11yAudit(); - assert.equal(currentURL(), urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, getHostSetHostCount()); + assert.strictEqual(currentURL(), urls.hostSetHosts); + assert.strictEqual(findAll('tbody tr').length, getHostSetHostCount()); }); test('can remove a host', async function (assert) { assert.expect(2); const count = getHostSetHostCount(); await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, count); + assert.strictEqual(findAll('tbody tr').length, count); await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, count - 1); + assert.strictEqual(findAll('tbody tr').length, count - 1); }); test('cannot remove a host without proper authorization', async function (assert) { @@ -124,7 +124,7 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { ); }); await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, getHostSetHostCount()); + assert.strictEqual(findAll('tbody tr').length, getHostSetHostCount()); await click('tbody tr .rose-dropdown-button-danger'); assert.ok(find('[role="alert"]')); }); @@ -133,7 +133,7 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { assert.expect(1); await visit(urls.addHosts); await a11yAudit(); - assert.equal(currentURL(), urls.addHosts); + assert.strictEqual(currentURL(), urls.addHosts); }); test('can navigate to add hosts with proper authorization', async function (assert) { @@ -156,31 +156,31 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { assert.expect(3); instances.hostSet.update({ hostIds: [] }); await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, 0); + assert.strictEqual(findAll('tbody tr').length, 0); await click('.rose-layout-page-actions a:nth-child(2)'); - assert.equal(currentURL(), urls.addHosts); + assert.strictEqual(currentURL(), urls.addHosts); // Click three times to select, unselect, then reselect (for coverage) await click('tbody label'); await click('tbody label'); await click('tbody label'); await click('form [type="submit"]'); await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, 1); + assert.strictEqual(findAll('tbody tr').length, 1); }); test('select and cancel hosts to add', async function (assert) { assert.expect(4); const count = getHostSetHostCount(); await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, count); + assert.strictEqual(findAll('tbody tr').length, count); await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, count - 1); + assert.strictEqual(findAll('tbody tr').length, count - 1); await click('.rose-layout-page-actions a:nth-child(2)'); - assert.equal(currentURL(), urls.addHosts); + assert.strictEqual(currentURL(), urls.addHosts); await click('tbody label'); await click('form [type="button"]'); await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, count - 1); + assert.strictEqual(findAll('tbody tr').length, count - 1); }); test('shows error message on host add error', async function (assert) { @@ -208,28 +208,28 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { assert.expect(1); await visit(urls.createAndAddHost); await a11yAudit(); - assert.equal(currentURL(), urls.createAndAddHost); + assert.strictEqual(currentURL(), urls.createAndAddHost); }); test('create and add host to host set', async function (assert) { assert.expect(3); instances.hostSet.update({ hostIds: [] }); await visit(urls.hostSet); - assert.equal(findAll('tbody tr').length, 0); + assert.strictEqual(findAll('tbody tr').length, 0); await click('.rose-layout-page-actions a:nth-child(1)'); - assert.equal(currentURL(), urls.createAndAddHost); + assert.strictEqual(currentURL(), urls.createAndAddHost); await fillIn('[name="name"]', 'Test Name'); await fillIn('[name="description"]', 'description'); await click('form [type="submit"]:not(:disabled)'); await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, 1); + assert.strictEqual(findAll('tbody tr').length, 1); }); test('create and cancel host add to host set', async function (assert) { assert.expect(1); await visit(urls.createAndAddHost); await click('form [type="button"]'); - assert.equal(currentURL(), urls.hostSetHosts); + assert.strictEqual(currentURL(), urls.hostSetHosts); }); test('shows error message on host creation error', async function (assert) { diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/read-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/read-test.js index 02526fda5..56c535666 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/read-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/read-test.js @@ -71,10 +71,10 @@ module('Acceptance | host-catalogs | host sets | read', function (hooks) { assert.expect(2); await visit(urls.hostSets); await a11yAudit(); - assert.equal(currentURL(), urls.hostSets); + assert.strictEqual(currentURL(), urls.hostSets); await visit(urls.hostSet); await a11yAudit(); - assert.equal(currentURL(), urls.hostSet); + assert.strictEqual(currentURL(), urls.hostSet); }); test('cannot navigate to a host set form without proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/update-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/update-test.js index 46ae48eef..e2b829ef1 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/update-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/update-test.js @@ -107,8 +107,8 @@ module('Acceptance | host-catalogs | host sets | update', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="submit"]'); - assert.equal(currentURL(), urls.hostSet); - assert.equal( + assert.strictEqual(currentURL(), urls.hostSet); + assert.strictEqual( this.server.schema.hostSets.all().models[0].name, 'random string' ); @@ -129,7 +129,7 @@ module('Acceptance | host-catalogs | host sets | update', function (hooks) { await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); assert.notEqual(instances.hostSet.name, 'random string'); - assert.equal(find('[name="name"]').value, instances.hostSet.name); + assert.strictEqual(find('[name="name"]').value, instances.hostSet.name); }); test('saving an existing host set with invalid fields displays error messages', async function (assert) { @@ -175,13 +175,13 @@ module('Acceptance | host-catalogs | host sets | update', function (hooks) { await visit(urls.hostSet); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), urls.hostSet); + assert.strictEqual(currentURL(), urls.hostSet); try { await visit(urls.hostSets); } catch (e) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:first-child'); - assert.equal(currentURL(), urls.hostSets); + assert.strictEqual(currentURL(), urls.hostSets); assert.notEqual( this.server.schema.hostSets.all().models[0].name, 'random string' diff --git a/ui/admin/tests/acceptance/host-catalogs/hosts/create-test.js b/ui/admin/tests/acceptance/host-catalogs/hosts/create-test.js index 75a436274..ec49525d8 100644 --- a/ui/admin/tests/acceptance/host-catalogs/hosts/create-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/hosts/create-test.js @@ -76,7 +76,7 @@ module('Acceptance | host-catalogs | hosts | create', function (hooks) { await visit(urls.newHost); await fillIn('[name="name"]', 'random string'); await click('[type="submit"]'); - assert.equal(getHostCount(), count + 1); + assert.strictEqual(getHostCount(), count + 1); }); test('Users cannot create a new host without proper authorization', async function (assert) { @@ -119,8 +119,8 @@ module('Acceptance | host-catalogs | hosts | create', function (hooks) { await visit(urls.newHost); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), urls.hosts); - assert.equal(getHostCount(), count); + assert.strictEqual(currentURL(), urls.hosts); + assert.strictEqual(getHostCount(), count); }); test('saving a new host with invalid fields displays error messages', async function (assert) { diff --git a/ui/admin/tests/acceptance/host-catalogs/hosts/delete-test.js b/ui/admin/tests/acceptance/host-catalogs/hosts/delete-test.js index 9563d1e0c..9cf91d17d 100644 --- a/ui/admin/tests/acceptance/host-catalogs/hosts/delete-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/hosts/delete-test.js @@ -77,7 +77,7 @@ module('Acceptance | host-catalogs | hosts | delete', function (hooks) { const count = getHostCount(); await visit(urls.host); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getHostCount(), count - 1); + assert.strictEqual(getHostCount(), count - 1); }); test('cannot delete a host without proper authorization', async function (assert) { @@ -98,7 +98,7 @@ module('Acceptance | host-catalogs | hosts | delete', function (hooks) { const count = getHostCount(); await visit(urls.host); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getHostCount(), count - 1); + assert.strictEqual(getHostCount(), count - 1); assert.ok(confirmService.confirm.calledOnce); }); @@ -110,7 +110,7 @@ module('Acceptance | host-catalogs | hosts | delete', function (hooks) { const count = getHostCount(); await visit(urls.host); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getHostCount(), count); + assert.strictEqual(getHostCount(), count); assert.ok(confirmService.confirm.calledOnce); }); diff --git a/ui/admin/tests/acceptance/host-catalogs/hosts/read-test.js b/ui/admin/tests/acceptance/host-catalogs/hosts/read-test.js index 420dfc552..9de2fc676 100644 --- a/ui/admin/tests/acceptance/host-catalogs/hosts/read-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/hosts/read-test.js @@ -71,10 +71,10 @@ module('Acceptance | host-catalogs | hosts | read', function (hooks) { assert.expect(2); await visit(urls.hosts); await a11yAudit(); - assert.equal(currentURL(), urls.hosts); + assert.strictEqual(currentURL(), urls.hosts); await visit(urls.host); await a11yAudit(); - assert.equal(currentURL(), urls.host); + assert.strictEqual(currentURL(), urls.host); }); test('cannot navigate to a role form without proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/host-catalogs/hosts/update-test.js b/ui/admin/tests/acceptance/host-catalogs/hosts/update-test.js index 76eb3d995..077c4ecb0 100644 --- a/ui/admin/tests/acceptance/host-catalogs/hosts/update-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/hosts/update-test.js @@ -74,8 +74,8 @@ module('Acceptance | host-catalogs | hosts | update', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="submit"]'); - assert.equal(currentURL(), urls.host); - assert.equal( + assert.strictEqual(currentURL(), urls.host); + assert.strictEqual( this.server.schema.hosts.all().models[0].name, 'random string' ); @@ -96,7 +96,7 @@ module('Acceptance | host-catalogs | hosts | update', function (hooks) { await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); assert.notEqual(instances.host.name, 'random string'); - assert.equal(find('[name="name"]').value, instances.host.name); + assert.strictEqual(find('[name="name"]').value, instances.host.name); }); test('saving an existing host with invalid fields displays error messages', async function (assert) { @@ -142,13 +142,13 @@ module('Acceptance | host-catalogs | hosts | update', function (hooks) { await visit(urls.host); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), urls.host); + assert.strictEqual(currentURL(), urls.host); try { await visit(urls.hosts); } catch (e) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:first-child'); - assert.equal(currentURL(), urls.hosts); + assert.strictEqual(currentURL(), urls.hosts); assert.notEqual( this.server.schema.hosts.all().models[0].name, 'random string' @@ -164,13 +164,13 @@ module('Acceptance | host-catalogs | hosts | update', function (hooks) { await visit(urls.host); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), urls.host); + assert.strictEqual(currentURL(), urls.host); try { await visit(urls.hosts); } catch (e) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:last-child'); - assert.equal(currentURL(), urls.host); + assert.strictEqual(currentURL(), urls.host); assert.notEqual( this.server.schema.hosts.all().models[0].name, 'random string' diff --git a/ui/admin/tests/acceptance/host-catalogs/read-test.js b/ui/admin/tests/acceptance/host-catalogs/read-test.js index 1544ad4d3..e24e80d9b 100644 --- a/ui/admin/tests/acceptance/host-catalogs/read-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/read-test.js @@ -59,10 +59,10 @@ module('Acceptance | host-catalogs | read', function (hooks) { assert.expect(2); await visit(urls.hostCatalogs); await a11yAudit(); - assert.equal(currentURL(), urls.hostCatalogs); + assert.strictEqual(currentURL(), urls.hostCatalogs); await visit(urls.hostCatalog); await a11yAudit(); - assert.equal(currentURL(), urls.hostCatalog); + assert.strictEqual(currentURL(), urls.hostCatalog); }); test('cannot navigate to a host catalog form without proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/host-catalogs/update-test.js b/ui/admin/tests/acceptance/host-catalogs/update-test.js index 31a795189..2d9c8bca6 100644 --- a/ui/admin/tests/acceptance/host-catalogs/update-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/update-test.js @@ -62,8 +62,8 @@ module('Acceptance | host-catalogs | update', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="submit"]'); - assert.equal(currentURL(), urls.hostCatalog); - assert.equal( + assert.strictEqual(currentURL(), urls.hostCatalog); + assert.strictEqual( this.server.schema.hostCatalogs.all().models[0].name, 'random string' ); @@ -86,7 +86,7 @@ module('Acceptance | host-catalogs | update', function (hooks) { await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); assert.notEqual(instances.hostCatalog.name, 'random string'); - assert.equal(find('[name="name"]').value, instances.hostCatalog.name); + assert.strictEqual(find('[name="name"]').value, instances.hostCatalog.name); }); test('saving an existing host catalog with invalid fields displays error messages', async function (assert) { @@ -132,13 +132,13 @@ module('Acceptance | host-catalogs | update', function (hooks) { await visit(urls.hostCatalog); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), urls.hostCatalog); + assert.strictEqual(currentURL(), urls.hostCatalog); try { await visit(urls.hostCatalogs); } catch (e) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:first-child'); - assert.equal(currentURL(), urls.hostCatalogs); + assert.strictEqual(currentURL(), urls.hostCatalogs); assert.notEqual( this.server.schema.hostCatalogs.all().models[0].name, 'random string' @@ -154,13 +154,13 @@ module('Acceptance | host-catalogs | update', function (hooks) { await visit(urls.hostCatalog); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), urls.hostCatalog); + assert.strictEqual(currentURL(), urls.hostCatalog); try { await visit(urls.hostCatalogs); } catch (e) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:last-child'); - assert.equal(currentURL(), urls.hostCatalog); + assert.strictEqual(currentURL(), urls.hostCatalog); assert.notEqual( this.server.schema.hostCatalogs.all().models[0].name, 'random string' diff --git a/ui/admin/tests/acceptance/managed-groups/create-test.js b/ui/admin/tests/acceptance/managed-groups/create-test.js index 8d07893e4..dac708c21 100644 --- a/ui/admin/tests/acceptance/managed-groups/create-test.js +++ b/ui/admin/tests/acceptance/managed-groups/create-test.js @@ -61,7 +61,7 @@ module('Acceptance | managed-groups | create', function (hooks) { assert.expect(1); await visit(urls.managedGroups); await a11yAudit(); - assert.equal(currentURL(), urls.managedGroups); + assert.strictEqual(currentURL(), urls.managedGroups); }); test('can create a new managed group', async function (assert) { @@ -71,7 +71,7 @@ module('Acceptance | managed-groups | create', function (hooks) { await fillIn('[name="name"]', 'Managed group name'); await fillIn('[name="description"]', 'description'); await click('form [type="submit"]:not(:disabled)'); - assert.equal(this.server.db.managedGroups.length, managedGroupsCount + 1); + assert.strictEqual(this.server.db.managedGroups.length, managedGroupsCount + 1); }); test('User can not create a new managed group without proper authorization', async function (assert) { @@ -117,8 +117,8 @@ module('Acceptance | managed-groups | create', function (hooks) { await visit(urls.newManagedGroup); await fillIn('[name="name"]', 'Managed group name'); await click('form button:not([type="submit"])'); - assert.equal(this.server.db.managedGroups.length, managedGroupsCount); - assert.equal(currentURL(), urls.managedGroups); + assert.strictEqual(this.server.db.managedGroups.length, managedGroupsCount); + assert.strictEqual(currentURL(), urls.managedGroups); }); test('When user saving a new managed group with invalid fields displays error message', async function (assert) { @@ -146,12 +146,12 @@ module('Acceptance | managed-groups | create', function (hooks) { await fillIn('[name="name"]', 'new managed group'); await click('form [type="submit"]'); await a11yAudit(); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'The request was invalid.', 'Displays primary error message.' ); - assert.equal( + assert.strictEqual( find('.rose-form-error-message').textContent.trim(), 'Name is required.', 'Displays field-level errors.' diff --git a/ui/admin/tests/acceptance/managed-groups/delete-test.js b/ui/admin/tests/acceptance/managed-groups/delete-test.js index 7be2263ab..99e3bdb9b 100644 --- a/ui/admin/tests/acceptance/managed-groups/delete-test.js +++ b/ui/admin/tests/acceptance/managed-groups/delete-test.js @@ -63,7 +63,7 @@ module('Acceptance | managed-groups | delete', function (hooks) { const managedGroupsCount = this.server.db.managedGroups.length; await visit(urls.managedGroup); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(this.server.db.managedGroups.length, managedGroupsCount - 1); + assert.strictEqual(this.server.db.managedGroups.length, managedGroupsCount - 1); }); test('User cannot delete a managed-group without proper authorization', async function (assert) { @@ -94,7 +94,7 @@ module('Acceptance | managed-groups | delete', function (hooks) { await visit(urls.managedGroup); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); await a11yAudit(); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'Oops.', 'Displays primary error message.' diff --git a/ui/admin/tests/acceptance/managed-groups/members-test.js b/ui/admin/tests/acceptance/managed-groups/members-test.js index 8b5427d2a..a2d997068 100644 --- a/ui/admin/tests/acceptance/managed-groups/members-test.js +++ b/ui/admin/tests/acceptance/managed-groups/members-test.js @@ -62,8 +62,8 @@ module('Acceptance | managed-groups | members', function (hooks) { const membersCount = instances.managedGroup.memberIds.length; await visit(urls.managedGroupMembers); await a11yAudit(); - assert.equal(currentURL(), urls.managedGroupMembers); + assert.strictEqual(currentURL(), urls.managedGroupMembers); assert.ok(membersCount); - assert.equal(findAll('tbody tr').length, membersCount); + assert.strictEqual(findAll('tbody tr').length, membersCount); }); }); diff --git a/ui/admin/tests/acceptance/managed-groups/read-test.js b/ui/admin/tests/acceptance/managed-groups/read-test.js index ef11179c8..36d17cb0b 100644 --- a/ui/admin/tests/acceptance/managed-groups/read-test.js +++ b/ui/admin/tests/acceptance/managed-groups/read-test.js @@ -62,7 +62,7 @@ module('Acceptance | managed-groups | read', function (hooks) { await visit(urls.managedGroups); await click('main tbody .rose-table-header-cell:nth-child(1) a'); await a11yAudit(); - assert.equal(currentURL(), urls.managedGroup); + assert.strictEqual(currentURL(), urls.managedGroup); }); test('User cannot navigate to a managed group form without proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/onboarding/choose-path-test.js b/ui/admin/tests/acceptance/onboarding/choose-path-test.js index 223d1e62a..81cb43e5d 100644 --- a/ui/admin/tests/acceptance/onboarding/choose-path-test.js +++ b/ui/admin/tests/acceptance/onboarding/choose-path-test.js @@ -21,7 +21,7 @@ module('Acceptance | onboarding | choose-path', function (hooks) { test('defaults to the guided path', async function (assert) { assert.expect(2); await visit(urls.choosePath); - assert.equal(find('input[name=paths]:checked').value, 'guided'); + assert.strictEqual(find('input[name=paths]:checked').value, 'guided'); assert.false(find('input[value=manual]').checked); }); @@ -29,7 +29,7 @@ module('Acceptance | onboarding | choose-path', function (hooks) { assert.expect(2); await visit(urls.choosePath); await click('[name="paths"][value="manual"]'); - assert.equal(find('input[name=paths]:checked').value, 'manual'); + assert.strictEqual(find('input[name=paths]:checked').value, 'manual'); assert.false(find('input[value=guided]').checked); }); @@ -37,7 +37,7 @@ module('Acceptance | onboarding | choose-path', function (hooks) { assert.expect(1); await visit(urls.choosePath); await click('[type="submit"]'); - assert.equal(currentURL(), urls.createResources); + assert.strictEqual(currentURL(), urls.createResources); }); test('guided path directs user to /global/new route', async function (assert) { @@ -45,6 +45,6 @@ module('Acceptance | onboarding | choose-path', function (hooks) { await visit(urls.choosePath); await click('[name="paths"][value="manual"]'); await click('[type="submit"]'); - assert.equal(currentURL(), urls.newOrg); + assert.strictEqual(currentURL(), urls.newOrg); }); }); diff --git a/ui/admin/tests/acceptance/onboarding/create-resource-test.js b/ui/admin/tests/acceptance/onboarding/create-resource-test.js index 50efeb79d..f0455507d 100644 --- a/ui/admin/tests/acceptance/onboarding/create-resource-test.js +++ b/ui/admin/tests/acceptance/onboarding/create-resource-test.js @@ -33,7 +33,7 @@ module('Acceptance | onboarding | create-resources', function (hooks) { await fillIn('[name="hostAddress"]', '0.0.0.0'); await fillIn('[name="targetPort"]', '22'); await click('[type="submit"]'); - assert.equal(currentURL(), urls.successPath); + assert.strictEqual(currentURL(), urls.successPath); }); test('redirects user to host catalog screen when next is clicked', async function (assert) { @@ -44,6 +44,6 @@ module('Acceptance | onboarding | create-resources', function (hooks) { .models[0].id; const hostCatalogId = this.server.schema.hostCatalogs.all().models[0].id; urls.hostCatalogPath = `/scopes/${projectId}/host-catalogs/${hostCatalogId}/hosts`; - assert.equal(currentURL(), urls.hostCatalogPath); + assert.strictEqual(currentURL(), urls.hostCatalogPath); }); }); diff --git a/ui/admin/tests/acceptance/roles/create-test.js b/ui/admin/tests/acceptance/roles/create-test.js index 15ff5e750..80cdce6fc 100644 --- a/ui/admin/tests/acceptance/roles/create-test.js +++ b/ui/admin/tests/acceptance/roles/create-test.js @@ -68,7 +68,7 @@ module('Acceptance | roles | create', function (hooks) { await visit(urls.newRole); await fillIn('[name="name"]', 'role name'); await click('[type="submit"]'); - assert.equal(this.server.db.roles.length, rolesCount + 1); + assert.strictEqual(this.server.db.roles.length, rolesCount + 1); }); test('Users can navigate to new roles route with proper authorization', async function (assert) { @@ -96,8 +96,8 @@ module('Acceptance | roles | create', function (hooks) { await visit(urls.newRole); await fillIn('[name="name"]', 'role name'); await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), urls.roles); - assert.equal(this.server.db.roles.length, rolesCount); + assert.strictEqual(currentURL(), urls.roles); + assert.strictEqual(this.server.db.roles.length, rolesCount); }); test('saving a new role with invalid fields displays error messages', async function (assert) { diff --git a/ui/admin/tests/acceptance/roles/delete-test.js b/ui/admin/tests/acceptance/roles/delete-test.js index ba0363e1d..d620dd096 100644 --- a/ui/admin/tests/acceptance/roles/delete-test.js +++ b/ui/admin/tests/acceptance/roles/delete-test.js @@ -60,7 +60,7 @@ module('Acceptance | roles | delete', function (hooks) { const rolesCount = this.server.db.roles.length; await visit(urls.role); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(this.server.db.roles.length, rolesCount - 1); + assert.strictEqual(this.server.db.roles.length, rolesCount - 1); }); test('cannot delete a role without proper authorization', async function (assert) { @@ -88,7 +88,7 @@ module('Acceptance | roles | delete', function (hooks) { }); await visit(urls.role); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'Oops.', 'Displays primary error message.' diff --git a/ui/admin/tests/acceptance/roles/grants-test.js b/ui/admin/tests/acceptance/roles/grants-test.js index fd169aa46..2161e1844 100644 --- a/ui/admin/tests/acceptance/roles/grants-test.js +++ b/ui/admin/tests/acceptance/roles/grants-test.js @@ -59,8 +59,8 @@ module('Acceptance | roles | grants', function (hooks) { assert.expect(2); await visit(urls.grants); await a11yAudit(); - assert.equal(currentURL(), urls.grants); - assert.equal(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); + assert.strictEqual(currentURL(), urls.grants); + assert.strictEqual(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); }); test('cannot set grants without proper authorization', async function (assert) { @@ -70,7 +70,7 @@ module('Acceptance | roles | grants', function (hooks) { ); instances.role.update({ authorized_actions }); await visit(urls.grants); - assert.equal( + assert.strictEqual( findAll('main form').length, 1, 'New grant form is not displayed.' @@ -89,7 +89,7 @@ module('Acceptance | roles | grants', function (hooks) { '/roles/:idMethod', (_, { params: { idMethod }, requestBody }) => { const attrs = JSON.parse(requestBody); - assert.equal( + assert.strictEqual( attrs.grant_strings[0], 'id=123,action=delete', 'A grant is updated' @@ -129,7 +129,7 @@ module('Acceptance | roles | grants', function (hooks) { ); }); await visit(urls.grants); - assert.equal(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); + assert.strictEqual(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); await fillIn(`${grantsForm} [name="grant"]`, 'id=123,action=delete'); await click('.rose-form-actions [type="submit"]:not(:disabled)'); assert.ok(find('[role="alert"]')); @@ -141,7 +141,7 @@ module('Acceptance | roles | grants', function (hooks) { '/roles/:idMethod', (_, { params: { idMethod }, requestBody }) => { const attrs = JSON.parse(requestBody); - assert.equal( + assert.strictEqual( attrs.grant_strings.length, grantsCount + 1, 'A grant is created' @@ -180,7 +180,7 @@ module('Acceptance | roles | grants', function (hooks) { ); }); await visit(urls.grants); - assert.equal(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); + assert.strictEqual(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); await fillIn(`${newGrantForm} [name="grant"]`, 'id=123,action=delete'); await click(`${newGrantForm} [type="submit"]:not(:disabled)`); await click('.rose-form-actions [type="submit"]:not(:disabled)'); @@ -192,7 +192,7 @@ module('Acceptance | roles | grants', function (hooks) { await visit(urls.grants); await click(`${grantsForm} button:not([type="submit"])`); await click('.rose-form-actions [type="submit"]:not(:disabled)'); - assert.equal( + assert.strictEqual( findAll(`${grantsForm} [name="grant"]`).length, grantsCount - 1 ); @@ -203,7 +203,7 @@ module('Acceptance | roles | grants', function (hooks) { await visit(urls.grants); await click(`${grantsForm} button`); await click('.rose-form-actions button:not([type="submit"])'); - assert.equal(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); + assert.strictEqual(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); }); test('shows error message on grant remove', async function (assert) { @@ -221,7 +221,7 @@ module('Acceptance | roles | grants', function (hooks) { ); }); await visit(urls.grants); - assert.equal(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); + assert.strictEqual(findAll(`${grantsForm} [name="grant"]`).length, grantsCount); await click(`${grantsForm} button:not([type="submit"])`); await click('.rose-form-actions [type="submit"]:not(:disabled)'); assert.ok(find('[role="alert"]')); diff --git a/ui/admin/tests/acceptance/roles/principals-test.js b/ui/admin/tests/acceptance/roles/principals-test.js index 998c9acc5..5a6ad8b00 100644 --- a/ui/admin/tests/acceptance/roles/principals-test.js +++ b/ui/admin/tests/acceptance/roles/principals-test.js @@ -57,16 +57,16 @@ module('Acceptance | roles | principals', function (hooks) { assert.expect(2); await visit(urls.rolePrincipals); await a11yAudit(); - assert.equal(currentURL(), urls.rolePrincipals); - assert.equal(findAll('tbody tr').length, principalsCount); + assert.strictEqual(currentURL(), urls.rolePrincipals); + assert.strictEqual(findAll('tbody tr').length, principalsCount); }); test('principal can be removed from a role', async function (assert) { assert.expect(2); await visit(urls.rolePrincipals); - assert.equal(findAll('tbody tr').length, principalsCount); + assert.strictEqual(findAll('tbody tr').length, principalsCount); await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, principalsCount - 1); + assert.strictEqual(findAll('tbody tr').length, principalsCount - 1); }); test('principal cannot be removed from a role without proper authorization', async function (assert) { @@ -94,7 +94,7 @@ module('Acceptance | roles | principals', function (hooks) { ); }); await visit(urls.rolePrincipals); - assert.equal(findAll('tbody tr').length, principalsCount); + assert.strictEqual(findAll('tbody tr').length, principalsCount); await click('tbody tr .rose-dropdown-button-danger'); assert.ok(find('[role="alert"]')); }); @@ -113,31 +113,31 @@ module('Acceptance | roles | principals', function (hooks) { assert.expect(3); instances.role.update({ userIds: [], groupIds: [] }); await visit(urls.rolePrincipals); - assert.equal(findAll('tbody tr').length, 0); + assert.strictEqual(findAll('tbody tr').length, 0); await click('.rose-layout-page-actions a'); - assert.equal(currentURL(), urls.addPrincipals); + assert.strictEqual(currentURL(), urls.addPrincipals); // Click three times to select, unselect, then reselect (for coverage) await click('tbody label'); await click('tbody label'); await click('tbody label'); await click('form [type="submit"]'); await visit(urls.rolePrincipals); - assert.equal(findAll('tbody tr').length, 1); + assert.strictEqual(findAll('tbody tr').length, 1); }); test('select and cancel principals to add', async function (assert) { assert.expect(4); await visit(urls.rolePrincipals); - assert.equal(findAll('tbody tr').length, principalsCount); + assert.strictEqual(findAll('tbody tr').length, principalsCount); // Remove a principal to populate association view await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, principalsCount - 1); + assert.strictEqual(findAll('tbody tr').length, principalsCount - 1); await click('.rose-layout-page-actions a'); - assert.equal(currentURL(), urls.addPrincipals); + assert.strictEqual(currentURL(), urls.addPrincipals); await click('tbody label'); await click('form [type="button"]'); await visit(urls.rolePrincipals); - assert.equal(findAll('tbody tr').length, principalsCount - 1); + assert.strictEqual(findAll('tbody tr').length, principalsCount - 1); }); test('shows error message on principal add', async function (assert) { diff --git a/ui/admin/tests/acceptance/roles/read-test.js b/ui/admin/tests/acceptance/roles/read-test.js index 97f717085..04a5d4f56 100644 --- a/ui/admin/tests/acceptance/roles/read-test.js +++ b/ui/admin/tests/acceptance/roles/read-test.js @@ -59,7 +59,7 @@ module('Acceptance | roles | read', function (hooks) { assert.expect(1); await visit(urls.roles); await a11yAudit(); - assert.equal(currentURL(), urls.roles); + assert.strictEqual(currentURL(), urls.roles); }); test('can navigate to a role form', async function (assert) { @@ -67,7 +67,7 @@ module('Acceptance | roles | read', function (hooks) { await visit(urls.roles); await click('main tbody .rose-table-header-cell:nth-child(1) a'); await a11yAudit(); - assert.equal(currentURL(), urls.role); + assert.strictEqual(currentURL(), urls.role); }); test('cannot navigate to a role form without proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/roles/update-test.js b/ui/admin/tests/acceptance/roles/update-test.js index aca161a54..95486e164 100644 --- a/ui/admin/tests/acceptance/roles/update-test.js +++ b/ui/admin/tests/acceptance/roles/update-test.js @@ -61,8 +61,8 @@ module('Acceptance | roles | update', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'Updated admin role'); await click('.rose-form-actions [type="submit"]'); - assert.equal(currentURL(), urls.role); - assert.equal(this.server.db.roles[0].name, 'Updated admin role'); + assert.strictEqual(currentURL(), urls.role); + assert.strictEqual(this.server.db.roles[0].name, 'Updated admin role'); }); test('cannot make changes to an existing role without proper authorization', async function (assert) { @@ -107,12 +107,12 @@ module('Acceptance | roles | update', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); await click('[type="submit"]'); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'The request was invalid.', 'Displays primary error message.' ); - assert.equal( + assert.strictEqual( find('.rose-form-error-message').textContent.trim(), 'Name is required.', 'Displays field-level errors.' diff --git a/ui/admin/tests/acceptance/scopes-test.js b/ui/admin/tests/acceptance/scopes-test.js index 87a2e5656..7c38f8b2b 100644 --- a/ui/admin/tests/acceptance/scopes-test.js +++ b/ui/admin/tests/acceptance/scopes-test.js @@ -78,7 +78,7 @@ module('Acceptance | scopes', function (hooks) { assert.expect(1); await visit(urls.globalScope); await a11yAudit(); - assert.equal(currentURL(), urls.globalScope); + assert.strictEqual(currentURL(), urls.globalScope); }); // TODO: this probably shouldn't be the case, but was setup to enable @@ -93,14 +93,14 @@ module('Acceptance | scopes', function (hooks) { return response; }); await visit(urls.globalScope); - assert.equal(currentURL(), urls.globalScope); + assert.strictEqual(currentURL(), urls.globalScope); }); test('visiting org scope', async function (assert) { assert.expect(1); await visit(urls.orgScope); await a11yAudit(); - assert.equal(currentURL(), urls.orgScope); + assert.strictEqual(currentURL(), urls.orgScope); }); // NOTE: In reality, we'd have a third "Global" item listed in the org @@ -111,23 +111,23 @@ module('Acceptance | scopes', function (hooks) { assert.expect(3); await visit(urls.globalScope); await a11yAudit(); - assert.equal(currentURL(), urls.globalScope); + assert.strictEqual(currentURL(), urls.globalScope); await click('.rose-header-nav .rose-dropdown a:nth-child(1)'); - assert.equal(currentURL(), urls.orgScope); + assert.strictEqual(currentURL(), urls.orgScope); // In reality, there would be a third item in the list await click('.rose-header-nav .rose-dropdown a:nth-child(2)'); - assert.equal(currentURL(), urls.org2Scope); + assert.strictEqual(currentURL(), urls.org2Scope); }); test('can navigate among project scopes via header navigation', async function (assert) { assert.expect(2); await visit(urls.projectScope); await a11yAudit(); - assert.equal(currentURL(), urls.projectScopeEdit); + assert.strictEqual(currentURL(), urls.projectScopeEdit); await click( '.rose-header-nav .rose-dropdown + .rose-dropdown a:nth-child(2)' ); - assert.equal(currentURL(), urls.project2ScopeEdit); + assert.strictEqual(currentURL(), urls.project2ScopeEdit); }); test('can create new org scopes', async function (assert) { @@ -136,7 +136,7 @@ module('Acceptance | scopes', function (hooks) { await visit(urls.newOrgScope); await fillIn('[name="name"]', 'random string'); await click('[type="submit"]'); - assert.equal(getScopeCount('org'), orgScopeCount + 1); + assert.strictEqual(getScopeCount('org'), orgScopeCount + 1); }); test('can create new project scopes', async function (assert) { @@ -145,7 +145,7 @@ module('Acceptance | scopes', function (hooks) { await visit(urls.newProjectScope); await fillIn('[name="name"]', 'random string'); await click('[type="submit"]'); - assert.equal(getScopeCount('project'), orgScopeCount + 1); + assert.strictEqual(getScopeCount('project'), orgScopeCount + 1); }); test('can cancel create new org scopes', async function (assert) { @@ -154,8 +154,8 @@ module('Acceptance | scopes', function (hooks) { await visit(urls.newOrgScope); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), urls.globalScope); - assert.equal(getScopeCount('org'), orgScopeCount); + assert.strictEqual(currentURL(), urls.globalScope); + assert.strictEqual(getScopeCount('org'), orgScopeCount); }); test('can cancel create new project scopes', async function (assert) { @@ -164,8 +164,8 @@ module('Acceptance | scopes', function (hooks) { await visit(urls.newProjectScope); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), urls.orgScope); - assert.equal(getScopeCount('project'), projectScopeCount); + assert.strictEqual(currentURL(), urls.orgScope); + assert.strictEqual(getScopeCount('project'), projectScopeCount); }); test('saving a new scope with invalid fields displays error messages', async function (assert) { diff --git a/ui/admin/tests/acceptance/scopes/delete-test.js b/ui/admin/tests/acceptance/scopes/delete-test.js index 6b35ae24d..c0d5ef406 100644 --- a/ui/admin/tests/acceptance/scopes/delete-test.js +++ b/ui/admin/tests/acceptance/scopes/delete-test.js @@ -80,7 +80,7 @@ module('Acceptance | scopes | delete', function (hooks) { const orgScopeCount = getScopeCount('org'); await visit(urls.orgScopeEdit); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getScopeCount('org'), orgScopeCount - 1); + assert.strictEqual(getScopeCount('org'), orgScopeCount - 1); }); test('cannot delete scope without proper authorization', async function (assert) { @@ -100,7 +100,7 @@ module('Acceptance | scopes | delete', function (hooks) { const orgScopeCount = getScopeCount('org'); await visit(urls.orgScopeEdit); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getScopeCount('org'), orgScopeCount - 1); + assert.strictEqual(getScopeCount('org'), orgScopeCount - 1); assert.ok(confirmService.confirm.calledOnce); }); @@ -112,7 +112,7 @@ module('Acceptance | scopes | delete', function (hooks) { const orgScopeCount = getScopeCount('org'); await visit(urls.orgScopeEdit); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getScopeCount('org'), orgScopeCount); + assert.strictEqual(getScopeCount('org'), orgScopeCount); assert.ok(confirmService.confirm.calledOnce); }); diff --git a/ui/admin/tests/acceptance/scopes/read-test.js b/ui/admin/tests/acceptance/scopes/read-test.js index 1ddd1e5a4..846f689fb 100644 --- a/ui/admin/tests/acceptance/scopes/read-test.js +++ b/ui/admin/tests/acceptance/scopes/read-test.js @@ -41,7 +41,7 @@ module('Acceptance | scopes | read', function (hooks) { assert.expect(2); await visit(urls.orgScopeEdit); await a11yAudit(); - assert.equal(currentURL(), urls.orgScopeEdit); + assert.strictEqual(currentURL(), urls.orgScopeEdit); assert.ok(find('main .rose-form')); }); @@ -49,7 +49,7 @@ module('Acceptance | scopes | read', function (hooks) { assert.expect(2); instances.scopes.org.update({ authorized_actions: [] }); await visit(urls.orgScopeEdit); - assert.equal(currentURL(), urls.orgScopeEdit); + assert.strictEqual(currentURL(), urls.orgScopeEdit); assert.notOk(find('main .rose-form')); }); }); diff --git a/ui/admin/tests/acceptance/scopes/update-test.js b/ui/admin/tests/acceptance/scopes/update-test.js index 4ddb8085d..ba48bd77c 100644 --- a/ui/admin/tests/acceptance/scopes/update-test.js +++ b/ui/admin/tests/acceptance/scopes/update-test.js @@ -76,8 +76,8 @@ module('Acceptance | scopes | update', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="submit"]'); - assert.equal(currentURL(), urls.orgScopeEdit); - assert.equal( + assert.strictEqual(currentURL(), urls.orgScopeEdit); + assert.strictEqual( this.server.schema.scopes.where({ type: 'org' }).models[0].name, 'random string' ); @@ -97,7 +97,7 @@ module('Acceptance | scopes | update', function (hooks) { await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); assert.notEqual(instances.scopes.org.name, 'random string'); - assert.equal(find('[name="name"]').value, instances.scopes.org.name); + assert.strictEqual(find('[name="name"]').value, instances.scopes.org.name); }); test('saving an existing scope with invalid fields displays error messages', async function (assert) { @@ -143,13 +143,13 @@ module('Acceptance | scopes | update', function (hooks) { await visit(urls.orgScopeEdit); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), urls.orgScopeEdit); + assert.strictEqual(currentURL(), urls.orgScopeEdit); try { await visit(urls.globalScope); } catch (e) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:first-child'); - assert.equal(currentURL(), urls.globalScope); + assert.strictEqual(currentURL(), urls.globalScope); assert.notEqual( this.server.schema.scopes.where({ type: 'org' }).models[0].name, 'random string' @@ -165,13 +165,13 @@ module('Acceptance | scopes | update', function (hooks) { await visit(urls.orgScopeEdit); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), urls.orgScopeEdit); + assert.strictEqual(currentURL(), urls.orgScopeEdit); try { await visit(urls.globalScope); } catch (e) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:last-child'); - assert.equal(currentURL(), urls.orgScopeEdit); + assert.strictEqual(currentURL(), urls.orgScopeEdit); assert.notEqual( this.server.schema.scopes.where({ type: 'org' }).models[0].name, 'random string' diff --git a/ui/admin/tests/acceptance/sessions-test.js b/ui/admin/tests/acceptance/sessions-test.js index 904eaaf56..11799cdb8 100644 --- a/ui/admin/tests/acceptance/sessions-test.js +++ b/ui/admin/tests/acceptance/sessions-test.js @@ -82,8 +82,8 @@ module('Acceptance | sessions', function (hooks) { authenticateSession({}); await visit(urls.sessions); await a11yAudit(); - assert.equal(currentURL(), urls.sessions); - assert.equal(findAll('tbody tr').length, instances.sessions.length); + assert.strictEqual(currentURL(), urls.sessions); + assert.strictEqual(findAll('tbody tr').length, instances.sessions.length); }); test('Users cannot navigate to sessions without proper authorization', async function (assert) { @@ -121,15 +121,15 @@ module('Acceptance | sessions', function (hooks) { authenticateSession({}); await visit(urls.sessions); await a11yAudit(); - assert.equal(currentURL(), urls.sessions); - assert.equal(findAll('tbody tr').length, instances.sessions.length); + assert.strictEqual(currentURL(), urls.sessions); + assert.strictEqual(findAll('tbody tr').length, instances.sessions.length); }); test('cancelling a session', async function (assert) { assert.expect(2); authenticateSession({}); await visit(urls.sessions); - assert.equal(currentURL(), urls.sessions); + assert.strictEqual(currentURL(), urls.sessions); await click('tbody tr:first-child td:last-child button'); assert.ok(find('[role="alert"].is-success')); }); @@ -139,7 +139,7 @@ module('Acceptance | sessions', function (hooks) { this.server.post('/sessions/:id_method', () => new Response(400)); authenticateSession({}); await visit(urls.sessions); - assert.equal(currentURL(), urls.sessions); + assert.strictEqual(currentURL(), urls.sessions); await click('tbody tr:first-child td:last-child button'); assert.ok(find('[role="alert"].is-error')); }); diff --git a/ui/admin/tests/acceptance/targets/create-test.js b/ui/admin/tests/acceptance/targets/create-test.js index 8091443e7..3e3c9139b 100644 --- a/ui/admin/tests/acceptance/targets/create-test.js +++ b/ui/admin/tests/acceptance/targets/create-test.js @@ -74,7 +74,7 @@ module('Acceptance | targets | create', function (hooks) { test('defaults to a new TCP target when no query param provided', async function (assert) { assert.expect(1); await visit(urls.newTarget); - assert.equal(find('input[name=types]:checked').value, 'tcp'); + assert.strictEqual(find('input[name=types]:checked').value, 'tcp'); }); test('can create new targets of type TCP', async function (assert) { @@ -84,12 +84,12 @@ module('Acceptance | targets | create', function (hooks) { await fillIn('[name="name"]', 'random string'); await fillIn('[name="worker_filter"]', 'random filter'); await click('[type="submit"]'); - assert.equal(getTargetCount(), count + 1); - assert.equal( + assert.strictEqual(getTargetCount(), count + 1); + assert.strictEqual( this.server.schema.targets.all().models[getTargetCount() - 1].name, 'random string' ); - assert.equal( + assert.strictEqual( this.server.schema.targets.all().models[getTargetCount() - 1] .workerFilter, 'random filter' @@ -103,12 +103,12 @@ module('Acceptance | targets | create', function (hooks) { await fillIn('[name="name"]', 'random string'); await fillIn('[name="worker_filter"]', 'random filter'); await click('[type="submit"]'); - assert.equal(getTargetCount(), count + 1); - assert.equal( + assert.strictEqual(getTargetCount(), count + 1); + assert.strictEqual( this.server.schema.targets.all().models[getTargetCount() - 1].name, 'random string' ); - assert.equal( + assert.strictEqual( this.server.schema.targets.all().models[getTargetCount() - 1] .workerFilter, 'random filter' @@ -156,8 +156,8 @@ module('Acceptance | targets | create', function (hooks) { await visit(urls.newTCPTarget); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), urls.targets); - assert.equal(getTargetCount(), count); + assert.strictEqual(currentURL(), urls.targets); + assert.strictEqual(getTargetCount(), count); }); test('can cancel create new SSH target', async function (assert) { @@ -166,8 +166,8 @@ module('Acceptance | targets | create', function (hooks) { await visit(urls.newSSHTarget); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), urls.targets); - assert.equal(getTargetCount(), count); + assert.strictEqual(currentURL(), urls.targets); + assert.strictEqual(getTargetCount(), count); }); test('saving a new TCP target with invalid fields displays error messages', async function (assert) { diff --git a/ui/admin/tests/acceptance/targets/credential-sources-test.js b/ui/admin/tests/acceptance/targets/credential-sources-test.js index 902ce67a8..0fb667844 100644 --- a/ui/admin/tests/acceptance/targets/credential-sources-test.js +++ b/ui/admin/tests/acceptance/targets/credential-sources-test.js @@ -85,8 +85,8 @@ module('Acceptance | targets | credential-libraries', function (hooks) { assert.expect(2); await visit(urls.credentialSources); await a11yAudit(); - assert.equal(currentURL(), urls.credentialSources); - assert.equal(findAll('tbody tr').length, getCredentialLibraryCount()); + assert.strictEqual(currentURL(), urls.credentialSources); + assert.strictEqual(findAll('tbody tr').length, getCredentialLibraryCount()); }); test('can navigate to a credential library', async function (assert) { @@ -94,27 +94,27 @@ module('Acceptance | targets | credential-libraries', function (hooks) { await visit(urls.credentialSources); await click('main tbody .rose-table-header-cell:nth-child(1) a'); await a11yAudit(); - assert.equal(currentURL(), urls.credentialLibrary); + assert.strictEqual(currentURL(), urls.credentialLibrary); }); test('visiting add credential sources', async function (assert) { assert.expect(1); await visit(urls.addCredentialSources); await a11yAudit(); - assert.equal(currentURL(), urls.addCredentialSources); + assert.strictEqual(currentURL(), urls.addCredentialSources); }); test('can select and save credential sources to add', async function (assert) { assert.expect(4); instances.target.update({ credentialLibraries: [] }); await visit(urls.credentialSources); - assert.equal(findAll('tbody tr').length, 0); + assert.strictEqual(findAll('tbody tr').length, 0); await visit(urls.addCredentialSources); - assert.equal(findAll('tbody tr').length, getCredentialLibraryCount()); + assert.strictEqual(findAll('tbody tr').length, getCredentialLibraryCount()); await click('tbody label'); await click('form [type="submit"]'); - assert.equal(currentURL(), urls.credentialSources); - assert.equal(findAll('tbody tr').length, 1); + assert.strictEqual(currentURL(), urls.credentialSources); + assert.strictEqual(findAll('tbody tr').length, 1); }); test('cannot add credential sources without proper authorization', async function (assert) { @@ -131,13 +131,13 @@ module('Acceptance | targets | credential-libraries', function (hooks) { assert.expect(4); instances.target.update({ credentialLibraries: [] }); await visit(urls.credentialSources); - assert.equal(findAll('tbody tr').length, 0); + assert.strictEqual(findAll('tbody tr').length, 0); await visit(urls.addCredentialSources); - assert.equal(findAll('tbody tr').length, getCredentialLibraryCount()); + assert.strictEqual(findAll('tbody tr').length, getCredentialLibraryCount()); await click('tbody label'); await click('form [type="button"]'); - assert.equal(currentURL(), urls.credentialSources); - assert.equal(findAll('tbody tr').length, 0); + assert.strictEqual(currentURL(), urls.credentialSources); + assert.strictEqual(findAll('tbody tr').length, 0); }); test('adding credential sources which errors displays error message', async function (assert) { @@ -165,9 +165,9 @@ module('Acceptance | targets | credential-libraries', function (hooks) { assert.expect(2); const count = getCredentialLibraryCount(); await visit(urls.credentialSources); - assert.equal(findAll('tbody tr').length, count); + assert.strictEqual(findAll('tbody tr').length, count); await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, count - 1); + assert.strictEqual(findAll('tbody tr').length, count - 1); }); test('cannot remove credential libraries without proper authorization', async function (assert) { @@ -196,7 +196,7 @@ module('Acceptance | targets | credential-libraries', function (hooks) { }); const count = getCredentialLibraryCount(); await visit(urls.credentialSources); - assert.equal(findAll('tbody tr').length, count); + assert.strictEqual(findAll('tbody tr').length, count); await click('tbody tr .rose-dropdown-button-danger'); assert.ok(find('[role="alert"]')); }); diff --git a/ui/admin/tests/acceptance/targets/delete-test.js b/ui/admin/tests/acceptance/targets/delete-test.js index 01e491bd2..0dc53423e 100644 --- a/ui/admin/tests/acceptance/targets/delete-test.js +++ b/ui/admin/tests/acceptance/targets/delete-test.js @@ -66,7 +66,7 @@ module('Acceptance | targets | delete', function (hooks) { const count = getTargetCount(); await visit(urls.target); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getTargetCount(), count - 1); + assert.strictEqual(getTargetCount(), count - 1); }); test('can accept delete target via dialog', async function (assert) { @@ -77,7 +77,7 @@ module('Acceptance | targets | delete', function (hooks) { const count = getTargetCount(); await visit(urls.target); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getTargetCount(), count - 1); + assert.strictEqual(getTargetCount(), count - 1); assert.ok(confirmService.confirm.calledOnce); }); @@ -89,7 +89,7 @@ module('Acceptance | targets | delete', function (hooks) { const count = getTargetCount(); await visit(urls.target); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getTargetCount(), count); + assert.strictEqual(getTargetCount(), count); assert.ok(confirmService.confirm.calledOnce); }); diff --git a/ui/admin/tests/acceptance/targets/host-sources-test.js b/ui/admin/tests/acceptance/targets/host-sources-test.js index a1abc9e72..fb05b14ba 100644 --- a/ui/admin/tests/acceptance/targets/host-sources-test.js +++ b/ui/admin/tests/acceptance/targets/host-sources-test.js @@ -70,18 +70,18 @@ module('Acceptance | targets | host-sources', function (hooks) { const targetHostSetCount = instances.target.hostSets.length; await visit(urls.targetHostSources); await a11yAudit(); - assert.equal(currentURL(), urls.targetHostSources); + assert.strictEqual(currentURL(), urls.targetHostSources); assert.ok(targetHostSetCount); - assert.equal(findAll('tbody tr').length, targetHostSetCount); + assert.strictEqual(findAll('tbody tr').length, targetHostSetCount); }); test('can remove a host set', async function (assert) { assert.expect(2); const targetHostSetCount = instances.target.hostSets.length; await visit(urls.targetHostSources); - assert.equal(findAll('tbody tr').length, targetHostSetCount); + assert.strictEqual(findAll('tbody tr').length, targetHostSetCount); await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, targetHostSetCount - 1); + assert.strictEqual(findAll('tbody tr').length, targetHostSetCount - 1); }); test('cannot remove a host set without proper authorization', async function (assert) { @@ -110,7 +110,7 @@ module('Acceptance | targets | host-sources', function (hooks) { }); const targetHostSetCount = instances.target.hostSets.length; await visit(urls.targetHostSources); - assert.equal(findAll('tbody tr').length, targetHostSetCount); + assert.strictEqual(findAll('tbody tr').length, targetHostSetCount); await click('tbody tr .rose-dropdown-button-danger'); assert.ok(find('[role="alert"]')); }); @@ -119,16 +119,16 @@ module('Acceptance | targets | host-sources', function (hooks) { assert.expect(3); instances.target.update({ hostSetIds: [] }); await visit(urls.targetHostSources); - assert.equal(findAll('tbody tr').length, 0); + assert.strictEqual(findAll('tbody tr').length, 0); await click('.rose-layout-page-actions a'); - assert.equal(currentURL(), urls.targetAddHostSources); + assert.strictEqual(currentURL(), urls.targetAddHostSources); // Click three times to select, unselect, then reselect (for coverage) await click('tbody label'); await click('tbody label'); await click('tbody label'); await click('form [type="submit"]'); await visit(urls.targetHostSources); - assert.equal(findAll('tbody tr').length, 1); + assert.strictEqual(findAll('tbody tr').length, 1); }); test('cannot add host sources without proper authorization', async function (assert) { @@ -145,16 +145,16 @@ module('Acceptance | targets | host-sources', function (hooks) { assert.expect(4); const targetHostSetCount = instances.target.hostSets.length; await visit(urls.targetHostSources); - assert.equal(findAll('tbody tr').length, targetHostSetCount); + assert.strictEqual(findAll('tbody tr').length, targetHostSetCount); // first, remove a target host set (otherwise none would be available to add) await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, targetHostSetCount - 1); + assert.strictEqual(findAll('tbody tr').length, targetHostSetCount - 1); await click('.rose-layout-page-actions a'); - assert.equal(currentURL(), urls.targetAddHostSources); + assert.strictEqual(currentURL(), urls.targetAddHostSources); await click('tbody label'); await click('form [type="button"]'); await visit(urls.targetHostSources); - assert.equal(findAll('tbody tr').length, targetHostSetCount - 1); + assert.strictEqual(findAll('tbody tr').length, targetHostSetCount - 1); }); test('adding a target host set which errors displays error messages', async function (assert) { @@ -173,11 +173,11 @@ module('Acceptance | targets | host-sources', function (hooks) { }); instances.target.update({ hostSetIds: [] }); await visit(urls.targetAddHostSources); - assert.equal(instances.target.hostSets.length, 0); - assert.equal(currentURL(), urls.targetAddHostSources); + assert.strictEqual(instances.target.hostSets.length, 0); + assert.strictEqual(currentURL(), urls.targetAddHostSources); await click('tbody label'); await click('form [type="submit"]'); - assert.equal(currentURL(), urls.targetAddHostSources); - assert.equal(instances.target.hostSets.length, 0); + assert.strictEqual(currentURL(), urls.targetAddHostSources); + assert.strictEqual(instances.target.hostSets.length, 0); }); }); diff --git a/ui/admin/tests/acceptance/targets/read-test.js b/ui/admin/tests/acceptance/targets/read-test.js index 232887d8d..5004a3002 100644 --- a/ui/admin/tests/acceptance/targets/read-test.js +++ b/ui/admin/tests/acceptance/targets/read-test.js @@ -60,10 +60,10 @@ module('Acceptance | targets | read', function (hooks) { assert.expect(2); await visit(urls.targets); await a11yAudit(); - assert.equal(currentURL(), urls.targets); + assert.strictEqual(currentURL(), urls.targets); await visit(urls.target); await a11yAudit(); - assert.equal(currentURL(), urls.target); + assert.strictEqual(currentURL(), urls.target); }); test('cannot navigate to target form without proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/targets/update-test.js b/ui/admin/tests/acceptance/targets/update-test.js index 8ee1c4ea9..f034a21e6 100644 --- a/ui/admin/tests/acceptance/targets/update-test.js +++ b/ui/admin/tests/acceptance/targets/update-test.js @@ -98,12 +98,12 @@ module('Acceptance | targets | update', function (hooks) { await fillIn('[name="name"]', 'random string'); await fillIn('[name="worker_filter"]', 'random filter'); await click('.rose-form-actions [type="submit"]'); - assert.equal(currentURL(), urls.target); - assert.equal( + assert.strictEqual(currentURL(), urls.target); + assert.strictEqual( this.server.schema.targets.all().models[0].name, 'random string' ); - assert.equal( + assert.strictEqual( this.server.schema.targets.all().models[0].workerFilter, 'random filter' ); @@ -116,7 +116,7 @@ module('Acceptance | targets | update', function (hooks) { await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); assert.notEqual(instances.target.name, 'random string'); - assert.equal(find('[name="name"]').value, instances.target.name); + assert.strictEqual(find('[name="name"]').value, instances.target.name); }); test('saving an existing target with invalid fields displays error messages', async function (assert) { @@ -162,13 +162,13 @@ module('Acceptance | targets | update', function (hooks) { await visit(urls.target); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), urls.target); + assert.strictEqual(currentURL(), urls.target); try { await visit(urls.targets); } catch (e) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:first-child'); - assert.equal(currentURL(), urls.targets); + assert.strictEqual(currentURL(), urls.targets); assert.notEqual( this.server.schema.targets.all().models[0].name, 'random string' @@ -184,13 +184,13 @@ module('Acceptance | targets | update', function (hooks) { await visit(urls.target); await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), urls.target); + assert.strictEqual(currentURL(), urls.target); try { await visit(urls.targets); } catch (e) { assert.ok(find('.rose-dialog')); await click('.rose-dialog-footer button:last-child'); - assert.equal(currentURL(), urls.target); + assert.strictEqual(currentURL(), urls.target); assert.notEqual( this.server.schema.targets.all().models[0].name, 'random string' diff --git a/ui/admin/tests/acceptance/users/accounts-test.js b/ui/admin/tests/acceptance/users/accounts-test.js index afae1e609..ff16d3473 100644 --- a/ui/admin/tests/acceptance/users/accounts-test.js +++ b/ui/admin/tests/acceptance/users/accounts-test.js @@ -57,16 +57,16 @@ module('Acceptance | users | accounts', function (hooks) { assert.expect(2); await visit(urls.accounts); await a11yAudit(); - assert.equal(currentURL(), urls.accounts); - assert.equal(findAll('tbody tr').length, accountsCount); + assert.strictEqual(currentURL(), urls.accounts); + assert.strictEqual(findAll('tbody tr').length, accountsCount); }); test('can remove an account', async function (assert) { assert.expect(2); await visit(urls.accounts); - assert.equal(findAll('tbody tr').length, accountsCount); + assert.strictEqual(findAll('tbody tr').length, accountsCount); await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, accountsCount - 1); + assert.strictEqual(findAll('tbody tr').length, accountsCount - 1); }); test('cannot remove an account without proper authorization', async function (assert) { @@ -94,7 +94,7 @@ module('Acceptance | users | accounts', function (hooks) { ); }); await visit(urls.accounts); - assert.equal(findAll('tbody tr').length, accountsCount); + assert.strictEqual(findAll('tbody tr').length, accountsCount); await click('tbody tr .rose-dropdown-button-danger'); assert.ok(find('[role="alert"]')); }); @@ -104,7 +104,7 @@ module('Acceptance | users | accounts', function (hooks) { await visit(urls.addAccounts); await visit(urls.addAccounts); await a11yAudit(); - assert.equal(currentURL(), urls.addAccounts); + assert.strictEqual(currentURL(), urls.addAccounts); }); test('can navigate to add accounts with proper authorization', async function (assert) { @@ -127,30 +127,30 @@ module('Acceptance | users | accounts', function (hooks) { assert.expect(3); instances.user.update({ accountIds: [] }); await visit(urls.accounts); - assert.equal(findAll('tbody tr').length, 0); + assert.strictEqual(findAll('tbody tr').length, 0); await click('.rose-layout-page-actions a'); - assert.equal(currentURL(), urls.addAccounts); + assert.strictEqual(currentURL(), urls.addAccounts); // Click three times to select, unselect, then reselect (for coverage) await click('tbody label'); await click('tbody label'); await click('tbody label'); await click('form [type="submit"]'); await visit(urls.accounts); - assert.equal(findAll('tbody tr').length, 1); + assert.strictEqual(findAll('tbody tr').length, 1); }); test('select and cancel accounts to add', async function (assert) { assert.expect(4); await visit(urls.accounts); - assert.equal(findAll('tbody tr').length, accountsCount); + assert.strictEqual(findAll('tbody tr').length, accountsCount); await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, accountsCount - 1); + assert.strictEqual(findAll('tbody tr').length, accountsCount - 1); await click('.rose-layout-page-actions a'); - assert.equal(currentURL(), urls.addAccounts); + assert.strictEqual(currentURL(), urls.addAccounts); await click('tbody label'); await click('form [type="button"]'); await visit(urls.accounts); - assert.equal(findAll('tbody tr').length, accountsCount - 1); + assert.strictEqual(findAll('tbody tr').length, accountsCount - 1); }); test('shows error message on account add', async function (assert) { diff --git a/ui/admin/tests/acceptance/users/create-test.js b/ui/admin/tests/acceptance/users/create-test.js index c20ab05bf..eb2331f5b 100644 --- a/ui/admin/tests/acceptance/users/create-test.js +++ b/ui/admin/tests/acceptance/users/create-test.js @@ -41,7 +41,7 @@ module('Acceptance | users | create', function (hooks) { await visit(newUserURL); await fillIn('[name="name"]', 'User name'); await click('[type="submit"]'); - assert.equal(this.server.db.users.length, usersCount + 1); + assert.strictEqual(this.server.db.users.length, usersCount + 1); }); test('Users can navigate to new users route with proper authorization', async function (assert) { @@ -67,8 +67,8 @@ module('Acceptance | users | create', function (hooks) { await visit(newUserURL); await fillIn('[name="name"]', 'User name'); await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), usersURL); - assert.equal(this.server.db.users.length, usersCount); + assert.strictEqual(currentURL(), usersURL); + assert.strictEqual(this.server.db.users.length, usersCount); }); test('saving a new user with invalid fields displays error messages', async function (assert) { @@ -95,12 +95,12 @@ module('Acceptance | users | create', function (hooks) { await visit(newUserURL); await fillIn('[name="name"]', 'User name'); await click('[type="submit"]'); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'The request was invalid.', 'Displays primary error message.' ); - assert.equal( + assert.strictEqual( find('.rose-form-error-message').textContent.trim(), 'Name is required.', 'Displays field-level errors.' diff --git a/ui/admin/tests/acceptance/users/delete-test.js b/ui/admin/tests/acceptance/users/delete-test.js index 2146278f6..c53782ea6 100644 --- a/ui/admin/tests/acceptance/users/delete-test.js +++ b/ui/admin/tests/acceptance/users/delete-test.js @@ -49,7 +49,7 @@ module('Acceptance | users | delete', function (hooks) { const usersCount = this.server.db.users.length; await visit(userURL); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(this.server.db.users.length, usersCount - 1); + assert.strictEqual(this.server.db.users.length, usersCount - 1); }); test('cannot delete a user without proper authorization', async function (assert) { @@ -77,7 +77,7 @@ module('Acceptance | users | delete', function (hooks) { }); await visit(userURL); await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'Oops.', 'Displays primary error message.' diff --git a/ui/admin/tests/acceptance/users/read-test.js b/ui/admin/tests/acceptance/users/read-test.js index 06b9f4880..fee75d0cb 100644 --- a/ui/admin/tests/acceptance/users/read-test.js +++ b/ui/admin/tests/acceptance/users/read-test.js @@ -44,7 +44,7 @@ module('Acceptance | users | read', function (hooks) { assert.expect(1); await visit(usersURL); await a11yAudit(); - assert.equal(currentURL(), usersURL); + assert.strictEqual(currentURL(), usersURL); }); test('cannot navigate to an account form without proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/users/update-test.js b/ui/admin/tests/acceptance/users/update-test.js index f7f448156..72e9226de 100644 --- a/ui/admin/tests/acceptance/users/update-test.js +++ b/ui/admin/tests/acceptance/users/update-test.js @@ -50,8 +50,8 @@ module('Acceptance | users | update', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'Updated user name'); await click('.rose-form-actions [type="submit"]'); - assert.equal(currentURL(), userURL); - assert.equal(this.server.db.users[0].name, 'Updated user name'); + assert.strictEqual(currentURL(), userURL); + assert.strictEqual(this.server.db.users[0].name, 'Updated user name'); }); test('cannot make changes to an existing user without proper authorization', async function (assert) { @@ -96,12 +96,12 @@ module('Acceptance | users | update', function (hooks) { await click('form [type="button"]', 'Activate edit mode'); await fillIn('[name="name"]', 'User name'); await click('[type="submit"]'); - assert.equal( + assert.strictEqual( find('.rose-notification-body').textContent.trim(), 'The request was invalid.', 'Displays primary error message.' ); - assert.equal( + assert.strictEqual( find('.rose-form-error-message').textContent.trim(), 'Name is required.', 'Displays field-level errors.' diff --git a/ui/admin/tests/integration/components/copyable-test.js b/ui/admin/tests/integration/components/copyable-test.js index f00a0b00a..c123c1aa4 100644 --- a/ui/admin/tests/integration/components/copyable-test.js +++ b/ui/admin/tests/integration/components/copyable-test.js @@ -11,7 +11,7 @@ module('Integration | Component | copyable', function (hooks) { hbs`text` ); assert.ok(find('.copyable')); - assert.equal(find('.copyable-content').textContent.trim(), 'text'); - assert.equal(find('.copyable-button').textContent.trim(), 'Copy me'); + assert.strictEqual(find('.copyable-content').textContent.trim(), 'text'); + assert.strictEqual(find('.copyable-button').textContent.trim(), 'Copy me'); }); }); diff --git a/ui/admin/tests/unit/services/window-manager-test.js b/ui/admin/tests/unit/services/window-manager-test.js index f0489bdc9..22f580740 100644 --- a/ui/admin/tests/unit/services/window-manager-test.js +++ b/ui/admin/tests/unit/services/window-manager-test.js @@ -15,7 +15,7 @@ module('Unit | Service | window-manager', function (hooks) { 'service:browser/window', class extends Service { open(url) { - assert.equal(url, fakeURL); + assert.strictEqual(url, fakeURL); } } ); diff --git a/ui/desktop/package.json b/ui/desktop/package.json index 492463855..18dec1fd7 100755 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -99,11 +99,11 @@ "ember-template-lint": "^3.7.0", "ember-template-lint-plugin-prettier": "^2.0.0", "ember-wormhole": "^0.6.0", - "eslint": "^8.12.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-ember": "^10.5.9", + "eslint": "^8.18.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-ember": "^10.6.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-qunit": "^6.2.0", + "eslint-plugin-qunit": "^7.3.0", "faker": "^5.5.3", "js-bexpr": "hashicorp/js-bexpr#9b4a4b54d85eba67fdfc0990133d1518d890b1e1", "loader.js": "^4.7.0", diff --git a/ui/desktop/tests/acceptance/authentication-test.js b/ui/desktop/tests/acceptance/authentication-test.js index bc48a1f33..49b581401 100644 --- a/ui/desktop/tests/acceptance/authentication-test.js +++ b/ui/desktop/tests/acceptance/authentication-test.js @@ -132,7 +132,7 @@ module('Acceptance | authentication', function (hooks) { await visit(urls.index); await a11yAudit(); assert.notOk(currentSession().isAuthenticated); - assert.equal(currentURL(), urls.authenticate.methods.global); + assert.strictEqual(currentURL(), urls.authenticate.methods.global); }); test('visiting authenticate route when there no methods shows a message', async function (assert) { @@ -140,7 +140,7 @@ module('Acceptance | authentication', function (hooks) { instances.authMethods.global.destroy(); await visit(urls.authenticate.global); await a11yAudit(); - assert.equal(currentURL(), urls.authenticate.global); + assert.strictEqual(currentURL(), urls.authenticate.global); assert.ok(find('.rose-message')); }); @@ -149,7 +149,7 @@ module('Acceptance | authentication', function (hooks) { this.owner.lookup('service:origin').rendererOrigin = null; await visit(urls.authenticate.global); await a11yAudit(); - assert.equal(currentURL(), urls.origin); + assert.strictEqual(currentURL(), urls.origin); }); test('visiting authenticate route when the scope cannot be loaded is allowed', async function (assert) { @@ -159,7 +159,7 @@ module('Acceptance | authentication', function (hooks) { }); await visit(urls.authenticate.global); await a11yAudit(); - assert.equal(currentURL(), urls.authenticate.methods.global); + assert.strictEqual(currentURL(), urls.authenticate.methods.global); }); test('failed authentication shows a notification message', async function (assert) { @@ -176,7 +176,7 @@ module('Acceptance | authentication', function (hooks) { assert.expect(1); await visit(urls.authenticate.methods.global); await click('.change-origin a'); - assert.equal(currentURL(), urls.origin); + assert.strictEqual(currentURL(), urls.origin); }); test('signing out redirects to first global authenticate method', async function (assert) { @@ -187,7 +187,7 @@ module('Acceptance | authentication', function (hooks) { await click('[type="submit"]'); assert.ok(currentSession().isAuthenticated); await click('.rose-header-utilities .rose-dropdown summary'); - assert.equal( + assert.strictEqual( find( '.rose-header-utilities .rose-dropdown-content button' ).textContent.trim(), @@ -235,12 +235,12 @@ module('Acceptance | authentication', function (hooks) { assert.notOk(getRootElement().classList.contains('rose-theme-dark')); // toggle light mode await click('[name="theme"][value="light"]'); - assert.equal(currentSession().get('data.theme'), 'light'); + assert.strictEqual(currentSession().get('data.theme'), 'light'); assert.ok(getRootElement().classList.contains('rose-theme-light')); assert.notOk(getRootElement().classList.contains('rose-theme-dark')); // toggle dark mode await click('[name="theme"][value="dark"]'); - assert.equal(currentSession().get('data.theme'), 'dark'); + assert.strictEqual(currentSession().get('data.theme'), 'dark'); assert.notOk(getRootElement().classList.contains('rose-theme-light')); assert.ok(getRootElement().classList.contains('rose-theme-dark')); // toggle system default diff --git a/ui/desktop/tests/acceptance/origin-test.js b/ui/desktop/tests/acceptance/origin-test.js index 6eb0c5d22..2c34ebd0e 100644 --- a/ui/desktop/tests/acceptance/origin-test.js +++ b/ui/desktop/tests/acceptance/origin-test.js @@ -119,7 +119,7 @@ module('Acceptance | origin', function (hooks) { assert.expect(1); await visit(urls.origin); await a11yAudit(); - assert.equal(currentURL(), urls.origin); + assert.strictEqual(currentURL(), urls.origin); }); test('visiting index without an origin specified redirects to origin route', async function (assert) { @@ -127,7 +127,7 @@ module('Acceptance | origin', function (hooks) { await visit(urls.index); await a11yAudit(); assert.notOk(mockIPC.origin); - assert.equal(currentURL(), urls.origin); + assert.strictEqual(currentURL(), urls.origin); }); test('can set origin', async function (assert) { @@ -136,8 +136,8 @@ module('Acceptance | origin', function (hooks) { await visit(urls.origin); await fillIn('[name="host"]', currentOrigin); await click('[type="submit"]'); - assert.equal(currentURL(), urls.authenticate.methods.global); - assert.equal(mockIPC.origin, currentOrigin); + assert.strictEqual(currentURL(), urls.authenticate.methods.global); + assert.strictEqual(mockIPC.origin, currentOrigin); }); test('can reset origin before authentication', async function (assert) { @@ -146,10 +146,10 @@ module('Acceptance | origin', function (hooks) { await visit(urls.origin); await fillIn('[name="host"]', currentOrigin); await click('[type="submit"]'); - assert.equal(currentURL(), urls.authenticate.methods.global); - assert.equal(mockIPC.origin, currentOrigin); + assert.strictEqual(currentURL(), urls.authenticate.methods.global); + assert.strictEqual(mockIPC.origin, currentOrigin); await click('.change-origin a'); - assert.equal(currentURL(), urls.origin); + assert.strictEqual(currentURL(), urls.origin); }); test('captures error on origin update', async function (assert) { @@ -166,7 +166,7 @@ module('Acceptance | origin', function (hooks) { assert.expect(1); config.autoOrigin = true; await visit(urls.origin); - assert.equal(find('[name="host"]').value, currentOrigin); + assert.strictEqual(find('[name="host"]').value, currentOrigin); config.autoOrigin = false; }); @@ -185,9 +185,9 @@ module('Acceptance | origin', function (hooks) { await click('[type="submit"]', 'Set origin'); await click('[type="submit"]', 'Authenticate'); assert.ok(currentSession().isAuthenticated); - assert.equal(find('main section button').textContent.trim(), 'Disconnect'); + assert.strictEqual(find('main section button').textContent.trim(), 'Disconnect'); await click('main section button'); assert.notOk(currentSession().isAuthenticated); - assert.equal(currentURL(), urls.authenticate.methods.global); + assert.strictEqual(currentURL(), urls.authenticate.methods.global); }); }); diff --git a/ui/desktop/tests/acceptance/projects-test.js b/ui/desktop/tests/acceptance/projects-test.js index 3f6dd5506..f597b4921 100644 --- a/ui/desktop/tests/acceptance/projects-test.js +++ b/ui/desktop/tests/acceptance/projects-test.js @@ -112,13 +112,13 @@ module('Acceptance | projects', function (hooks) { await visit(urls.projects); await a11yAudit(); assert.notOk(currentSession().isAuthenticated); - assert.equal(currentURL(), urls.authenticate.methods.global); + assert.strictEqual(currentURL(), urls.authenticate.methods.global); }); test('visiting index', async function (assert) { assert.expect(1); await visit(urls.projects); await a11yAudit(); - assert.equal(currentURL(), urls.projects); + assert.strictEqual(currentURL(), urls.projects); }); }); diff --git a/ui/desktop/tests/acceptance/projects/sessions-test.js b/ui/desktop/tests/acceptance/projects/sessions-test.js index e2e4db9e0..ee5a50611 100644 --- a/ui/desktop/tests/acceptance/projects/sessions-test.js +++ b/ui/desktop/tests/acceptance/projects/sessions-test.js @@ -160,15 +160,15 @@ module('Acceptance | projects | sessions', function (hooks) { await visit(urls.sessions); await a11yAudit(); assert.notOk(currentSession().isAuthenticated); - assert.equal(currentURL(), urls.authenticate.methods.global); + assert.strictEqual(currentURL(), urls.authenticate.methods.global); }); test('visiting index', async function (assert) { assert.expect(2); const sessionsCount = this.server.schema.sessions.all().models.length; await visit(urls.sessions); - assert.equal(currentURL(), urls.sessions); - assert.equal(findAll('tbody tr').length, sessionsCount); + assert.strictEqual(currentURL(), urls.sessions); + assert.strictEqual(findAll('tbody tr').length, sessionsCount); }); test('visiting empty sessions', async function (assert) { @@ -188,8 +188,8 @@ module('Acceptance | projects | sessions', function (hooks) { const sessionsCount = this.server.schema.sessions.all().models.length; await visit(urls.sessions); await a11yAudit(); - assert.equal(currentURL(), urls.sessions); - assert.equal(findAll('tbody tr').length, sessionsCount); + assert.strictEqual(currentURL(), urls.sessions); + assert.strictEqual(findAll('tbody tr').length, sessionsCount); }); test('can identify active sessions', async function (assert) { diff --git a/ui/desktop/tests/acceptance/projects/targets-test.js b/ui/desktop/tests/acceptance/projects/targets-test.js index 7e14124e9..e91d0db74 100644 --- a/ui/desktop/tests/acceptance/projects/targets-test.js +++ b/ui/desktop/tests/acceptance/projects/targets-test.js @@ -167,7 +167,7 @@ module('Acceptance | projects | targets', function (hooks) { await visit(urls.targets); await a11yAudit(); assert.notOk(currentSession().isAuthenticated); - assert.equal(currentURL(), urls.authenticate.methods.global); + assert.strictEqual(currentURL(), urls.authenticate.methods.global); }); test('visiting index', async function (assert) { @@ -175,22 +175,22 @@ module('Acceptance | projects | targets', function (hooks) { const targetsCount = this.server.schema.targets.all().models.length; await visit(urls.targets); await a11yAudit(); - assert.equal(currentURL(), urls.targets); - assert.equal(findAll('tbody tr').length, targetsCount); + assert.strictEqual(currentURL(), urls.targets); + assert.strictEqual(findAll('tbody tr').length, targetsCount); }); test('visiting a target', async function (assert) { assert.expect(1); await visit(urls.targets); await click('tbody tr th a'); - assert.equal(currentURL(), urls.sessions); + assert.strictEqual(currentURL(), urls.sessions); }); test('visiting empty targets', async function (assert) { assert.expect(1); this.server.get('/targets', () => new Response(200)); await visit(urls.targets); - assert.equal( + assert.strictEqual( find('.rose-message-title').textContent.trim(), 'No Targets Available' ); @@ -221,13 +221,13 @@ module('Acceptance | projects | targets', function (hooks) { 'Activate connect mode' ); assert.ok(find('.dialog-detail'), 'Success dialog'); - assert.equal(findAll('.rose-dialog-footer button').length, 1); - assert.equal( + assert.strictEqual(findAll('.rose-dialog-footer button').length, 1); + assert.strictEqual( find('.rose-dialog-footer button').textContent.trim(), 'Close', 'Cannot retry' ); - assert.equal( + assert.strictEqual( find('.rose-dialog-body .copyable-content').textContent.trim(), 'a_123:p_123' ); @@ -307,9 +307,9 @@ module('Acceptance | projects | targets', function (hooks) { ); assert.ok(find('.rose-dialog-error'), 'Error dialog'); const dialogButtons = findAll('.rose-dialog-footer button'); - assert.equal(dialogButtons.length, 2); - assert.equal(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); - assert.equal(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); + assert.strictEqual(dialogButtons.length, 2); + assert.strictEqual(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); + assert.strictEqual(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); }); test('handles connect error', async function (assert) { @@ -325,9 +325,9 @@ module('Acceptance | projects | targets', function (hooks) { ); assert.ok(find('.rose-dialog-error'), 'Error dialog'); const dialogButtons = findAll('.rose-dialog-footer button'); - assert.equal(dialogButtons.length, 2); - assert.equal(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); - assert.equal(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); + assert.strictEqual(dialogButtons.length, 2); + assert.strictEqual(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); + assert.strictEqual(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); }); test('can retry on error', async function (assert) { diff --git a/ui/desktop/tests/acceptance/projects/targets/hosts-test.js b/ui/desktop/tests/acceptance/projects/targets/hosts-test.js index 3b6fda1ea..1cd4ecd37 100644 --- a/ui/desktop/tests/acceptance/projects/targets/hosts-test.js +++ b/ui/desktop/tests/acceptance/projects/targets/hosts-test.js @@ -168,7 +168,7 @@ module('Acceptance | projects | targets | hosts', function (hooks) { await visit(urls.hosts); await a11yAudit(); assert.notOk(currentSession().isAuthenticated); - assert.equal(currentURL(), urls.authenticate.methods.global); + assert.strictEqual(currentURL(), urls.authenticate.methods.global); }); test('visiting index', async function (assert) { @@ -182,8 +182,8 @@ module('Acceptance | projects | targets | hosts', function (hooks) { later(async () => { run.cancelTimers(); // await a11yAudit(); - assert.equal(currentURL(), urls.hosts); - assert.equal(findAll('tbody tr').length, hostsCount); + assert.strictEqual(currentURL(), urls.hosts); + assert.strictEqual(findAll('tbody tr').length, hostsCount); }, 750); await visit(urls.hosts); }); @@ -220,12 +220,12 @@ module('Acceptance | projects | targets | hosts', function (hooks) { 'Activate connect mode' ); assert.ok(find('.dialog-detail'), 'Success dialog'); - assert.equal( + assert.strictEqual( find('.rose-dialog-footer .rose-button-secondary').textContent.trim(), 'Close', 'Cannot retry' ); - assert.equal( + assert.strictEqual( find('.rose-dialog-body .copyable-content').textContent.trim(), 'a_123:p_123' ); @@ -247,9 +247,9 @@ module('Acceptance | projects | targets | hosts', function (hooks) { ); assert.ok(find('.rose-dialog-error'), 'Error dialog'); const dialogButtons = findAll('.rose-dialog-footer button'); - assert.equal(dialogButtons.length, 2); - assert.equal(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); - assert.equal(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); + assert.strictEqual(dialogButtons.length, 2); + assert.strictEqual(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); + assert.strictEqual(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); }, 750); await visit(urls.hosts); }); @@ -269,9 +269,9 @@ module('Acceptance | projects | targets | hosts', function (hooks) { ); assert.ok(find('.rose-dialog-error'), 'Error dialog'); const dialogButtons = findAll('.rose-dialog-footer button'); - assert.equal(dialogButtons.length, 2); - assert.equal(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); - assert.equal(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); + assert.strictEqual(dialogButtons.length, 2); + assert.strictEqual(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); + assert.strictEqual(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); }, 750); await visit(urls.hosts); }); diff --git a/ui/desktop/tests/acceptance/projects/targets/sessions-test.js b/ui/desktop/tests/acceptance/projects/targets/sessions-test.js index f687be5d1..e88530434 100644 --- a/ui/desktop/tests/acceptance/projects/targets/sessions-test.js +++ b/ui/desktop/tests/acceptance/projects/targets/sessions-test.js @@ -173,7 +173,7 @@ module('Acceptance | projects | targets | sessions', function (hooks) { await visit(urls.sessions); await a11yAudit(); assert.notOk(currentSession().isAuthenticated); - assert.equal(currentURL(), urls.authenticate.methods.global); + assert.strictEqual(currentURL(), urls.authenticate.methods.global); }); test('visiting index', async function (assert) { @@ -187,8 +187,8 @@ module('Acceptance | projects | targets | sessions', function (hooks) { later(async () => { run.cancelTimers(); // await a11yAudit(); - assert.equal(currentURL(), urls.sessions); - assert.equal(findAll('tbody tr').length, sessionsCount); + assert.strictEqual(currentURL(), urls.sessions); + assert.strictEqual(findAll('tbody tr').length, sessionsCount); }, 750); await visit(urls.sessions); }); @@ -198,7 +198,7 @@ module('Acceptance | projects | targets | sessions', function (hooks) { later(async () => { run.cancelTimers(); // await a11yAudit(); - assert.equal(currentURL(), urls.sessions); + assert.strictEqual(currentURL(), urls.sessions); }, 750); await visit(urls.target); }); @@ -253,7 +253,7 @@ module('Acceptance | projects | targets | sessions', function (hooks) { run.cancelTimers(); await click('tbody tr:first-child td:last-child button'); assert.ok(find('[role="alert"].is-success')); - assert.equal(findAll('tbody tr').length, sessionsCount - 1); + assert.strictEqual(findAll('tbody tr').length, sessionsCount - 1); }, 750); await visit(urls.sessions); }); @@ -296,12 +296,12 @@ module('Acceptance | projects | targets | sessions', function (hooks) { run.cancelTimers(); await click('.rose-layout-page-actions button', 'Activate connect mode'); assert.ok(find('.dialog-detail'), 'Success dialog'); - assert.equal( + assert.strictEqual( find('.rose-dialog-footer .rose-button-secondary').textContent.trim(), 'Close', 'Cannot retry' ); - assert.equal( + assert.strictEqual( find('.rose-dialog-body .copyable-content').textContent.trim(), 'a_123:p_123' ); @@ -327,7 +327,7 @@ module('Acceptance | projects | targets | sessions', function (hooks) { await click('.rose-layout-page-actions button', 'Activate connect mode'); assert.ok(find('.dialog-detail'), 'Success dialog'); await click('.rose-dialog-dismiss'); - assert.equal( + assert.strictEqual( find( 'tbody tr:first-child td:nth-child(2) .copyable-content' ).textContent.trim(), @@ -348,9 +348,9 @@ module('Acceptance | projects | targets | sessions', function (hooks) { await click('.rose-layout-page-actions button', 'Activate connect mode'); assert.ok(find('.rose-dialog-error'), 'Error dialog'); const dialogButtons = findAll('.rose-dialog-footer button'); - assert.equal(dialogButtons.length, 2); - assert.equal(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); - assert.equal(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); + assert.strictEqual(dialogButtons.length, 2); + assert.strictEqual(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); + assert.strictEqual(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); }, 750); await visit(urls.sessions); }); @@ -367,9 +367,9 @@ module('Acceptance | projects | targets | sessions', function (hooks) { await click('.rose-layout-page-actions button', 'Activate connect mode'); assert.ok(find('.rose-dialog-error'), 'Error dialog'); const dialogButtons = findAll('.rose-dialog-footer button'); - assert.equal(dialogButtons.length, 2); - assert.equal(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); - assert.equal(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); + assert.strictEqual(dialogButtons.length, 2); + assert.strictEqual(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); + assert.strictEqual(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); }, 750); await visit(urls.sessions); }); diff --git a/ui/desktop/tests/acceptance/scopes-test.js b/ui/desktop/tests/acceptance/scopes-test.js index 71907a984..b66285322 100644 --- a/ui/desktop/tests/acceptance/scopes-test.js +++ b/ui/desktop/tests/acceptance/scopes-test.js @@ -185,8 +185,8 @@ module('Acceptance | scopes', function (hooks) { later(async () => { run.cancelTimers(); await a11yAudit(); - assert.equal(currentURL(), urls.targets); - assert.equal(findAll('tbody tr').length, targetsCount); + assert.strictEqual(currentURL(), urls.targets); + assert.strictEqual(findAll('tbody tr').length, targetsCount); }, 750); await visit(urls.targets); }); @@ -196,7 +196,7 @@ module('Acceptance | scopes', function (hooks) { later(async () => { run.cancelTimers(); await a11yAudit(); - assert.equal(currentURL(), urls.globalTargets); + assert.strictEqual(currentURL(), urls.globalTargets); }, 750); await visit(urls.scopes.global); }); @@ -215,7 +215,7 @@ module('Acceptance | scopes', function (hooks) { later(async () => { run.cancelTimers(); await a11yAudit(); - assert.equal(currentURL(), urls.globalTargets); + assert.strictEqual(currentURL(), urls.globalTargets); }, 750); await visit(urls.scopes.global); }); @@ -225,7 +225,7 @@ module('Acceptance | scopes', function (hooks) { later(async () => { run.cancelTimers(); await a11yAudit(); - assert.equal(currentURL(), urls.targets); + assert.strictEqual(currentURL(), urls.targets); }, 750); await visit(urls.scopes.org); }); @@ -234,11 +234,11 @@ module('Acceptance | scopes', function (hooks) { assert.expect(3); await later(async () => run.cancelTimers(), 750); await visit(urls.targets); - await later(async () => assert.equal(currentURL(), urls.targets), 750); + await later(async () => assert.strictEqual(currentURL(), urls.targets), 750); await click('.rose-header-nav .rose-dropdown a:nth-of-type(2)'); - await later(async () => assert.equal(currentURL(), urls.org2Targets), 750); + await later(async () => assert.strictEqual(currentURL(), urls.org2Targets), 750); await click('.rose-header-nav .rose-dropdown a:nth-of-type(3)'); - later(async () => assert.equal(currentURL(), urls.globalTargets), 750); + later(async () => assert.strictEqual(currentURL(), urls.globalTargets), 750); await click('.rose-header-nav .rose-dropdown a:nth-of-type(1)'); }); @@ -248,7 +248,7 @@ module('Acceptance | scopes', function (hooks) { await visit(urls.targets); await a11yAudit(); assert.notOk(currentSession().isAuthenticated); - assert.equal(currentURL(), urls.authenticate.methods.global); + assert.strictEqual(currentURL(), urls.authenticate.methods.global); }); test('visiting a target', async function (assert) { @@ -256,7 +256,7 @@ module('Acceptance | scopes', function (hooks) { later(async () => { run.cancelTimers(); await click('tbody tr th a'); - assert.equal(currentURL(), urls.targetSessions); + assert.strictEqual(currentURL(), urls.targetSessions); }, 750); await visit(urls.targets); }); @@ -293,8 +293,8 @@ module('Acceptance | scopes', function (hooks) { 'Activate connect mode' ); assert.ok(find('.dialog-detail'), 'Success dialog'); - assert.equal(findAll('.rose-dialog-footer button').length, 1); - assert.equal( + assert.strictEqual(findAll('.rose-dialog-footer button').length, 1); + assert.strictEqual( find('.rose-dialog-footer button').textContent.trim(), 'Close', 'Cannot retry' @@ -317,9 +317,9 @@ module('Acceptance | scopes', function (hooks) { ); assert.ok(find('.rose-dialog-error'), 'Error dialog'); const dialogButtons = findAll('.rose-dialog-footer button'); - assert.equal(dialogButtons.length, 2); - assert.equal(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); - assert.equal(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); + assert.strictEqual(dialogButtons.length, 2); + assert.strictEqual(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); + assert.strictEqual(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); }, 750); await visit(urls.scopes.global); }); @@ -339,9 +339,9 @@ module('Acceptance | scopes', function (hooks) { ); assert.ok(find('.rose-dialog-error'), 'Error dialog'); const dialogButtons = findAll('.rose-dialog-footer button'); - assert.equal(dialogButtons.length, 2); - assert.equal(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); - assert.equal(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); + assert.strictEqual(dialogButtons.length, 2); + assert.strictEqual(dialogButtons[0].textContent.trim(), 'Retry', 'Can retry'); + assert.strictEqual(dialogButtons[1].textContent.trim(), 'Cancel', 'Can cancel'); }, 750); await visit(urls.targets); }); diff --git a/ui/desktop/tests/acceptance/targets-test.js b/ui/desktop/tests/acceptance/targets-test.js index 1e8967543..95a8899a5 100644 --- a/ui/desktop/tests/acceptance/targets-test.js +++ b/ui/desktop/tests/acceptance/targets-test.js @@ -113,7 +113,7 @@ module('Acceptance | targets', function (hooks) { await visit(urls.targets); await a11yAudit(); assert.notOk(currentSession().isAuthenticated); - assert.equal(currentURL(), urls.authenticate.methods.global); + assert.strictEqual(currentURL(), urls.authenticate.methods.global); }); test('visiting index', async function (assert) { @@ -126,7 +126,7 @@ module('Acceptance | targets', function (hooks) { later(async () => { run.cancelTimers(); await a11yAudit(); - assert.equal(currentURL(), urls.targets); + assert.strictEqual(currentURL(), urls.targets); }, 750); await visit(urls.targets); }); diff --git a/ui/desktop/tests/integration/components/branded-card-test.js b/ui/desktop/tests/integration/components/branded-card-test.js index cc537772d..3fb538e38 100644 --- a/ui/desktop/tests/integration/components/branded-card-test.js +++ b/ui/desktop/tests/integration/components/branded-card-test.js @@ -18,8 +18,8 @@ module('Integration | Component | branded-card', function (hooks) { @title="title" @description="description" />`); - assert.equal(find('.branded-card-title').textContent.trim(), 'title'); - assert.equal( + assert.strictEqual(find('.branded-card-title').textContent.trim(), 'title'); + assert.strictEqual( find('.branded-card-description').textContent.trim(), 'description' ); diff --git a/ui/desktop/tests/integration/components/card-test.js b/ui/desktop/tests/integration/components/card-test.js index fb73ab59b..6027d774c 100644 --- a/ui/desktop/tests/integration/components/card-test.js +++ b/ui/desktop/tests/integration/components/card-test.js @@ -40,6 +40,6 @@ module('Integration | Component | card', function (hooks) { assert.ok(find('.card')); assert.ok(find('.card-header')); assert.ok(find('.card-header .rose-icon')); - assert.equal(this.element.textContent.trim(), 'This is a heading test'); + assert.strictEqual(this.element.textContent.trim(), 'This is a heading test'); }); }); diff --git a/ui/desktop/tests/integration/components/copyable-test.js b/ui/desktop/tests/integration/components/copyable-test.js index f00a0b00a..c123c1aa4 100644 --- a/ui/desktop/tests/integration/components/copyable-test.js +++ b/ui/desktop/tests/integration/components/copyable-test.js @@ -11,7 +11,7 @@ module('Integration | Component | copyable', function (hooks) { hbs`text` ); assert.ok(find('.copyable')); - assert.equal(find('.copyable-content').textContent.trim(), 'text'); - assert.equal(find('.copyable-button').textContent.trim(), 'Copy me'); + assert.strictEqual(find('.copyable-content').textContent.trim(), 'text'); + assert.strictEqual(find('.copyable-button').textContent.trim(), 'Copy me'); }); }); diff --git a/ui/desktop/tests/integration/components/hidden-secret-test.js b/ui/desktop/tests/integration/components/hidden-secret-test.js index dff98cf57..cd9a73d7f 100644 --- a/ui/desktop/tests/integration/components/hidden-secret-test.js +++ b/ui/desktop/tests/integration/components/hidden-secret-test.js @@ -13,7 +13,7 @@ module('Integration | Component | hidden-secret', function (hooks) { `); assert.ok(find('.hidden-secret')); - assert.equal( + assert.strictEqual( find('.hidden-secret > span > span').textContent.trim(), '■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■' ); diff --git a/ui/desktop/tests/integration/helpers/group-by-test.js b/ui/desktop/tests/integration/helpers/group-by-test.js index 88b90ad02..42a22488b 100644 --- a/ui/desktop/tests/integration/helpers/group-by-test.js +++ b/ui/desktop/tests/integration/helpers/group-by-test.js @@ -25,6 +25,6 @@ module('Integration | Helper | group-by', function (hooks) { `); - assert.equal(findAll('li').length, 3); + assert.strictEqual(findAll('li').length, 3); }); }); diff --git a/ui/desktop/tests/integration/helpers/raw-json-test.js b/ui/desktop/tests/integration/helpers/raw-json-test.js index 34574a8a5..a705ad321 100644 --- a/ui/desktop/tests/integration/helpers/raw-json-test.js +++ b/ui/desktop/tests/integration/helpers/raw-json-test.js @@ -9,9 +9,9 @@ module('Integration | Helper | raw-json', function (hooks) { test('it renders', async function (assert) { this.set('inputValue', {}); await render(hbs`{{raw-json inputValue}}`); - assert.equal(this.element.textContent.trim(), '{}'); + assert.strictEqual(this.element.textContent.trim(), '{}'); this.set('inputValue', { key: 'value', nestedKey: { key: 'value' } }); - assert.equal( + assert.strictEqual( this.element.textContent.trim(), `{\n "key": "value",\n "nestedKey": {\n "key": "value"\n }\n}` ); diff --git a/ui/desktop/tests/unit/services/ipc-test.js b/ui/desktop/tests/unit/services/ipc-test.js index 2e3ab6ae3..d1f809589 100644 --- a/ui/desktop/tests/unit/services/ipc-test.js +++ b/ui/desktop/tests/unit/services/ipc-test.js @@ -38,15 +38,15 @@ module('Unit | Service | ipc', function (hooks) { assert.expect(1); const service = this.owner.lookup('service:ipc'); const request = service.invoke('hello', 'world', 'http://localhost:4200'); - assert.equal(request.constructor, IPCRequest); + assert.strictEqual(request.constructor, IPCRequest); }); test('IPCRequest objects post messages on their window objects', function (assert) { assert.expect(2); const myWindow = { postMessage(request) { - assert.equal(request.method, 'hello'); - assert.equal(request.payload, 'world'); + assert.strictEqual(request.method, 'hello'); + assert.strictEqual(request.payload, 'world'); }, MessageChannel: MessageChannelMock, }; diff --git a/ui/desktop/tests/unit/services/origin-test.js b/ui/desktop/tests/unit/services/origin-test.js index 7c759713f..6d44fe948 100644 --- a/ui/desktop/tests/unit/services/origin-test.js +++ b/ui/desktop/tests/unit/services/origin-test.js @@ -16,12 +16,12 @@ module('Unit | Service | origin', function (hooks) { assert.expect(4); const ipcServiceStubbed = sinon.stub(ipcService, 'invoke'); await service.setOrigin(window.location.origin); - assert.equal(service.rendererOrigin, window.location.origin); - assert.equal(service.adapter.host, window.location.origin); + assert.strictEqual(service.rendererOrigin, window.location.origin); + assert.strictEqual(service.adapter.host, window.location.origin); ipcServiceStubbed.withArgs('setOrigin').rejects(); service.setOrigin('invalid-origin').catch(() => { assert.notOk(service.rendererOrigin); - assert.equal(service.adapter.host, window.location.origin); + assert.strictEqual(service.adapter.host, window.location.origin); }); }); @@ -29,21 +29,21 @@ module('Unit | Service | origin', function (hooks) { assert.expect(4); sinon.stub(ipcService, 'invoke'); await service.setOrigin(`${window.location.origin}/`); - assert.equal(service.rendererOrigin, window.location.origin); - assert.equal(service.adapter.host, window.location.origin); + assert.strictEqual(service.rendererOrigin, window.location.origin); + assert.strictEqual(service.adapter.host, window.location.origin); await service.setOrigin(`${window.location.origin}//////`); - assert.equal(service.rendererOrigin, window.location.origin); - assert.equal(service.adapter.host, window.location.origin); + assert.strictEqual(service.rendererOrigin, window.location.origin); + assert.strictEqual(service.adapter.host, window.location.origin); }); test('trim spaces from origin on setOrigin', async function (assert) { assert.expect(4); sinon.stub(ipcService, 'invoke'); await service.setOrigin(` ${window.location.origin}/ `); - assert.equal(service.rendererOrigin, window.location.origin); - assert.equal(service.adapter.host, window.location.origin); + assert.strictEqual(service.rendererOrigin, window.location.origin); + assert.strictEqual(service.adapter.host, window.location.origin); await service.setOrigin(` ${window.location.origin} `); - assert.equal(service.rendererOrigin, window.location.origin); - assert.equal(service.adapter.host, window.location.origin); + assert.strictEqual(service.rendererOrigin, window.location.origin); + assert.strictEqual(service.adapter.host, window.location.origin); }); }); diff --git a/yarn.lock b/yarn.lock index 25f47621c..f084ba150 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3587,19 +3587,19 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@eslint/eslintrc@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.2.1.tgz#8b5e1c49f4077235516bc9ec7d41378c0f69b8c6" - integrity sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ== +"@eslint/eslintrc@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" + integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.3.1" - globals "^13.9.0" + espree "^9.3.2" + globals "^13.15.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" - minimatch "^3.0.4" + minimatch "^3.1.2" strip-json-comments "^3.1.1" "@formatjs/ecma402-abstract@1.6.4": @@ -6521,7 +6521,7 @@ acorn-jsx@^3.0.0: dependencies: acorn "^3.0.4" -acorn-jsx@^5.3.1: +acorn-jsx@^5.3.1, acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== @@ -6561,10 +6561,10 @@ acorn@^8.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2" integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q== -acorn@^8.7.0: - version "8.7.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" - integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== +acorn@^8.7.1: + version "8.7.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" + integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== address@1.1.2, address@^1.0.1: version "1.1.2" @@ -12476,15 +12476,15 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-config-prettier@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" - integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== +eslint-config-prettier@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" + integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== -eslint-plugin-ember@^10.5.9: - version "10.5.9" - resolved "https://registry.yarnpkg.com/eslint-plugin-ember/-/eslint-plugin-ember-10.5.9.tgz#4071ac135c7207c7d4942e9fa75b710214885469" - integrity sha512-kJsdAaKNcfRvZBZ+YZ67pxxUgl+aPLFAnoFJNwTo+BsaptiOCsHUEc4xUKXiInH2BJOC6mg0FQcZKn1a6gwKrA== +eslint-plugin-ember@^10.6.1: + version "10.6.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-ember/-/eslint-plugin-ember-10.6.1.tgz#04ea84cc82307f64a2faa4f2855b30e5ebf9f722" + integrity sha512-R+TN3jwhYQ2ytZCA1VkfJDZSGgHFOHjsHU1DrBlRXYRepThe56PpuGxywAyDvQ7inhoAz3e6G6M60PzpvjzmNg== dependencies: "@ember-data/rfc395-data" "^0.0.4" css-tree "^2.0.4" @@ -12515,10 +12515,10 @@ eslint-plugin-node@^11.1.0: resolve "^1.10.1" semver "^6.1.0" -eslint-plugin-qunit@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-qunit/-/eslint-plugin-qunit-6.2.0.tgz#f4efda29da99523e560848d9592c39c0590c308d" - integrity sha512-KvPmkIC2MHpfRxs/r8WUeeGkG6y+3qwSi2AZIBtjcM/YG6Z3k0GxW5Hbu3l7X0TDhljVCeBb9Q5puUkHzl83Mw== +eslint-plugin-qunit@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-qunit/-/eslint-plugin-qunit-7.3.0.tgz#ea19c6df16b3e231764f93363709172ad3c22bc8" + integrity sha512-o80qEsBpnh2hGCLKmNVimPSPY6TP2eyM+wQl9vdOKWJKrQXEgNTMX9mf4X4h3GguaBlmSNnLaPVsycKaZEaGZg== dependencies: eslint-utils "^3.0.0" requireindex "^1.2.0" @@ -12661,12 +12661,12 @@ eslint@^7.27.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" -eslint@^8.12.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.12.0.tgz#c7a5bd1cfa09079aae64c9076c07eada66a46e8e" - integrity sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q== +eslint@^8.18.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.18.0.tgz#78d565d16c993d0b73968c523c0446b13da784fd" + integrity sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA== dependencies: - "@eslint/eslintrc" "^1.2.1" + "@eslint/eslintrc" "^1.3.0" "@humanwhocodes/config-array" "^0.9.2" ajv "^6.10.0" chalk "^4.0.0" @@ -12677,14 +12677,14 @@ eslint@^8.12.0: eslint-scope "^7.1.1" eslint-utils "^3.0.0" eslint-visitor-keys "^3.3.0" - espree "^9.3.1" + espree "^9.3.2" esquery "^1.4.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" glob-parent "^6.0.1" - globals "^13.6.0" + globals "^13.15.0" ignore "^5.2.0" import-fresh "^3.0.0" imurmurhash "^0.1.4" @@ -12693,7 +12693,7 @@ eslint@^8.12.0: json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" - minimatch "^3.0.4" + minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.1" regexpp "^3.2.0" @@ -12724,13 +12724,13 @@ espree@^7.3.0, espree@^7.3.1: acorn-jsx "^5.3.1" eslint-visitor-keys "^1.3.0" -espree@^9.3.1: - version "9.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.1.tgz#8793b4bc27ea4c778c19908e0719e7b8f4115bcd" - integrity sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ== +espree@^9.3.2: + version "9.3.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.2.tgz#f58f77bd334731182801ced3380a8cc859091596" + integrity sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA== dependencies: - acorn "^8.7.0" - acorn-jsx "^5.3.1" + acorn "^8.7.1" + acorn-jsx "^5.3.2" eslint-visitor-keys "^3.3.0" esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: @@ -14295,6 +14295,13 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^13.15.0: + version "13.15.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.15.0.tgz#38113218c907d2f7e98658af246cef8b77e90bac" + integrity sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog== + dependencies: + type-fest "^0.20.2" + globals@^13.6.0, globals@^13.9.0: version "13.10.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.10.0.tgz#60ba56c3ac2ca845cfbf4faeca727ad9dd204676" @@ -18514,6 +18521,13 @@ minimalistic-crypto-utils@^1.0.1: dependencies: brace-expansion "^1.1.7" +minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619"