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
34fa0588
Commit
34fa0588
authored
Mar 05, 2014
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add (currently still disabled) test for...
message counter for minimized chats
parent
317ab95c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
spec/chatbox.js
spec/chatbox.js
+40
-0
No files found.
spec/chatbox.js
View file @
34fa0588
...
@@ -343,6 +343,46 @@
...
@@ -343,6 +343,46 @@
},
converse
));
},
converse
));
},
converse
));
},
converse
));
// TODO: This feature is not yet implemented
xit
(
"
received for a minimized chat box will increment a counter on its header
"
,
$
.
proxy
(
function
()
{
var
contact_name
=
mock
.
cur_names
[
0
];
var
contact_jid
=
contact_name
.
replace
(
'
'
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
spyOn
(
this
,
'
emit
'
);
runs
(
function
()
{
utils
.
openChatBoxFor
(
contact_jid
);
});
waits
(
250
);
runs
(
function
()
{
var
chatview
=
converse
.
chatboxviews
.
get
(
contact_jid
);
expect
(
chatview
.
model
.
get
(
'
minimized
'
)).
toBeFalsy
();
chatview
.
$el
.
find
(
'
.toggle-chatbox-button
'
).
click
();
});
waits
(
250
);
runs
(
$
.
proxy
(
function
()
{
var
chatview
=
this
.
chatboxviews
.
get
(
contact_jid
);
expect
(
chatview
.
model
.
get
(
'
minimized
'
)).
toBeTruthy
();
var
message
=
'
This message is sent to a minimized chatbox
'
;
var
sender_jid
=
mock
.
cur_names
[
0
].
replace
(
'
'
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
msg
=
$msg
({
from
:
sender_jid
,
to
:
this
.
connection
.
jid
,
type
:
'
chat
'
,
id
:
(
new
Date
()).
getTime
()
}).
c
(
'
body
'
).
t
(
message
).
up
()
.
c
(
'
active
'
,
{
'
xmlns
'
:
'
http://jabber.org/protocol/chatstates
'
}).
tree
();
this
.
chatboxes
.
onMessage
(
msg
);
expect
(
this
.
emit
).
toHaveBeenCalledWith
(
'
onMessage
'
,
msg
);
},
converse
));
waits
(
250
);
runs
(
$
.
proxy
(
function
()
{
var
chatview
=
this
.
chatboxviews
.
get
(
contact_jid
);
expect
(
chatview
.
model
.
get
(
'
minimized
'
)).
toBeTruthy
();
expect
(
chatview
.
$el
.
find
(
'
.chat-head-message-count
'
).
length
).
toBe
(
1
);
},
converse
));
},
converse
));
it
(
"
will indate when it has a time difference of more than a day between it and it's predecessor
"
,
$
.
proxy
(
function
()
{
it
(
"
will indate when it has a time difference of more than a day between it and it's predecessor
"
,
$
.
proxy
(
function
()
{
spyOn
(
converse
,
'
emit
'
);
spyOn
(
converse
,
'
emit
'
);
var
contact_name
=
mock
.
cur_names
[
1
];
var
contact_name
=
mock
.
cur_names
[
1
];
...
...
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