fix: 🐛 minor UI changes, ent flag for worker filter (#2517)
This commit is contained in:
1 parent
857bf01596
commit
0ff91f9182
6 files changed
+97
-44
No files matched your search
@@ -21,6 +21,7 @@ module('Acceptance | host-catalogs | create', function (hooks) {
|
||||
setupMirage(hooks);
|
||||
setupIndexedDb(hooks);
|
||||
|
||||
let featuresService;
|
||||
let getHostCatalogCount;
|
||||
|
||||
const NAME_INPUT_SELECTOR = '[name="name"]';
|
||||
@@ -84,6 +85,8 @@ module('Acceptance | host-catalogs | create', function (hooks) {
|
||||
urls.newStaticHostCatalog = `${urls.newHostCatalog}?type=static`;
|
||||
urls.newAWSDynamicHostCatalog = `${urls.newHostCatalog}?type=aws`;
|
||||
urls.newAzureDynamicHostCatalog = `${urls.newHostCatalog}?type=azure`;
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
|
||||
// Generate resource counter
|
||||
getHostCatalogCount = () =>
|
||||
this.server.schema.hostCatalogs.all().models.length;
|
||||
@@ -196,6 +199,17 @@ module('Acceptance | host-catalogs | create', function (hooks) {
|
||||
assert.dom('[data-test-error-message-name]').hasText('Name is required.');
|
||||
});
|
||||
|
||||
test('users should not see worker filter field in community edition', async function (assert) {
|
||||
await visit(urls.newAWSDynamicHostCatalog);
|
||||
assert.dom('[data-test-dynamic-credential-worker-filter]').doesNotExist();
|
||||
});
|
||||
|
||||
test('users should see worker filter field in enterprise edition', async function (assert) {
|
||||
featuresService.enable('dynamic-credentials-worker-filter');
|
||||
await visit(urls.newAWSDynamicHostCatalog);
|
||||
assert.dom('[data-test-dynamic-credential-worker-filter]').exists();
|
||||
});
|
||||
|
||||
test('users cannot directly navigate to new host catalog route without proper authorization', async function (assert) {
|
||||
instances.scopes.project.authorized_collection_actions['host-catalogs'] =
|
||||
instances.scopes.project.authorized_collection_actions[
|
||||
|
||||
Reference in new issue
Block a user