Main to session recording (#178)
* 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>
This commit is contained in:
40 files changed
+351
-335
No files matched your search
@@ -85,13 +85,17 @@ module('Acceptance | targets | create', function (hooks) {
|
||||
|
||||
test('defaults to type `ssh` when no query param provided', async function (assert) {
|
||||
assert.expect(1);
|
||||
featuresService.enable('ssh-target');
|
||||
await visit(urls.newTarget);
|
||||
assert.strictEqual(find('[name="type"]:checked').value, TYPE_TARGET_SSH);
|
||||
});
|
||||
|
||||
test('can create type `ssh` when `target-worker-filters-v2` is disabled', async function (assert) {
|
||||
featuresService.disable('target-worker-filters-v2');
|
||||
assert.expect(4);
|
||||
assert.expect(5);
|
||||
featuresService.enable('ssh-target');
|
||||
|
||||
assert.false(featuresService.isEnabled('target-worker-filters-v2'));
|
||||
|
||||
const targetCount = getTargetCount();
|
||||
const sshTargetCount = getSSHTargetCount();
|
||||
await visit(urls.targets);
|
||||
@@ -116,8 +120,10 @@ module('Acceptance | targets | create', function (hooks) {
|
||||
});
|
||||
|
||||
test('can create type `ssh` when `target-worker-filters-v2` is enabled', async function (assert) {
|
||||
featuresService.enable('target-worker-filters-v2');
|
||||
assert.expect(4);
|
||||
featuresService.enable('ssh-target');
|
||||
featuresService.enable('target-worker-filters-v2');
|
||||
|
||||
const targetCount = getTargetCount();
|
||||
const sshTargetCount = getSSHTargetCount();
|
||||
await visit(urls.targets);
|
||||
@@ -146,8 +152,11 @@ module('Acceptance | targets | create', function (hooks) {
|
||||
});
|
||||
|
||||
test('can create type `tcp` when `target-worker-filters-v2` is disabled', async function (assert) {
|
||||
featuresService.disable('target-worker-filters-v2');
|
||||
assert.expect(4);
|
||||
assert.expect(5);
|
||||
featuresService.enable('ssh-target');
|
||||
|
||||
assert.false(featuresService.isEnabled('target-worker-filters-v2'));
|
||||
|
||||
const targetCount = getTargetCount();
|
||||
const tcpTargetCount = getTCPTargetCount();
|
||||
await visit(urls.targets);
|
||||
@@ -172,8 +181,10 @@ module('Acceptance | targets | create', function (hooks) {
|
||||
});
|
||||
|
||||
test('can create type `tcp` when `target-worker-filters-v2` is enabled', async function (assert) {
|
||||
featuresService.enable('target-worker-filters-v2');
|
||||
assert.expect(4);
|
||||
featuresService.enable('ssh-target');
|
||||
featuresService.enable('target-worker-filters-v2');
|
||||
|
||||
const targetCount = getTargetCount();
|
||||
const tcpTargetCount = getTCPTargetCount();
|
||||
await visit(urls.targets);
|
||||
@@ -203,9 +214,11 @@ module('Acceptance | targets | create', function (hooks) {
|
||||
});
|
||||
|
||||
test('can create type `tcp` when `target-worker-filters-v2` and `target-worker-filters-v2-ingress` is enabled', async function (assert) {
|
||||
assert.expect(4);
|
||||
featuresService.enable('ssh-target');
|
||||
featuresService.enable('target-worker-filters-v2');
|
||||
featuresService.enable('target-worker-filters-v2-ingress');
|
||||
assert.expect(4);
|
||||
|
||||
const targetCount = getTargetCount();
|
||||
const tcpTargetCount = getTCPTargetCount();
|
||||
await visit(urls.targets);
|
||||
@@ -239,15 +252,16 @@ module('Acceptance | targets | create', function (hooks) {
|
||||
|
||||
test('default port is not marked required for SSH targets', async function (assert) {
|
||||
assert.expect(1);
|
||||
featuresService.enable('ssh-target');
|
||||
await visit(urls.newTarget);
|
||||
assert.dom('[data-test-default-port-label]').includesText('Optional');
|
||||
});
|
||||
|
||||
test('default port is marked required for TCP targets', async function (assert) {
|
||||
assert.expect(1);
|
||||
featuresService.enable('ssh-target');
|
||||
await visit(urls.newTarget);
|
||||
await click('[value="tcp"]');
|
||||
|
||||
assert.dom('[data-test-default-port-label]').includesText('Required');
|
||||
});
|
||||
|
||||
@@ -284,12 +298,11 @@ module('Acceptance | targets | create', function (hooks) {
|
||||
});
|
||||
|
||||
test('cannot navigate to new SSH targets route when ssh feature is disabled', async function (assert) {
|
||||
assert.expect(3);
|
||||
featuresService.disable('ssh-target');
|
||||
assert.expect(4);
|
||||
await visit(urls.targets);
|
||||
|
||||
await click(`[href="${urls.newTarget}"]`);
|
||||
|
||||
assert.false(featuresService.isEnabled('ssh-target'));
|
||||
assert.true(
|
||||
instances.scopes.project.authorized_collection_actions.targets.includes(
|
||||
'create'
|
||||
@@ -301,6 +314,9 @@ module('Acceptance | targets | create', function (hooks) {
|
||||
|
||||
test('can cancel create new TCP target', async function (assert) {
|
||||
assert.expect(3);
|
||||
featuresService.enable('target-worker-filters-v2');
|
||||
featuresService.enable('target-worker-filters-v2-ingress');
|
||||
|
||||
const targetCount = getTargetCount();
|
||||
const tcpTargetCount = getTCPTargetCount();
|
||||
await visit(urls.targets);
|
||||
@@ -321,6 +337,10 @@ module('Acceptance | targets | create', function (hooks) {
|
||||
|
||||
test('can cancel create new SSH target', async function (assert) {
|
||||
assert.expect(3);
|
||||
featuresService.enable('ssh-target');
|
||||
featuresService.enable('target-worker-filters-v2');
|
||||
featuresService.enable('target-worker-filters-v2-ingress');
|
||||
|
||||
const targetCount = getTargetCount();
|
||||
const sshTargetCount = getSSHTargetCount();
|
||||
await visit(urls.targets);
|
||||
@@ -398,10 +418,13 @@ module('Acceptance | targets | create', function (hooks) {
|
||||
|
||||
test('can save address', async function (assert) {
|
||||
assert.expect(2);
|
||||
featuresService.enable('target-network-address');
|
||||
|
||||
const targetCount = getTargetCount();
|
||||
await visit(urls.targets);
|
||||
|
||||
await click(`[href="${urls.newTarget}"]`);
|
||||
|
||||
await fillIn('[name="name"]', 'random string');
|
||||
await fillIn('[name="address"]', '0.0.0.0');
|
||||
await click('[type="submit"]');
|
||||
@@ -414,12 +437,10 @@ module('Acceptance | targets | create', function (hooks) {
|
||||
});
|
||||
|
||||
test('address field does not exist when target network address feature is disabled', async function (assert) {
|
||||
assert.expect(1);
|
||||
featuresService.disable('target-network-address');
|
||||
assert.expect(2);
|
||||
await visit(urls.targets);
|
||||
|
||||
await click(`[href="${urls.newTarget}"]`);
|
||||
|
||||
assert.false(featuresService.isEnabled('target-network-address'));
|
||||
assert.dom('[name="address"]').doesNotExist();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user