* fix: 🐛 add model hook to host route for dynamic host catalogs (#1659) * fix: 🐛 add model hook to host route for dynamic host catalogs ✅ Closes: ICU-8594 * refactor: 💡 remove page formatting for host route * [COMPLIANCE] Add Copyright and License Headers (#1660) Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com> * chore(deps-dev): bump webpack from 5.59.1 to 5.76.0 (#1654) Bumps [webpack](https://github.com/webpack/webpack) from 5.59.1 to 5.76.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.59.1...v5.76.0) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Randall Morey <randall@randallmorey.com> Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com> * Feature metadata (#1661) * feat: 🎸 load edition from controller-metadata.json * refactor: 💡 rename edition and add licensed features support * chore: 🤖 support dev toggling of licensed features * chore: 🤖 rename ent edition * Update ui/admin/app/services/feature-edition.js * Update ui/admin/app/instance-initializers/feature-edition.js Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com> * chore: 🤖 cleanup * chore: 🤖 feature edition disabled in tests / fix test cases * test: 💍 remove feature disable calls in tests * test: 💍 fix broken tests * fix: 🐛 fix config bug * fix: 🐛 fix broken test due to feature flags --------- Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com> * chore: 🤖 yarn.lock update * fix: 🐛 fix test features --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: lisbet-alvarez <107949262+lisbet-alvarez@users.noreply.github.com> Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com> Co-authored-by: github-team-secure-boundary <hc-github-team-secure-boundary@hashicorp.com> Co-authored-by: hc-github-team-secure-boundary <82989682+hc-github-team-secure-boundary@users.noreply.github.com>
53 lines
2.1 KiB
JavaScript
53 lines
2.1 KiB
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import { module, test } from 'qunit';
|
|
import { setupRenderingTest } from 'admin/tests/helpers';
|
|
import { render } from '@ember/test-helpers';
|
|
import { hbs } from 'ember-cli-htmlbars';
|
|
import { setupIntl } from 'ember-intl/test-support';
|
|
|
|
module('Integration | Component | worker-diagram/index', function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
setupIntl(hooks);
|
|
|
|
let featuresService;
|
|
const targetWorkerFilterIngress = 'target-worker-filters-v2-ingress';
|
|
const targetWorkerFilterHCP = 'target-worker-filters-v2-hcp';
|
|
|
|
test('it renders a single filter diagram', async function (assert) {
|
|
featuresService = this.owner.lookup('service:features');
|
|
assert.expect(3);
|
|
await render(hbs`<WorkerDiagram />`);
|
|
assert.false(featuresService.isEnabled(targetWorkerFilterIngress));
|
|
assert.false(featuresService.isEnabled(targetWorkerFilterHCP));
|
|
assert.dom('[data-test-single-filter-egress-off]').isVisible();
|
|
});
|
|
|
|
test('it renders a dual filter diagram when `target-worker-filters-v2-ingress` is enabled', async function (assert) {
|
|
featuresService = this.owner.lookup('service:features');
|
|
featuresService.enable(targetWorkerFilterIngress);
|
|
assert.expect(3);
|
|
assert.true(featuresService.isEnabled(targetWorkerFilterIngress));
|
|
assert.false(featuresService.isEnabled(targetWorkerFilterHCP));
|
|
await render(hbs`<WorkerDiagram />`);
|
|
|
|
assert.dom('[data-test-dual-filter-egress-off-ingress-off]').isVisible();
|
|
});
|
|
|
|
test('it renders an HCP dual filter diagram when `target-worker-filters-v2-hcp` is enabled', async function (assert) {
|
|
featuresService = this.owner.lookup('service:features');
|
|
featuresService.enable(targetWorkerFilterIngress);
|
|
featuresService.enable(targetWorkerFilterHCP);
|
|
assert.expect(3);
|
|
await render(hbs`<WorkerDiagram />`);
|
|
assert.true(featuresService.isEnabled(targetWorkerFilterIngress));
|
|
assert.true(featuresService.isEnabled(targetWorkerFilterHCP));
|
|
assert
|
|
.dom('[data-test-dual-filter-hcp-egress-off-ingress-off]')
|
|
.isVisible();
|
|
});
|
|
});
|