Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
6f7328a6
Commit
6f7328a6
authored
Sep 25, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing tests
parent
6bd4782f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
spec/messages.js
spec/messages.js
+10
-9
No files found.
spec/messages.js
View file @
6f7328a6
...
...
@@ -1752,8 +1752,8 @@
media
=
view
.
el
.
querySelector
(
'
.chat-msg .chat-msg__media
'
);
expect
(
media
.
innerHTML
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)).
toEqual
(
'
<!-- src/templates/audio.html -->
'
+
'
<audio controls=""
><source src="http://localhost/audio.mp3" type="audio/mpeg
"></audio>
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/audio.mp3">Download audio file</a>
'
);
'
<audio controls=""
src="http://localhost/audio.mp3
"></audio>
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/audio.mp3">Download audio file
"audio.mp3"
</a>
'
);
// If the <url> and <body> contents is the same, don't duplicate.
const
stanza
=
Strophe
.
xmlHtmlNode
(
...
...
@@ -1771,8 +1771,9 @@
media
=
view
.
el
.
querySelector
(
'
.chat-msg:last-child .chat-msg__media
'
);
expect
(
media
.
innerHTML
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)).
toEqual
(
'
<!-- src/templates/audio.html -->
'
+
'
<audio controls=""><source src="http://localhost/audio.mp3" type="audio/mpeg"></audio>
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/audio.mp3">Download audio file</a>
'
);
'
<audio controls="" src="http://localhost/audio.mp3"></audio>
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/audio.mp3">Download audio file "audio.mp3"</a>
'
);
done
();
}).
catch
(
_
.
partial
(
_converse
.
log
,
_
,
Strophe
.
LogLevel
.
FATAL
))
}));
...
...
@@ -1807,8 +1808,8 @@
media
=
view
.
el
.
querySelector
(
'
.chat-msg .chat-msg__media
'
);
expect
(
media
.
innerHTML
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)).
toEqual
(
'
<!-- src/templates/video.html -->
'
+
'
<video controls=""
><source src="http://localhost/video.mp4" type="video/mp4
"></video>
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/video.mp4">Download video file</a>
'
);
'
<video controls=""
src="http://localhost/video.mp4" style="max-height: 50vh
"></video>
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/video.mp4">Download video file
"video.mp4"
</a>
'
);
// If the <url> and <body> contents is the same, don't duplicate.
const
stanza
=
Strophe
.
xmlHtmlNode
(
...
...
@@ -1826,8 +1827,8 @@
media
=
view
.
el
.
querySelector
(
'
.chat-msg:last-child .chat-msg__media
'
);
expect
(
media
.
innerHTML
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)).
toEqual
(
'
<!-- src/templates/video.html -->
'
+
'
<video controls=""
><source src="http://localhost/video.mp4" type="video/mp4
"></video>
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/video.mp4">Download video file</a>
'
);
'
<video controls=""
src="http://localhost/video.mp4" style="max-height: 50vh
"></video>
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/video.mp4">Download video file
"video.mp4"
</a>
'
);
done
();
}).
catch
(
_
.
partial
(
_converse
.
log
,
_
,
Strophe
.
LogLevel
.
FATAL
))
}));
...
...
@@ -1862,7 +1863,7 @@
const
media
=
view
.
el
.
querySelector
(
'
.chat-msg .chat-msg__media
'
);
expect
(
media
.
innerHTML
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)).
toEqual
(
'
<!-- src/templates/file.html -->
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/funny.pdf">Download "funny.pdf"</a>
'
);
'
<a target="_blank" rel="noopener" href="http://localhost/funny.pdf">Download
file
"funny.pdf"</a>
'
);
done
();
});
}));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment