Icu 9415 remove sorted computed value for connections channels (#276)

* refactor: 💡 remove sorted connections from session recording

Removed from session recording model and respective templates

✅ Closes: ICU-9415

* refactor: 💡 remove sorted channels from connections model

and removed from the appropriate templates and breadcrumb
This commit is contained in:
Cameron Perera authored and GitHub committed 2023-05-23 16:10:39 -05:00
1 parent 7cb9ae9f3b
commit a63776e76f
7 files changed
+6 -62

No files matched your search

@@ -20,23 +20,4 @@ module('Unit | Model | connection-recording', function (hooks) {
const channel_recordings = await model.channel_recordings;
assert.strictEqual(channel_recordings.length, 1);
});
test('it has sortedChannelsByStartTimeDesc property and returns the expected values', async function (assert) {
assert.expect(3);
const store = this.owner.lookup('service:store');
const newestChannel = store.createRecord('channel-recording', {
start_time: new Date('2023-01-02T00:00:00.999Z'),
});
const oldestChannel = store.createRecord('channel-recording', {
start_time: new Date('2023-01-01T00:00:00.999Z'),
});
const model = store.createRecord('connection-recording', {
channel_recordings: [oldestChannel, newestChannel],
});
const sortedChannels = await model.sortedChannelsByStartTimeDesc;
assert.strictEqual(sortedChannels.length, 2);
assert.strictEqual(sortedChannels[0].start_time, newestChannel.start_time);
assert.strictEqual(sortedChannels[1].start_time, oldestChannel.start_time);
});
});
@@ -51,32 +51,6 @@ module('Unit | Model | session-recording', function (hooks) {
assert.strictEqual(connection_recordings.length, 1);
});
test('it has sortedConnectionsByStartTimeDesc property and returns the expected values', async function (assert) {
assert.expect(3);
const store = this.owner.lookup('service:store');
const newestConnection = store.createRecord('connection-recording', {
start_time: new Date('2023-01-02T00:00:00.999Z'),
});
const oldestConnection = store.createRecord('connection-recording', {
start_time: new Date('2023-01-01T00:00:00.999Z'),
});
const model = store.createRecord('session-recording', {
type: TYPE_SESSION_RECORDING_SSH,
connection_recordings: [oldestConnection, newestConnection],
});
const sortedConnections = await model.sortedConnectionsByStartTimeDesc;
assert.strictEqual(sortedConnections.length, 2);
assert.strictEqual(
sortedConnections[0].start_time,
newestConnection.start_time
);
assert.strictEqual(
sortedConnections[1].start_time,
oldestConnection.start_time
);
});
test('it has targetScopeDisplayName and returns the expected values', async function (assert) {
assert.expect(2);
const store = this.owner.lookup('service:store');