feat: show existing recordings on materials page (#8102)
* feat: show existing recordings on materials page * chore: notes and recordings tests WIP * chore: test session recordings * feat: label all session recording urls as meetecho
This commit is contained in:
parent
afbe6aa429
commit
5348aefef9
|
@ -407,6 +407,40 @@ class MeetingTests(BaseMeetingTestCase):
|
||||||
r = self.client.get(urlreverse('floor-plan', kwargs=dict(num=meeting.number)))
|
r = self.client.get(urlreverse('floor-plan', kwargs=dict(num=meeting.number)))
|
||||||
self.assertEqual(r.status_code, 200)
|
self.assertEqual(r.status_code, 200)
|
||||||
|
|
||||||
|
def test_session_recordings_via_factories(self):
|
||||||
|
session = SessionFactory(meeting__type_id="ietf")
|
||||||
|
self.assertEqual(session.meetecho_recording_name, "")
|
||||||
|
self.assertEqual(len(session.recordings()), 0)
|
||||||
|
url = urlreverse("ietf.meeting.views.session_details", kwargs=dict(num=session.meeting.number, acronym=session.group.acronym))
|
||||||
|
r = self.client.get(url)
|
||||||
|
q = PyQuery(r.content)
|
||||||
|
# debug.show("q('#notes_and_recordings_1')")
|
||||||
|
self.assertEqual(len(q("#notes_and_recordings_1 tr")), 1)
|
||||||
|
link = q("#notes_and_recordings_1 tr a")
|
||||||
|
self.assertEqual(len(link), 1)
|
||||||
|
self.assertEqual(link[0].attrib['href'], str(session.session_recording_url()))
|
||||||
|
|
||||||
|
session.meetecho_recording_name = 'my_test_session_name'
|
||||||
|
session.save()
|
||||||
|
r = self.client.get(url)
|
||||||
|
q = PyQuery(r.content)
|
||||||
|
self.assertEqual(len(q("#notes_and_recordings_1 tr")), 1)
|
||||||
|
links = q("#notes_and_recordings_1 tr a")
|
||||||
|
self.assertEqual(len(links), 1)
|
||||||
|
self.assertEqual(links[0].attrib['href'], session.session_recording_url())
|
||||||
|
|
||||||
|
new_recording_url = "https://www.youtube.com/watch?v=jNQXAC9IVRw"
|
||||||
|
new_recording_title = "Me at the zoo"
|
||||||
|
create_recording(session, new_recording_url, new_recording_title)
|
||||||
|
r = self.client.get(url)
|
||||||
|
q = PyQuery(r.content)
|
||||||
|
self.assertEqual(len(q("#notes_and_recordings_1 tr")), 2)
|
||||||
|
links = q("#notes_and_recordings_1 tr a")
|
||||||
|
self.assertEqual(len(links), 2)
|
||||||
|
self.assertEqual(links[0].attrib['href'], new_recording_url)
|
||||||
|
self.assertIn(new_recording_title, links[0].text_content())
|
||||||
|
#debug.show("q('#notes_and_recordings_1')")
|
||||||
|
|
||||||
def test_agenda_ical_next_meeting_type(self):
|
def test_agenda_ical_next_meeting_type(self):
|
||||||
# start with no upcoming IETF meetings, just an interim
|
# start with no upcoming IETF meetings, just an interim
|
||||||
MeetingFactory(
|
MeetingFactory(
|
||||||
|
|
|
@ -320,7 +320,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# Recordings #}
|
{# Recordings #}
|
||||||
{% if session.has_recordings %}
|
|
||||||
{% with session.recordings as recordings %}
|
{% with session.recordings as recordings %}
|
||||||
{% if recordings %}
|
{% if recordings %}
|
||||||
{# There's no guaranteed order, so this is a bit messy: #}
|
{# There's no guaranteed order, so this is a bit messy: #}
|
||||||
|
@ -356,16 +355,16 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% if session.video_stream_url %}
|
{% if session.session_recording_url %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ session.session_recording_url }}">
|
<a href="{{ session.session_recording_url }}">
|
||||||
<i class="bi bi-file-slides"></i> Session recording
|
<i class="bi bi-file-slides"></i>
|
||||||
|
Meetecho session recording
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue