Replace time element with Hds::Time component (#3112)

* refactor: 💡 use Hds::Time component

* refactor: 💡 fix data test selector

* refactor: 💡 standardardized date/time format

* refactor: 💡 fix tests and remove date helpers

* fix: 🐛 fixed helper test import
This commit is contained in:
Priya Patel authored and GitHub committed 2026-02-02 18:52:19 -06:00
1 parent 1e49283a33
commit 1780077068
19 files changed
+85 -169

No files matched your search

@@ -9,10 +9,9 @@ import {
TYPE_CREDENTIAL_JSON,
TYPE_CREDENTIAL_SSH_PRIVATE_KEY,
TYPE_CREDENTIAL_USERNAME_PASSWORD_DOMAIN,
TYPE_CREDENTIAL_USERNAME_PASSWORD
TYPE_CREDENTIAL_USERNAME_PASSWORD,
} from 'api/models/credential';
module('Unit | Model | credential', function (hooks) {
setupTest(hooks);
@@ -35,7 +34,9 @@ module('Unit | Model | credential', function (hooks) {
test('it has isJSON property and returns the expected values', async function (assert) {
const store = this.owner.lookup('service:store');
const modelA = store.createRecord('credential', { type: TYPE_CREDENTIAL_JSON });
const modelA = store.createRecord('credential', {
type: TYPE_CREDENTIAL_JSON,
});
const modelB = store.createRecord('credential', {
type: TYPE_CREDENTIAL_USERNAME_PASSWORD,
});
@@ -51,13 +52,15 @@ module('Unit | Model | credential', function (hooks) {
test('it has isUnknown property and returns the expected values', async function (assert) {
const store = this.owner.lookup('service:store');
const modelA = store.createRecord('credential', {
type: TYPE_CREDENTIAL_USERNAME_PASSWORD
type: TYPE_CREDENTIAL_USERNAME_PASSWORD,
});
const modelB = store.createRecord('credential', {
type: TYPE_CREDENTIAL_SSH_PRIVATE_KEY
type: TYPE_CREDENTIAL_SSH_PRIVATE_KEY,
});
const modelC = store.createRecord('credential', { type: 'unknown' });
const modelD = store.createRecord('credential', { type: TYPE_CREDENTIAL_USERNAME_PASSWORD_DOMAIN });
const modelD = store.createRecord('credential', {
type: TYPE_CREDENTIAL_USERNAME_PASSWORD_DOMAIN,
});
assert.false(modelA.isUnknown);
assert.false(modelB.isUnknown);