fix: 🐛 OIDC authentications not properly showing username (#2930)

* fix: 🐛 properly show username for oidc auth method in user menu

* test: 💍 fix admin ui tests

* test: 💍 fix desktop ui tests

* refactor: 💡 admin to not store username in authenticated object

* refactor: 💡 use getter in app controller

* test: 💍 POC for how we could update our tests to use auth account

* refactor: 💡 remove unused service

* test: 💍 fix all tests in ui/admin

* test: 💍 revert one change

* refactor: 💡 update ui/desktop w/ feedback + fix tests

* refactor: 💡 add in error handling

* refactor: 💡 cleanup unused service

* test: 💍 fix e2e test selector

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17231
This commit is contained in:
Lisbet Alvarez authored and GitHub committed 2025-10-30 12:49:30 -07:00
1 parent 838bc37243
commit 72f7c8a92d
195 files changed
+720 -1112

No files matched your search

@@ -6,9 +6,7 @@
import { module, test } from 'qunit';
import { visit, click, fillIn, currentURL, select } from '@ember/test-helpers';
import { setupApplicationTest } from 'admin/tests/helpers';
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
import { setupSqlite } from 'api/test-support/helpers/sqlite';
import { authenticateSession } from 'ember-simple-auth/test-support';
import { Response } from 'miragejs';
import {
TYPE_CREDENTIAL_LIBRARY_VAULT_SSH_CERTIFICATE,
@@ -21,7 +19,6 @@ import { TYPE_CREDENTIAL_USERNAME_PASSWORD_DOMAIN } from 'api/models/credential'
module('Acceptance | credential-libraries | create', function (hooks) {
setupApplicationTest(hooks);
setupMirage(hooks);
setupSqlite(hooks);
let featuresService;
@@ -30,7 +27,6 @@ module('Acceptance | credential-libraries | create', function (hooks) {
const instances = {
scopes: {
global: null,
org: null,
project: null,
},
@@ -49,7 +45,6 @@ module('Acceptance | credential-libraries | create', function (hooks) {
hooks.beforeEach(async function () {
// Generate resources
instances.scopes.global = this.server.create('scope', { id: 'global' });
instances.scopes.org = this.server.create('scope', {
type: 'org',
scope: { id: 'global', type: 'global' },
@@ -83,7 +78,6 @@ module('Acceptance | credential-libraries | create', function (hooks) {
credentialType: TYPE_CREDENTIAL_USERNAME_PASSWORD_DOMAIN,
}).length;
};
await authenticateSession({ username: 'admin' });
featuresService = this.owner.lookup('service:features');
});