diff --git a/ui/app/styles/components/dropdown.scss b/ui/app/styles/components/dropdown.scss index f68e704e4..550c3582f 100644 --- a/ui/app/styles/components/dropdown.scss +++ b/ui/app/styles/components/dropdown.scss @@ -122,6 +122,7 @@ .ember-power-select-selected-item, .dropdown-item { text-overflow: ellipsis; + overflow: hidden; white-space: nowrap; } diff --git a/ui/app/templates/components/gutter-menu.hbs b/ui/app/templates/components/gutter-menu.hbs index acafdc6cc..3fc455fe7 100644 --- a/ui/app/templates/components/gutter-menu.hbs +++ b/ui/app/templates/components/gutter-menu.hbs @@ -36,12 +36,9 @@ @onChange={{action this.gotoJobsForNamespace}} @tagName="div" @class="namespace-switcher" + title={{this.system.activeNamespace.name}} as |namespace|> - {{#if (eq namespace.name "default")}} - Default Namespace - {{else}} - {{namespace.name}} - {{/if}} + Namespace: {{namespace.name}} diff --git a/ui/tests/acceptance/job-detail-test.js b/ui/tests/acceptance/job-detail-test.js index 0bbcaa117..a086dfe17 100644 --- a/ui/tests/acceptance/job-detail-test.js +++ b/ui/tests/acceptance/job-detail-test.js @@ -130,12 +130,11 @@ module('Acceptance | job detail (with namespaces)', function(hooks) { test('when switching namespaces, the app redirects to /jobs with the new namespace', async function(assert) { const namespace = server.db.namespaces.find(job.namespaceId); const otherNamespace = server.db.namespaces.toArray().find(ns => ns !== namespace).name; - const label = otherNamespace === 'default' ? 'Default Namespace' : otherNamespace; await JobDetail.visit({ id: job.id, namespace: namespace.name }); // TODO: Migrate to Page Objects - await selectChoose('[data-test-namespace-switcher]', label); + await selectChoose('[data-test-namespace-switcher]', otherNamespace); assert.equal(currentURL().split('?')[0], '/jobs', 'Navigated to /jobs'); const jobs = server.db.jobs diff --git a/ui/tests/acceptance/namespaces-test.js b/ui/tests/acceptance/namespaces-test.js index 3dfd09ab7..61ae497ec 100644 --- a/ui/tests/acceptance/namespaces-test.js +++ b/ui/tests/acceptance/namespaces-test.js @@ -69,7 +69,7 @@ module('Acceptance | namespaces (enabled)', function(hooks) { ); assert.equal( JobsList.namespaceSwitcher.options.objectAt(0).label, - 'Default Namespace', + 'Namespace: default', 'The first namespace is always the default one' ); @@ -79,7 +79,11 @@ module('Acceptance | namespaces (enabled)', function(hooks) { if (index === 0) return; const namespace = sortedNamespaces[index - 1]; - assert.equal(option.label, namespace.name, `index ${index}: ${namespace.name}`); + assert.equal( + option.label, + `Namespace: ${namespace.name}`, + `index ${index}: ${namespace.name}` + ); }); });