feat: 🎸 update player to allow routing to provided route (#173)

✅ Closes: ICU-8381
This commit is contained in:
Cameron Perera authored and GitHub committed 2023-03-31 14:10:36 -05:00
1 parent 02d8b7e77c
commit 8c01ec2f20
4 files changed
+19 -4

No files matched your search

@@ -1,5 +1,5 @@
import { module, test } from 'qunit';
import { visit, currentURL } from '@ember/test-helpers';
import { visit, currentURL, click } from '@ember/test-helpers';
import { setupApplicationTest } from 'admin/tests/helpers';
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
import { authenticateSession } from 'ember-simple-auth/test-support';
@@ -59,5 +59,15 @@ module(
await visit(urls.connectionRecording);
assert.strictEqual(currentURL(), urls.connectionRecording);
});
test('user can navigate back to session recording screen', async function (assert) {
assert.expect(1);
// Visit channel
await visit(urls.connectionRecording);
// click "Back to channels" link in player header
await click('.session-recording-player-header > a');
assert.strictEqual(currentURL(), urls.sessionRecording);
});
}
);
@@ -26,7 +26,7 @@ module('Integration | Component | session-recording/player', function (hooks) {
[3.63678, "o", "t"]`;
await render(hbs`
<SessionRecording::Player @asciiCast={{this.cast}} />
<SessionRecording::Player @asciiCast={{this.cast}} @route='test.route' @model='t_123' />
`);
assert.dom(this.element).hasText('Back to channels --:----:--');