Upgrade ember a11y testing to v7 (#2470)

* chore: 🤖 update ember-a11y-testing and @ember/test-helpers

* chore: 🤖 upgrade to v7

* chore: 🤖 upgrade deps and force resolutions to fix errors

* chore: 🤖 fix ember-a11y errors due to summary title not showing

* chore: 🤖 fix yarn.lock
This commit is contained in:
Lisbet Alvarez authored and GitHub committed 2024-09-04 13:04:14 -07:00
1 parent 0cfa814cdd
commit ef163709f2
69 files changed
+305 -2663

No files matched your search

+3 -3
View File
@@ -26,7 +26,7 @@
"dexie": "^3.2.4",
"ember-auto-import": "^2.6.3",
"ember-can": "^4.2.0",
"ember-cli-babel": "^7.26.10",
"ember-cli-babel": "^8.2.0",
"ember-cli-htmlbars": "^6.2.0",
"ember-cli-mirage": "^3.0.3",
"miragejs": "^0.1.48",
@@ -35,12 +35,12 @@
"tracked-built-ins": "^3.1.1"
},
"devDependencies": {
"@babel/core": "^7.21.0",
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.21.3",
"@babel/plugin-proposal-decorators": "^7.21.0",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.0.1",
"@ember/test-helpers": "^2.9.3",
"@ember/test-helpers": "^3.3.1",
"@embroider/test-setup": "^2.1.1",
"@faker-js/faker": "^8.0.2",
"@glimmer/component": "^1.1.2",
+2 -2
View File
@@ -21,7 +21,7 @@
"doc:toc": "doctoc README.md"
},
"dependencies": {
"ember-cli-babel": "^7.26.11",
"ember-cli-babel": "^8.2.0",
"ember-cli-htmlbars": "^6.2.0",
"ember-fetch": "^8.1.1",
"ember-simple-auth": "^4.2.2"
@@ -31,7 +31,7 @@
"@babel/plugin-proposal-decorators": "^7.21.0",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.0.1",
"@ember/test-helpers": "^2.9.3",
"@ember/test-helpers": "^3.3.1",
"@embroider/test-setup": "^2.1.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
+3 -3
View File
@@ -35,7 +35,7 @@
"auth": "*",
"ember-auto-import": "^2.6.3",
"ember-browser-services": "^4.0.3",
"ember-cli-babel": "^7.26.11",
"ember-cli-babel": "^8.2.0",
"ember-cli-htmlbars": "^6.2.0",
"ember-cli-sass": "^11.0.1",
"ember-feature-flags": "^6.0.0",
@@ -51,7 +51,7 @@
"@babel/plugin-proposal-decorators": "^7.21.0",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.0.1",
"@ember/test-helpers": "^2.9.3",
"@ember/test-helpers": "^3.3.1",
"@embroider/test-setup": "^2.1.1",
"@faker-js/faker": "^8.0.2",
"@glimmer/component": "^1.1.2",
@@ -84,7 +84,7 @@
"qunit": "^2.19.4",
"qunit-dom": "^2.0.0",
"rose": "*",
"sinon": "^17.0.1",
"sinon": "^18.0.0",
"webpack": "^5.78.0"
},
"peerDependencies": {
+3 -3
View File
@@ -33,7 +33,7 @@
"@hashicorp/design-system-components": "^4.4.1",
"codemirror": "5.65.7",
"ember-auto-import": "^2.6.3",
"ember-cli-babel": "^7.26.11",
"ember-cli-babel": "^8.2.0",
"ember-cli-clipboard": "^1.0.0",
"ember-cli-htmlbars": "^6.2.0",
"ember-cli-sass": "^11.0.1",
@@ -46,12 +46,12 @@
"sass": "^1.69.5"
},
"devDependencies": {
"@babel/core": "^7.18.5",
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.21.3",
"@babel/plugin-proposal-decorators": "^7.21.0",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.0.1",
"@ember/test-helpers": "^2.9.3",
"@ember/test-helpers": "^3.3.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"babel-loader": "^8.2.5",
+5 -5
View File
@@ -48,13 +48,13 @@
"lodash": "^4.17.21"
},
"devDependencies": {
"@babel/core": "^7.18.5",
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.21.3",
"@babel/plugin-proposal-decorators": "^7.21.0",
"@ember/optional-features": "^2.0.0",
"@ember/render-modifiers": "^2.0.4",
"@ember/string": "^3.0.1",
"@ember/test-helpers": "^2.9.3",
"@ember/test-helpers": "^3.3.1",
"@embroider/macros": "^1.13.1",
"@faker-js/faker": "^8.0.2",
"@glimmer/component": "^1.1.2",
@@ -66,11 +66,11 @@
"concurrently": "^8.0.1",
"core": "*",
"doctoc": "^2.2.0",
"ember-a11y-testing": "^4.2.0",
"ember-a11y-testing": "^7.0.0",
"ember-auto-import": "^2.6.3",
"ember-cli": "^4.12.2",
"ember-cli-app-version": "^6.0.0",
"ember-cli-babel": "^7.26.11",
"ember-cli-babel": "^8.2.0",
"ember-cli-code-coverage": "^1.0.3",
"ember-cli-content-security-policy": "^2.0.3",
"ember-cli-dependency-checker": "^3.3.1",
@@ -102,7 +102,7 @@
"qunit": "^2.19.4",
"qunit-dom": "^2.0.0",
"rose": "*",
"sinon": "^14.0.0",
"sinon": "^18.0.0",
"stylelint": "^15.10.1",
"stylelint-config-prettier-scss": "^0.0.1",
"stylelint-config-standard-scss": "^11.0.0",
@@ -48,6 +48,7 @@ module('Acceptance | accounts | change password', function (hooks) {
});
authenticateSession({
account_id: instances.account.id,
username: 'admin',
});
// Generate route URLs for resources
urls.orgScope = `/scopes/${instances.scopes.org.id}`;
@@ -55,8 +56,11 @@ module('Acceptance | accounts | change password', function (hooks) {
});
test('visiting account change password', async function (assert) {
await visit(urls.changePassword);
await visit(urls.orgScope);
await click(`[href="${urls.changePassword}"]`);
await a11yAudit();
assert.strictEqual(currentURL(), urls.changePassword);
});
@@ -118,11 +122,14 @@ module('Acceptance | accounts | change password', function (hooks) {
},
);
});
await visit(urls.changePassword);
await visit(urls.orgScope);
await click(`[href="${urls.changePassword}"]`);
await fillIn('[name="currentPassword"]', 'current password');
await fillIn('[name="newPassword"]', 'new password');
await click('form [type="submit"]');
await a11yAudit();
assert.ok(find('[role="alert"]'));
});
@@ -41,7 +41,7 @@ module('Acceptance | accounts | create', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -30,18 +30,19 @@ module('Acceptance | accounts | delete', function (hooks) {
global: null,
org: null,
},
authMethods: null,
authMethod: null,
account: null,
};
const urls = {
orgScope: null,
authMethods: null,
authMethod: null,
accounts: null,
account: null,
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -39,7 +39,7 @@ module('Acceptance | accounts | read', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -36,7 +36,7 @@ module('Acceptance | accounts | set password', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -36,7 +36,7 @@ module('Acceptance | accounts | update', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -50,7 +50,7 @@ module('Acceptance | aliases | create', function (hooks) {
getAliasCount = () => this.server.schema.aliases.all().models.length;
features = this.owner.lookup('service:features');
features.enable('ssh-session-recording');
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('users can create a new alias with host and target info', async function (assert) {
@@ -48,7 +48,7 @@ module('Acceptance | aliases | read', function (hooks) {
urls.alias = `${urls.aliases}/${instances.alias.id}`;
urls.unknownAlias = `${urls.aliases}/foo`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting a alias', async function (assert) {
@@ -52,7 +52,7 @@ module('Acceptance | auth-methods | delete', function (hooks) {
hooks.beforeEach(function () {
// Setup Mirage mock resources for this test
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -43,7 +43,7 @@ module('Acceptance | auth-methods | oidc', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -49,7 +49,7 @@ module('Acceptance | auth-methods | read', function (hooks) {
hooks.beforeEach(function () {
// Setup Mirage mock resources for this test
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -79,7 +79,7 @@ module('Acceptance | auth-methods | update', function (hooks) {
hooks.beforeEach(function () {
// Setup Mirage mock resources for this test
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -76,7 +76,7 @@ module('Acceptance | credential-libraries | create', function (hooks) {
// Generate resource counter
getCredentialLibraryCount = () =>
this.server.schema.credentialLibraries.all().models.length;
authenticateSession({});
authenticateSession({ username: 'admin' });
featuresService = this.owner.lookup('service:features');
});
test('visiting credential libraries', async function (assert) {
@@ -63,7 +63,7 @@ module('Acceptance | credential-libraries | read', function (hooks) {
urls.credentialLibrary = `${urls.credentialLibraries}/${instances.credentialLibrary.id}`;
urls.newCredentialLibrary = `${urls.credentialLibraries}/new`;
urls.unknownCredentialLibrary = `${urls.credentialLibraries}/foo`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('can navigate to resource', async function (assert) {
@@ -76,7 +76,7 @@ module('Acceptance | credential-stores | credentials | read', function (hooks) {
urls.usernameKeyPairCredential = `${urls.credentials}/${instances.usernameKeyPairCredential.id}`;
urls.jsonCredential = `${urls.credentials}/${instances.jsonCredential.id}`;
urls.unknownCredential = `${urls.credentials}/foo`;
authenticateSession({});
authenticateSession({ username: 'admin' });
featuresService = this.owner.lookup('service:features');
});
@@ -66,7 +66,7 @@ module('Acceptance | credential-stores | read', function (hooks) {
urls.vaultCredentialStore = `${urls.credentialStores}/${instances.vaultCredentialStore.id}`;
urls.unknownCredentialStore = `${urls.credentialStores}/foo`;
authenticateSession({});
authenticateSession({ username: 'admin' });
featuresService = this.owner.lookup('service:features');
});
@@ -37,11 +37,13 @@ module('Acceptance | groups | members', function (hooks) {
addMembers: null,
};
let membersCount;
const MANAGE_DROPDOWN_SELECTOR = "[data-test-manage-group-dropdown] div:first-child button"
const ADD_MEMBERS_ACTION_SELECTOR = "[data-test-manage-group-dropdown] ul li a"
const MANAGE_DROPDOWN_SELECTOR =
'[data-test-manage-group-dropdown] div:first-child button';
const ADD_MEMBERS_ACTION_SELECTOR =
'[data-test-manage-group-dropdown] ul li a';
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -114,7 +116,7 @@ module('Acceptance | groups | members', function (hooks) {
test('can navigate to add members with proper authorization', async function (assert) {
await visit(urls.group);
await click(MANAGE_DROPDOWN_SELECTOR);
assert.dom(ADD_MEMBERS_ACTION_SELECTOR).isVisible()
assert.dom(ADD_MEMBERS_ACTION_SELECTOR).isVisible();
});
test('cannot navigate to add members without proper authorization', async function (assert) {
@@ -34,7 +34,7 @@ module('Acceptance | groups | read', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -87,10 +87,10 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) {
urls.hostSetHosts = `${urls.hostSet}/hosts`;
urls.addHosts = `${urls.hostSet}/add-hosts`;
urls.createAndAddHost = `${urls.hostSet}/create-and-add-host`;
// Generate resource couner
// Generate resource counter
getHostSetHostCount = () =>
this.server.schema.hostSets.all().models[0].hosts.length;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting host set hosts', async function (assert) {
@@ -68,7 +68,7 @@ module('Acceptance | host-catalogs | host-sets | read', function (hooks) {
urls.hostSet = `${urls.hostSets}/${instances.hostSet.id}`;
urls.unknownHostSet = `${urls.hostSets}/foo`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting host sets', async function (assert) {
@@ -68,7 +68,7 @@ module('Acceptance | host-catalogs | hosts | read', function (hooks) {
urls.host = `${urls.hosts}/${instances.host.id}`;
urls.unknownHost = `${urls.hosts}/foo`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting hosts', async function (assert) {
@@ -60,7 +60,7 @@ module('Acceptance | host-catalogs | read', function (hooks) {
urls.hostCatalog = `${urls.hostCatalogs}/${instances.hostCatalog.id}`;
urls.unknownHostCatalog = `${urls.hostCatalogs}/foo`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting host catalogs', async function (assert) {
@@ -53,7 +53,7 @@ module('Acceptance | managed-groups | create', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -50,7 +50,7 @@ module('Acceptance | managed-groups | delete', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -32,13 +32,14 @@ module('Acceptance | managed-groups | members', function (hooks) {
const urls = {
orgScope: null,
authMethods: null,
authMethod: null,
managedGroups: null,
managedGroup: null,
managedGroupMembers: null,
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -40,7 +40,7 @@ module('Acceptance | managed-groups | read', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -56,7 +56,7 @@ module('Acceptance | policies | create', function (hooks) {
getPolicyCount = () => this.server.schema.policies.all().models.length;
features = this.owner.lookup('service:features');
features.enable('ssh-session-recording');
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('users can create a new policy with global scope', async function (assert) {
@@ -52,7 +52,7 @@ module('Acceptance | policies | read', function (hooks) {
features = this.owner.lookup('service:features');
features.enable('ssh-session-recording');
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting a policy', async function (assert) {
@@ -38,7 +38,7 @@ module('Acceptance | roles | create', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.org = this.server.create(
'scope',
{
@@ -86,7 +86,7 @@ module('Acceptance | roles | global-scope', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
confirmService = this.owner.lookup('service:confirm');
instances.scopes.global = this.server.create('scope', { id: 'global' });
@@ -45,7 +45,7 @@ module('Acceptance | roles | grants', function (hooks) {
let grantsCount;
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -79,7 +79,7 @@ module('Acceptance | roles | org-scope', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
confirmService = this.owner.lookup('service:confirm');
instances.scopes.global = this.server.create('scope', { id: 'global' });
@@ -41,7 +41,7 @@ module('Acceptance | roles | principals', function (hooks) {
let principalsCount;
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -41,7 +41,7 @@ module('Acceptance | roles | project-scope', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
+1 -1
View File
@@ -37,7 +37,7 @@ module('Acceptance | roles | read', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
+1 -1
View File
@@ -92,7 +92,7 @@ module('Acceptance | scopes', function (hooks) {
urls.project2ScopeEdit = `${urls.project2Scope}/edit`;
// Generate resource counter
getScopeCount = (type) => this.server.schema.scopes.where({ type }).length;
authenticateSession({ isGlobal: true });
authenticateSession({ isGlobal: true, username: 'admin' });
});
test('visiting global scope', async function (assert) {
@@ -74,7 +74,7 @@ module('Acceptance | scope | add storage policy', function (hooks) {
urls.policy = `${urls.policies}/${policyOne.id}`;
urls.addStoragePolicy = `${urls.orgScope}/add-storage-policy`;
urls.newPolicy = `${urls.addStoragePolicy}/create`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('cannot attach policy on a scope without proper authorization', async function (assert) {
@@ -58,7 +58,7 @@ module('Acceptance | scopes | read', function (hooks) {
urls.orgScopeEdit = `/scopes/${instances.scopes.org.id}/edit`;
features = this.owner.lookup('service:features');
featureEdition = this.owner.lookup('service:featureEdition');
authenticateSession({ isGlobal: true });
authenticateSession({ isGlobal: true, username: 'admin' });
});
test('visiting org scope edit', async function (assert) {
@@ -63,7 +63,7 @@ module('Acceptance | session-recordings | read', function (hooks) {
urls.sessionRecordings = `${urls.globalScope}/session-recordings`;
urls.sessionRecording = `${urls.sessionRecordings}/${instances.sessionRecording.id}/channels-by-connection`;
urls.channelRecording = `${urls.sessionRecording}/${instances.channelRecording.id}`;
authenticateSession({});
authenticateSession({ username: 'admin' });
featuresService = this.owner.lookup('service:features');
});
@@ -103,7 +103,7 @@ module('Acceptance | sessions | list', function (hooks) {
urls.projectScope = `/scopes/${instances.scopes.project.id}`;
urls.sessions = `${urls.projectScope}/sessions`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting sessions', async function (assert) {
@@ -47,7 +47,7 @@ module('Acceptance | storage-buckets | create', function (hooks) {
features = this.owner.lookup('service:features');
features.enable('ssh-session-recording');
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('users can create a new storage bucket aws plugin type with global scope', async function (assert) {
@@ -50,7 +50,7 @@ module('Acceptance | storage-buckets | read', function (hooks) {
features = this.owner.lookup('service:features');
features.enable('ssh-session-recording');
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting a storage bucket', async function (assert) {
@@ -117,7 +117,7 @@ module('Acceptance | targets | brokered credential sources', function (hooks) {
this.server.schema.credentials.all().models.length;
credentialSourceCount = getCredentialLibraryCount() + getCredentialCount();
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting target brokered credential sources', async function (assert) {
@@ -77,7 +77,7 @@ module('Acceptance | targets | create-alias', function (hooks) {
getAliasCount = () => this.server.schema.aliases.all().models.length;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('users can create a new alias for a target of TCP type', async function (assert) {
@@ -89,7 +89,7 @@ module('Acceptance | targets | enable session recording', function (hooks) {
urls.newStorageBucket = `${urls.enableSessionRecording}/create-storage-bucket`;
urls.storageBucket = `${urls.storageBuckets}/${storageBucketOne.id}`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('cannot enable session recording for a target without proper authorization', async function (assert) {
@@ -73,7 +73,7 @@ module(
features = this.owner.lookup('service:features');
features.enable('ssh-session-recording');
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('users can create a new storage bucket with global scope', async function (assert) {
@@ -91,7 +91,7 @@ module(
urls.newStorageBucket = `${urls.enableSessionRecording}/create-storage-bucket`;
urls.storageBucket = `${urls.storageBuckets}/${storageBucketOne.id}`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('cannot enable session recording for a target without proper authorization', async function (assert) {
@@ -88,7 +88,7 @@ module('Acceptance | targets | host-sources', function (hooks) {
// Generate resource counter
getTargetHostSetCount = () =>
this.server.schema.targets.first().hostSets.models.length;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting target host sources', async function (assert) {
@@ -116,7 +116,7 @@ module(
credentialSourceCount =
getCredentialLibraryCount() + getCredentialCount();
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting target injected application credential sources', async function (assert) {
@@ -90,7 +90,7 @@ module('Acceptance | targets | manage-alias', function (hooks) {
getAliasCount = () => this.server.schema.aliases.all().models.length;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('clicking on manage should take you to manage page', async function (assert) {
@@ -91,7 +91,7 @@ module('Acceptance | targets | read', function (hooks) {
urls.alias = `${urls.tcpTarget}/${aliasResource.id}`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting ssh target', async function (assert) {
@@ -76,7 +76,7 @@ module('Acceptance | targets | workers', function (hooks) {
urls.targetEditEgressFilter = `${urls.target}/edit-egress-worker-filter`;
urls.targetEditIngressFilter = `${urls.target}/edit-ingress-worker-filter`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting target workers', async function (assert) {
@@ -25,8 +25,10 @@ module('Acceptance | users | accounts', function (hooks) {
let features;
const ACCOUNTS_TYPE_SELECTOR = 'tbody tr .hds-badge__text';
const ADD_ACCOUNTS_ACTION_SELECTOR = "[data-test-manage-user-dropdown] ul li:first-child a"
const MANAGE_DROPDOWN_SELECTOR = "[data-test-manage-user-dropdown] div:first-child button"
const ADD_ACCOUNTS_ACTION_SELECTOR =
'[data-test-manage-user-dropdown] ul li:first-child a';
const MANAGE_DROPDOWN_SELECTOR =
'[data-test-manage-user-dropdown] div:first-child button';
const ERROR_MSG_SELECTOR = '[role="alert"]';
const TABLE_ROWS_SELECTOR = 'tbody tr';
const CHECKBOX_SELECTOR = 'tbody label';
@@ -51,7 +53,7 @@ module('Acceptance | users | accounts', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession({});
authenticateSession({ username: 'admin' });
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
@@ -236,11 +238,10 @@ module('Acceptance | users | accounts', function (hooks) {
await visit(urls.user);
await click(`[href="${urls.accounts}"]`);
await click(MANAGE_DROPDOWN_SELECTOR);
await click(ADD_ACCOUNTS_ACTION_SELECTOR);
assert.dom(TABLE_ROWS_SELECTOR).exists({ count: accountsAvailableCount });
});
@@ -266,8 +267,8 @@ module('Acceptance | users | accounts', function (hooks) {
test('select and cancel accounts to add', async function (assert) {
await visit(urls.user);
await click(`[href="${urls.accounts}"]`)
await click(`[href="${urls.accounts}"]`);
assert.dom(TABLE_ROWS_SELECTOR).exists({ count: accountsCount });
await click(MANAGE_DROPDOWN_SELECTOR);
@@ -277,9 +278,9 @@ module('Acceptance | users | accounts', function (hooks) {
await click(CHECKBOX_SELECTOR);
await click(CANCEL_BTN_SELECTOR);
assert.strictEqual(currentURL(), urls.accounts);
assert.dom(TABLE_ROWS_SELECTOR).exists({ count: accountsCount});
assert.dom(TABLE_ROWS_SELECTOR).exists({ count: accountsCount });
});
test('shows error message on account add', async function (assert) {
+1 -1
View File
@@ -47,7 +47,7 @@ module('Acceptance | users | read', function (hooks) {
urls.orgScope = `/scopes/${instances.scopes.org.id}`;
urls.users = `${urls.orgScope}/users`;
urls.user = `${urls.users}/${instances.user.id}`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting users', async function (assert) {
@@ -53,7 +53,7 @@ module('Acceptance | workers | worker | create-tags', function (hooks) {
urls.tags = `${urls.worker}/tags`;
urls.createTags = `${urls.worker}/create-tags`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting worker create tags', async function (assert) {
@@ -54,7 +54,7 @@ module('Acceptance | workers | read', function (hooks) {
featuresService = this.owner.lookup('service:features');
featuresService.enable('byow');
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting worker', async function (assert) {
@@ -73,7 +73,7 @@ module('Acceptance | workers | worker | tags', function (hooks) {
urls.worker = `${urls.workers}/${instances.worker.id}`;
urls.tags = `${urls.worker}/tags`;
urls.createTags = `${urls.worker}/create-tags`;
authenticateSession({});
authenticateSession({ username: 'admin' });
});
test('visiting worker tags', async function (assert) {
+4 -4
View File
@@ -58,7 +58,7 @@
"@ember/optional-features": "^2.0.0",
"@ember/render-modifiers": "^2.0.4",
"@ember/string": "^3.0.1",
"@ember/test-helpers": "^2.9.3",
"@ember/test-helpers": "^3.3.1",
"@embroider/macros": "^1.13.1",
"@faker-js/faker": "^8.0.2",
"@glimmer/component": "^1.1.2",
@@ -70,12 +70,12 @@
"core": "*",
"cross-env": "^7.0.3",
"doctoc": "^2.2.0",
"ember-a11y-testing": "^4.2.0",
"ember-a11y-testing": "^7.0.0",
"ember-auto-import": "^2.6.3",
"ember-autofocus-modifier": "^4.0.1",
"ember-cli": "^4.12.2",
"ember-cli-app-version": "^6.0.0",
"ember-cli-babel": "^7.26.11",
"ember-cli-babel": "^8.2.0",
"ember-cli-code-coverage": "^1.0.3",
"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-flash": "^4.0.0",
@@ -111,7 +111,7 @@
"rose": "*",
"sass": "^1.69.5",
"shx": "^0.3.4",
"sinon": "^14.0.0",
"sinon": "^18.0.0",
"stylelint": "^15.10.1",
"stylelint-config-prettier-scss": "^0.0.1",
"stylelint-config-standard": "^32.0.0",
+1 -1
View File
@@ -59,7 +59,7 @@ module('Acceptance | projects', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession();
authenticateSession({ username: 'admin' });
// create scopes
instances.scopes.global = this.server.create('scope', { id: 'global' });
@@ -79,7 +79,7 @@ module('Acceptance | projects | sessions | index', function (hooks) {
scope: instances.scopes.global,
});
authenticateSession({ user_id: instances.user.id });
authenticateSession({ user_id: instances.user.id, username: 'admin' });
// create scopes
instances.scopes.global = this.server.create('scope', {
@@ -61,7 +61,7 @@ module('Acceptance | projects | sessions | session', function (hooks) {
scope: instances.scopes.global,
});
authenticateSession({ user_id: instances.user.id });
authenticateSession({ user_id: instances.user.id, username: 'admin' });
// create scopes
instances.scopes.global = this.server.create('scope', { id: 'global' });
@@ -83,7 +83,7 @@ module('Acceptance | projects | targets | index', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession();
authenticateSession({ username: 'admin' });
// bypass mirage config that expects recursive to be passed in as queryParam
this.server.get('/targets', ({ targets }) => targets.all());
+1 -1
View File
@@ -81,7 +81,7 @@ module('Acceptance | scopes', function (hooks) {
};
hooks.beforeEach(function () {
authenticateSession();
authenticateSession({ username: 'admin' });
// bypass mirage config that expects recursive to be passed in as queryParam
this.server.get('/targets', ({ targets }) => targets.all());
+197 -2567
View File
File diff suppressed because it is too large. Load diff