Optimise Jest run in CI (#9542)

This commit is contained in:
Michael Telatynski 2022-11-04 10:48:08 +00:00 committed by GitHub
parent 28ecdc0cb4
commit 04bc8fb71c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 1388 additions and 1305 deletions

View file

@ -31,19 +31,19 @@ exports[`MLocationBody <MLocationBody> with error displays correct fallback cont
exports[`MLocationBody <MLocationBody> without error renders map correctly 1`] = `
<MLocationBody
highlightLink=""
highlights={Array []}
mediaEventHelper={Object {}}
highlights={[]}
mediaEventHelper={{}}
mxEvent={
Object {
"content": Object {
{
"content": {
"body": "Found at geo:51.5076,-0.1276 at 2021-12-21T12:22+0000",
"geo_uri": "geo:51.5076,-0.1276",
"msgtype": "m.location",
"org.matrix.msc1767.text": "Found at geo:51.5076,-0.1276 at 2021-12-21T12:22+0000",
"org.matrix.msc3488.asset": Object {
"org.matrix.msc3488.asset": {
"type": "m.pin",
},
"org.matrix.msc3488.location": Object {
"org.matrix.msc3488.location": {
"description": "Human-readable label",
"uri": "geo:51.5076,-0.1276",
},
@ -55,21 +55,21 @@ exports[`MLocationBody <MLocationBody> without error renders map correctly 1`] =
}
onHeightChanged={[MockFunction]}
onMessageAllowed={[MockFunction]}
permalinkCreator={Object {}}
permalinkCreator={{}}
>
<LocationBodyContent
mapId="mx_MLocationBody_$2_HHHHHHHH"
mxEvent={
Object {
"content": Object {
{
"content": {
"body": "Found at geo:51.5076,-0.1276 at 2021-12-21T12:22+0000",
"geo_uri": "geo:51.5076,-0.1276",
"msgtype": "m.location",
"org.matrix.msc1767.text": "Found at geo:51.5076,-0.1276 at 2021-12-21T12:22+0000",
"org.matrix.msc3488.asset": Object {
"org.matrix.msc3488.asset": {
"type": "m.pin",
},
"org.matrix.msc3488.location": Object {
"org.matrix.msc3488.location": {
"description": "Human-readable label",
"uri": "geo:51.5076,-0.1276",
},
@ -116,8 +116,8 @@ exports[`MLocationBody <MLocationBody> without error renders map correctly 1`] =
id="mx_MLocationBody_$2_HHHHHHHH-marker"
map={
MockMap {
"_events": Object {
"error": Array [
"_events": {
"error": [
[Function],
[Function],
[Function],
@ -129,22 +129,22 @@ exports[`MLocationBody <MLocationBody> without error renders map correctly 1`] =
"_eventsCount": 1,
"_maxListeners": undefined,
"addControl": [MockFunction] {
"calls": Array [
Array [
"calls": [
[
mockConstructor {},
"top-right",
],
Array [
[
mockConstructor {},
"top-right",
],
],
"results": Array [
Object {
"results": [
{
"type": "return",
"value": undefined,
},
Object {
{
"type": "return",
"value": undefined,
},
@ -153,26 +153,26 @@ exports[`MLocationBody <MLocationBody> without error renders map correctly 1`] =
"fitBounds": [MockFunction],
"removeControl": [MockFunction],
"setCenter": [MockFunction] {
"calls": Array [
Array [
Object {
"calls": [
[
{
"lat": 51.5076,
"lon": -0.1276,
},
],
Array [
Object {
[
{
"lat": 51.5076,
"lon": -0.1276,
},
],
],
"results": Array [
Object {
"results": [
{
"type": "return",
"value": undefined,
},
Object {
{
"type": "return",
"value": undefined,
},

View file

@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`MVideoBody does not crash when given a portrait image 1`] = `"<span class=\\"mx_MVideoBody\\"><div class=\\"mx_MVideoBody_container\\" style=\\"max-width: 182px; max-height: 324px;\\"><video class=\\"mx_MVideoBody\\" controls=\\"\\" controlslist=\\"nodownload\\" preload=\\"none\\" poster=\\"data:image/png;base64,00\\"></video><div style=\\"width: 182px; height: 324px;\\"></div></div></span>"`;
exports[`MVideoBody does not crash when given a portrait image 1`] = `"<span class="mx_MVideoBody"><div class="mx_MVideoBody_container" style="max-width: 182px; max-height: 324px;"><video class="mx_MVideoBody" controls="" controlslist="nodownload" preload="none" poster="data:image/png;base64,00"></video><div style="width: 182px; height: 324px;"></div></div></span>"`;

View file

@ -1,17 +1,17 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<TextualBody /> renders formatted m.text correctly linkification is not applied to code blocks 1`] = `
"<span class=\\"mx_EventTile_body markdown-body\\" dir=\\"auto\\"><p>Visit <code>https://matrix.org/</code></p>
<div class=\\"mx_EventTile_pre_container\\"><pre class=\\"mx_EventTile_collapsedCodeBlock\\"><span class=\\"mx_EventTile_lineNumbers\\"><span>1</span></span><code>https://matrix.org/
</code><span></span></pre><span class=\\"mx_EventTile_button mx_EventTile_copyButton \\"></span></div>
"<span class="mx_EventTile_body markdown-body" dir="auto"><p>Visit <code>https://matrix.org/</code></p>
<div class="mx_EventTile_pre_container"><pre class="mx_EventTile_collapsedCodeBlock"><span class="mx_EventTile_lineNumbers"><span>1</span></span><code>https://matrix.org/
</code><span></span></pre><span class="mx_EventTile_button mx_EventTile_copyButton "></span></div>
</span>"
`;
exports[`<TextualBody /> renders formatted m.text correctly pills do not appear in code blocks 1`] = `
"<span class=\\"mx_EventTile_body markdown-body\\" dir=\\"auto\\"><p><code>@room</code></p>
<div class=\\"mx_EventTile_pre_container\\"><pre class=\\"mx_EventTile_collapsedCodeBlock\\"><span class=\\"mx_EventTile_lineNumbers\\"><span>1</span></span><code>@room
</code><span></span></pre><span class=\\"mx_EventTile_button mx_EventTile_copyButton \\"></span></div>
"<span class="mx_EventTile_body markdown-body" dir="auto"><p><code>@room</code></p>
<div class="mx_EventTile_pre_container"><pre class="mx_EventTile_collapsedCodeBlock"><span class="mx_EventTile_lineNumbers"><span>1</span></span><code>@room
</code><span></span></pre><span class="mx_EventTile_button mx_EventTile_copyButton "></span></div>
</span>"
`;
exports[`<TextualBody /> renders formatted m.text correctly pills get injected correctly into the DOM 1`] = `"<span class=\\"mx_EventTile_body markdown-body\\" dir=\\"auto\\">Hey <span><bdi><a class=\\"mx_Pill mx_UserPill\\"><img class=\\"mx_BaseAvatar mx_BaseAvatar_image\\" src=\\"mxc://avatar.url/image.png\\" style=\\"width: 16px; height: 16px;\\" alt=\\"\\" aria-hidden=\\"true\\"><span class=\\"mx_Pill_linkText\\">Member</span></a></bdi></span></span>"`;
exports[`<TextualBody /> renders formatted m.text correctly pills get injected correctly into the DOM 1`] = `"<span class="mx_EventTile_body markdown-body" dir="auto">Hey <span><bdi><a class="mx_Pill mx_UserPill"><img class="mx_BaseAvatar mx_BaseAvatar_image" src="mxc://avatar.url/image.png" style="width: 16px; height: 16px;" alt="" aria-hidden="true"><span class="mx_Pill_linkText">Member</span></a></bdi></span></span>"`;