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
2ff18c2c
Commit
2ff18c2c
authored
Mar 14, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix emoji test (now that bootstrap dropdown is used)
parent
2045741f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
spec/chatbox.js
spec/chatbox.js
+17
-3
src/converse-core.js
src/converse-core.js
+1
-0
No files found.
spec/chatbox.js
View file @
2ff18c2c
...
...
@@ -441,6 +441,8 @@
view
.
delegateEvents
();
// We need to rebind all events otherwise our spy won't be called
toolbar
.
querySelector
(
'
li.toggle-smiley
'
).
click
();
var
timeout
=
false
;
test_utils
.
waitUntil
(
function
()
{
return
utils
.
isVisible
(
view
.
el
.
querySelector
(
'
.toggle-smiley .emoji-picker-container
'
));
},
150
).
then
(
function
()
{
...
...
@@ -448,10 +450,22 @@
var
items
=
picker
.
querySelectorAll
(
'
.emoji-picker li
'
);
items
[
0
].
click
()
expect
(
view
.
insertEmoji
).
toHaveBeenCalled
();
setTimeout
(
function
()
{
timeout
=
true
;
},
100
);
return
test_utils
.
waitUntil
(
function
()
{
return
timeout
;
},
300
);
}).
then
(
function
()
{
timeout
=
false
;
toolbar
.
querySelector
(
'
li.toggle-smiley
'
).
click
();
// Close the panel again
return
test_utils
.
waitUntil
(
function
()
{
return
!
view
.
el
.
querySelector
(
'
.toggle-smiley .toolbar-menu
'
).
offsetHeight
;
},
900
);
},
300
);
}).
then
(
function
()
{
setTimeout
(
function
()
{
timeout
=
true
;
},
100
);
return
test_utils
.
waitUntil
(
function
()
{
return
timeout
;
},
300
);
}).
then
(
function
()
{
toolbar
.
querySelector
(
'
li.toggle-smiley
'
).
click
();
expect
(
view
.
toggleEmojiMenu
).
toHaveBeenCalled
();
...
...
@@ -485,12 +499,12 @@
test_utils
.
openChatBoxFor
(
_converse
,
contact_jid
);
var
view
=
_converse
.
chatboxviews
.
get
(
contact_jid
);
var
$toolbar
=
$
(
view
.
el
).
find
(
'
ul.chat-toolbar
'
);
expect
(
$toolbar
.
children
(
'
li
.toggle-otr
'
).
length
).
toBe
(
1
);
expect
(
$toolbar
.
children
(
'
.toggle-otr
'
).
length
).
toBe
(
1
);
// Register spies
spyOn
(
view
,
'
toggleOTRMenu
'
).
and
.
callThrough
();
view
.
delegateEvents
();
// We need to rebind all events otherwise our spy won't be called
$toolbar
[
0
].
querySelector
(
'
li
.toggle-otr
'
).
click
();
$toolbar
[
0
].
querySelector
(
'
.toggle-otr
'
).
click
();
expect
(
view
.
toggleOTRMenu
).
toHaveBeenCalled
();
done
();
});
...
...
src/converse-core.js
View file @
2ff18c2c
...
...
@@ -66,6 +66,7 @@
_
.
extend
(
_converse
,
Backbone
.
Events
);
// Core plugins are whitelisted automatically
_converse
.
core_plugins
=
[
'
converse-bookmarks
'
,
'
converse-chatboxes
'
,
...
...
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