Reformat codebase with trailing commas in functions (#2006)
* style: 💄 Update trailing commas in API * style: 💄 Update trailing commas in core * style: 💄 Update trailing commas in rose * style: 💄 Update trailing commas in admin * style: 💄 Update trailing commas in desktop
This commit is contained in:
1 parent
cb3a9e3bdc
commit
bcf004b8a4
423 files changed
+1636
-1605
No files matched your search
@@ -72,7 +72,7 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
type: 'org',
|
||||
scope: { id: 'global', type: 'global' },
|
||||
},
|
||||
'withChildren'
|
||||
'withChildren',
|
||||
);
|
||||
|
||||
instances.scopes.project = this.server.create('scope', {
|
||||
@@ -199,7 +199,7 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
assert.deepEqual(ldapAuthMethod.attributes.certificates, ['certificate']);
|
||||
assert.strictEqual(
|
||||
ldapAuthMethod.attributes.client_certificate,
|
||||
'client cert'
|
||||
'client cert',
|
||||
);
|
||||
assert.notOk(ldapAuthMethod.attributes.client_certificate_key);
|
||||
assert.true(ldapAuthMethod.attributes.start_tls);
|
||||
@@ -234,8 +234,8 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
|
||||
assert.true(
|
||||
instances.orgScope.authorized_collection_actions['auth-methods'].includes(
|
||||
'create'
|
||||
)
|
||||
'create',
|
||||
),
|
||||
);
|
||||
|
||||
await click(NEW_DROPDOWN_SELECTOR);
|
||||
@@ -252,8 +252,8 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
|
||||
assert.false(
|
||||
instances.orgScope.authorized_collection_actions['auth-methods'].includes(
|
||||
'create'
|
||||
)
|
||||
'create',
|
||||
),
|
||||
);
|
||||
assert.dom(NEW_DROPDOWN_SELECTOR).doesNotExist();
|
||||
});
|
||||
@@ -271,8 +271,8 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
|
||||
assert.true(
|
||||
instances.orgScope.authorized_collection_actions['auth-methods'].includes(
|
||||
'create'
|
||||
)
|
||||
'create',
|
||||
),
|
||||
);
|
||||
|
||||
await click(NEW_DROPDOWN_SELECTOR);
|
||||
@@ -292,8 +292,8 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
|
||||
assert.true(
|
||||
instances.orgScope.authorized_collection_actions['auth-methods'].includes(
|
||||
'create'
|
||||
)
|
||||
'create',
|
||||
),
|
||||
);
|
||||
|
||||
await click(NEW_DROPDOWN_SELECTOR);
|
||||
@@ -320,7 +320,7 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
assert.expect(2);
|
||||
assert.notOk(
|
||||
instances.orgScope.primaryAuthMethodId,
|
||||
'Primary auth method is not yet set.'
|
||||
'Primary auth method is not yet set.',
|
||||
);
|
||||
await visit(urls.authMethod);
|
||||
await click(MAKE_PRIMARY_SELECTOR);
|
||||
@@ -328,7 +328,7 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
assert.strictEqual(
|
||||
scope.primaryAuthMethodId,
|
||||
instances.authMethod.id,
|
||||
'Primary auth method is set.'
|
||||
'Primary auth method is set.',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -342,12 +342,12 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
status: 400,
|
||||
code: 'fail',
|
||||
message: 'Sorry!',
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
assert.notOk(
|
||||
instances.orgScope.primaryAuthMethodId,
|
||||
'Primary auth method is not yet set.'
|
||||
'Primary auth method is not yet set.',
|
||||
);
|
||||
await visit(urls.authMethod);
|
||||
await click(MAKE_PRIMARY_SELECTOR);
|
||||
@@ -361,7 +361,7 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
});
|
||||
assert.ok(
|
||||
instances.orgScope.primaryAuthMethodId,
|
||||
'Primary auth method is set.'
|
||||
'Primary auth method is set.',
|
||||
);
|
||||
await visit(urls.authMethod);
|
||||
await click(MAKE_PRIMARY_SELECTOR);
|
||||
@@ -379,7 +379,7 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
status: 400,
|
||||
code: 'fail',
|
||||
message: 'Sorry!',
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
instances.orgScope.update({
|
||||
@@ -388,7 +388,7 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
|
||||
assert.strictEqual(
|
||||
instances.orgScope.primaryAuthMethodId,
|
||||
instances.authMethod.id
|
||||
instances.authMethod.id,
|
||||
);
|
||||
|
||||
await visit(urls.authMethod);
|
||||
@@ -401,7 +401,7 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
assert.expect(4);
|
||||
assert.notOk(
|
||||
instances.orgScope.primaryAuthMethodId,
|
||||
'Primary auth method is not yet set.'
|
||||
'Primary auth method is not yet set.',
|
||||
);
|
||||
await visit(urls.authMethods);
|
||||
|
||||
@@ -414,7 +414,7 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
assert.strictEqual(
|
||||
scope.primaryAuthMethodId,
|
||||
instances.authMethod.id,
|
||||
'Primary auth method is set.'
|
||||
'Primary auth method is set.',
|
||||
);
|
||||
await click(DROPDOWN_SELECTOR_ICON);
|
||||
|
||||
@@ -443,7 +443,7 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
await visit(urls.authMethods);
|
||||
@@ -467,8 +467,8 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
|
||||
assert.false(
|
||||
instances.orgScope.authorized_collection_actions['auth-methods'].includes(
|
||||
'create'
|
||||
)
|
||||
'create',
|
||||
),
|
||||
);
|
||||
assert.strictEqual(currentURL(), urls.authMethods);
|
||||
});
|
||||
|
||||
@@ -104,7 +104,7 @@ module('Acceptance | auth-methods | delete', function (hooks) {
|
||||
status: 490,
|
||||
code: 'error',
|
||||
message: 'Oops.',
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
await visit(urls.authMethods);
|
||||
@@ -127,7 +127,7 @@ module('Acceptance | auth-methods | delete', function (hooks) {
|
||||
status: 490,
|
||||
code: 'error',
|
||||
message: 'Oops.',
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
await visit(urls.authMethods);
|
||||
@@ -143,7 +143,7 @@ module('Acceptance | auth-methods | delete', function (hooks) {
|
||||
assert.expect(1);
|
||||
instances.authMethod.authorized_actions =
|
||||
instances.authMethod.authorized_actions.filter(
|
||||
(item) => item !== 'delete'
|
||||
(item) => item !== 'delete',
|
||||
);
|
||||
await visit(urls.authMethods);
|
||||
|
||||
@@ -157,7 +157,7 @@ module('Acceptance | auth-methods | delete', function (hooks) {
|
||||
featuresService.enable('ldap-auth-methods');
|
||||
instances.ldapAuthMethod.authorized_actions =
|
||||
instances.ldapAuthMethod.authorized_actions.filter(
|
||||
(item) => item !== 'delete'
|
||||
(item) => item !== 'delete',
|
||||
);
|
||||
await visit(urls.authMethods);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ module('Acceptance | auth-methods | list', function (hooks) {
|
||||
type: 'org',
|
||||
scope: { id: 'global', type: 'global' },
|
||||
},
|
||||
'withChildren'
|
||||
'withChildren',
|
||||
);
|
||||
|
||||
urls.orgScope = `/scopes/${instances.orgScope.id}`;
|
||||
@@ -55,8 +55,8 @@ module('Acceptance | auth-methods | list', function (hooks) {
|
||||
await visit(urls.orgScope);
|
||||
assert.ok(
|
||||
instances.orgScope.authorized_collection_actions['auth-methods'].includes(
|
||||
'list'
|
||||
)
|
||||
'list',
|
||||
),
|
||||
);
|
||||
assert.ok(find(`[href="${urls.authMethods}"]`));
|
||||
});
|
||||
@@ -67,8 +67,8 @@ module('Acceptance | auth-methods | list', function (hooks) {
|
||||
await visit(urls.orgScope);
|
||||
assert.notOk(
|
||||
instances.orgScope.authorized_collection_actions['auth-methods'].includes(
|
||||
'list'
|
||||
)
|
||||
'list',
|
||||
),
|
||||
);
|
||||
assert.notOk(find(`[href="${urls.authMethods}"]`));
|
||||
});
|
||||
|
||||
@@ -72,7 +72,7 @@ module('Acceptance | auth-methods | oidc', function (hooks) {
|
||||
await click('.rose-layout-page-actions .rose-dropdown-trigger');
|
||||
assert.strictEqual(
|
||||
find('.rose-dropdown[open] input:checked').value,
|
||||
instances.authMethod.attributes.state
|
||||
instances.authMethod.attributes.state,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -121,7 +121,7 @@ module('Acceptance | auth-methods | oidc', function (hooks) {
|
||||
status: 400,
|
||||
code: 'error',
|
||||
message: 'Sorry!',
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
return request;
|
||||
@@ -134,12 +134,12 @@ module('Acceptance | auth-methods | oidc', function (hooks) {
|
||||
assert.notEqual(
|
||||
newState,
|
||||
authMethod.attributes.state,
|
||||
'Auth method state is not be updated.'
|
||||
'Auth method state is not be updated.',
|
||||
);
|
||||
assert.ok(
|
||||
find('.rose-notification-body').textContent.trim(),
|
||||
'Sorry!',
|
||||
'Displays error message.'
|
||||
'Displays error message.',
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -127,7 +127,7 @@ module('Acceptance | auth-methods | read', function (hooks) {
|
||||
assert.expect(1);
|
||||
instances.passwordAuthMethodOrg.authorized_actions =
|
||||
instances.passwordAuthMethodOrg.authorized_actions.filter(
|
||||
(item) => item !== 'read'
|
||||
(item) => item !== 'read',
|
||||
);
|
||||
await visit(urls.orgScope);
|
||||
|
||||
@@ -140,7 +140,7 @@ module('Acceptance | auth-methods | read', function (hooks) {
|
||||
assert.expect(1);
|
||||
instances.oidcAuthMethodGlobal.authorized_actions =
|
||||
instances.oidcAuthMethodGlobal.authorized_actions.filter(
|
||||
(item) => item !== 'read'
|
||||
(item) => item !== 'read',
|
||||
);
|
||||
await visit(urls.globalScope);
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ module('Acceptance | auth-methods | update', function (hooks) {
|
||||
|
||||
assert.strictEqual(
|
||||
this.server.schema.authMethods.first().name,
|
||||
'update name'
|
||||
'update name',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -126,8 +126,8 @@ module('Acceptance | auth-methods | update', function (hooks) {
|
||||
// Remove all signing algorithms
|
||||
await Promise.all(
|
||||
findAll('form fieldset:nth-of-type(1) [title="Remove"]').map((element) =>
|
||||
click(element)
|
||||
)
|
||||
click(element),
|
||||
),
|
||||
);
|
||||
await select('form fieldset:nth-of-type(1) select', 'RS384');
|
||||
await click('form fieldset:nth-of-type(1) [title="Add"]');
|
||||
@@ -142,7 +142,7 @@ module('Acceptance | auth-methods | update', function (hooks) {
|
||||
|
||||
// Remove all claims scopes
|
||||
const claimsScopeList = await Promise.all(
|
||||
findAll(CLAIMS_SCOPES_REMOVE_BTN_SELECTOR)
|
||||
findAll(CLAIMS_SCOPES_REMOVE_BTN_SELECTOR),
|
||||
);
|
||||
|
||||
for (const element of claimsScopeList) {
|
||||
@@ -155,8 +155,8 @@ module('Acceptance | auth-methods | update', function (hooks) {
|
||||
// Remove all claim maps
|
||||
await Promise.all(
|
||||
findAll('form fieldset:nth-of-type(4) [title="Remove"]').map((element) =>
|
||||
click(element)
|
||||
)
|
||||
click(element),
|
||||
),
|
||||
);
|
||||
await fillIn('[name="from_claim"]', 'from_claim');
|
||||
await select('form fieldset:nth-of-type(4) select', 'email');
|
||||
@@ -226,8 +226,8 @@ module('Acceptance | auth-methods | update', function (hooks) {
|
||||
// Remove all attribute maps
|
||||
await Promise.all(
|
||||
findAll(
|
||||
'[name="account_attribute_maps"] .hds-button--color-critical'
|
||||
).map((element) => click(element))
|
||||
'[name="account_attribute_maps"] .hds-button--color-critical',
|
||||
).map((element) => click(element)),
|
||||
);
|
||||
await fillIn('[name="account_attribute_maps"] input', 'attribute');
|
||||
await select('[name="account_attribute_maps"] select', 'email');
|
||||
@@ -292,7 +292,7 @@ module('Acceptance | auth-methods | update', function (hooks) {
|
||||
assert.deepEqual(ldapAuthMethod.attributes.certificates, certificates);
|
||||
assert.deepEqual(
|
||||
ldapAuthMethod.attributes.account_attribute_maps,
|
||||
account_attribute_maps
|
||||
account_attribute_maps,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -300,7 +300,7 @@ module('Acceptance | auth-methods | update', function (hooks) {
|
||||
assert.expect(1);
|
||||
instances.authMethod.authorized_actions =
|
||||
instances.authMethod.authorized_actions.filter(
|
||||
(item) => item !== 'update'
|
||||
(item) => item !== 'update',
|
||||
);
|
||||
await visit(urls.authMethods);
|
||||
|
||||
@@ -314,7 +314,7 @@ module('Acceptance | auth-methods | update', function (hooks) {
|
||||
featuresService.enable('ldap-auth-methods');
|
||||
instances.ldapAuthMethod.authorized_actions =
|
||||
instances.ldapAuthMethod.authorized_actions.filter(
|
||||
(item) => item !== 'update'
|
||||
(item) => item !== 'update',
|
||||
);
|
||||
await visit(urls.authMethods);
|
||||
|
||||
@@ -341,7 +341,7 @@ module('Acceptance | auth-methods | update', function (hooks) {
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
await visit(urls.authMethods);
|
||||
@@ -374,7 +374,7 @@ module('Acceptance | auth-methods | update', function (hooks) {
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
await visit(urls.authMethods);
|
||||
|
||||
Reference in new issue
Block a user