Icu 8329 create custom boundary wrapper for ember asciinema player (#103)
* refactor: 💡 fix broken page title translations * feat: 🎸 create SessionRecording::Player component ✅ Closes: ICU-8329
This commit is contained in:
1 parent
1b5eb6c01f
commit
449ea383c9
4 files changed
+49
-5
No files matched your search
@@ -0,0 +1,12 @@
|
||||
<div class='session-recording-player-layout'>
|
||||
<div class='session-recording-player-header'>
|
||||
<Hds::Link::Standalone
|
||||
@icon='arrow-left'
|
||||
@text='Back to channels'
|
||||
@href='...'
|
||||
/>
|
||||
</div>
|
||||
<div class='session-recording-player-theme'>
|
||||
<Heap::Player @data={{@asciiCast}} />
|
||||
</div>
|
||||
</div>
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
{{page-title (t 'resources.session-recordings.channel.title_plural')}}
|
||||
{{page-title (t 'resources.session-recording.channel.title_plural')}}
|
||||
|
||||
{{outlet}}
|
||||
+2
-4
@@ -1,7 +1,5 @@
|
||||
{{page-title (t 'resources.session-recordings.channel.title')}}
|
||||
{{page-title (t 'resources.session-recording.channel.title')}}
|
||||
|
||||
<p>{{@model.scope_id}}</p>
|
||||
<div>
|
||||
<Heap::Player @data={{@model.asciicast}} />
|
||||
</div>
|
||||
<SessionRecording::Player @asciiCast={{@model.asciicast}} />
|
||||
{{outlet}}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'admin/tests/helpers';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | session-recording/player', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
const castConfig = {
|
||||
version: 2,
|
||||
width: 124,
|
||||
height: 36,
|
||||
timestamp: 1670352594,
|
||||
env: { SHELL: '/bin/zsh', TERM: 'xterm-256color' },
|
||||
};
|
||||
this.cast = `${JSON.stringify(castConfig)}
|
||||
[2.676444, "o", "y"]
|
||||
[2.788653, "o", "a"]
|
||||
[2.868652, "o", "r"]
|
||||
[3.001764, "o", "n"]
|
||||
[3.167636, "o", " "]
|
||||
[3.313668, "o", "t"]
|
||||
[3.460527, "o", "e"]
|
||||
[3.561983, "o", "s"]
|
||||
[3.63678, "o", "t"]`;
|
||||
|
||||
await render(hbs`
|
||||
<SessionRecording::Player @asciiCast={{this.cast}} />
|
||||
`);
|
||||
|
||||
assert.dom(this.element).hasText('Back to channels --:----:--');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user