chore: 🤖 vault ldap feature flag
This commit is contained in:
1 parent
ff087738fc
commit
df8bfc42bb
5 files changed
+77
-34
No files matched your search
@@ -450,6 +450,8 @@ module('Acceptance | credential-libraries | create', function (hooks) {
|
||||
},
|
||||
});
|
||||
|
||||
featuresService.enable('vault-ldap-credential');
|
||||
|
||||
await visit(urls.newCredentialLibrary);
|
||||
|
||||
await click(selectors.TYPE_VAULT_LDAP);
|
||||
@@ -483,6 +485,13 @@ module('Acceptance | credential-libraries | create', function (hooks) {
|
||||
);
|
||||
});
|
||||
|
||||
test('cannot select vault ldap when feature is disabled', async function (assert) {
|
||||
await visit(urls.newCredentialLibrary);
|
||||
|
||||
assert.false(featuresService.isEnabled('vault-ldap-credential'));
|
||||
assert.dom(selectors.TYPE_VAULT_LDAP).doesNotExist();
|
||||
});
|
||||
|
||||
test('can create a new credential library with username, password and domain type for vault ldap', async function (assert) {
|
||||
setRunOptions({
|
||||
rules: {
|
||||
@@ -493,6 +502,8 @@ module('Acceptance | credential-libraries | create', function (hooks) {
|
||||
},
|
||||
});
|
||||
|
||||
featuresService.enable('vault-ldap-credential');
|
||||
|
||||
const credentialLibraryCount = getCredentialLibraryCount();
|
||||
const usernamePasswordDomainCredentialLibraryCount =
|
||||
getUsernamePasswordDomainCredentialLibraryCount();
|
||||
@@ -545,6 +556,8 @@ module('Acceptance | credential-libraries | create', function (hooks) {
|
||||
},
|
||||
});
|
||||
|
||||
featuresService.enable('vault-ldap-credential');
|
||||
|
||||
await visit(`${urls.newCredentialLibrary}?type=vault-ssh-certificate`);
|
||||
|
||||
assert.dom(selectors.TYPE_VAULT_SSH_CERT).isNotVisible();
|
||||
|
||||
@@ -18,6 +18,7 @@ module('Acceptance | credential-libraries | list', function (hooks) {
|
||||
setupMirage(hooks);
|
||||
setupSqlite(hooks);
|
||||
|
||||
let featuresService;
|
||||
const instances = {
|
||||
scopes: {
|
||||
global: null,
|
||||
@@ -64,6 +65,7 @@ module('Acceptance | credential-libraries | list', function (hooks) {
|
||||
urls.credentialLibraries = `${urls.credentialStore}/credential-libraries`;
|
||||
urls.vaultLDAPCredentialLibrary = `${urls.credentialLibraries}/${instances.vaultLDAPCredentialLibrary.id}`;
|
||||
await authenticateSession({});
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
});
|
||||
|
||||
test('Users can navigate to credential libraries with proper authorization', async function (assert) {
|
||||
@@ -112,10 +114,19 @@ module('Acceptance | credential-libraries | list', function (hooks) {
|
||||
},
|
||||
});
|
||||
|
||||
featuresService.enable('vault-ldap-credential');
|
||||
await visit(urls.credentialLibraries);
|
||||
|
||||
assert
|
||||
.dom(commonSelectors.TABLE_RESOURCE_LINK(urls.vaultLDAPCredentialLibrary))
|
||||
.isVisible();
|
||||
});
|
||||
|
||||
test('User cannot navigate to vault ldap credential library details when feature is not enabled', async function (assert) {
|
||||
await visit(urls.credentialLibraries);
|
||||
|
||||
assert
|
||||
.dom(commonSelectors.TABLE_RESOURCE_LINK(urls.vaultLDAPCredentialLibrary))
|
||||
.doesNotExist();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user