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
3fe3d354
Commit
3fe3d354
authored
Apr 19, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix in tests
Controlbox's status widget was being overwritten
parent
c1bb3ca7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
spec/MainSpec.js
spec/MainSpec.js
+9
-9
No files found.
spec/MainSpec.js
View file @
3fe3d354
...
@@ -412,17 +412,17 @@
...
@@ -412,17 +412,17 @@
it
(
"
can be saved to, and retrieved from, localStorage
"
,
$
.
proxy
(
function
()
{
it
(
"
can be saved to, and retrieved from, localStorage
"
,
$
.
proxy
(
function
()
{
// We instantiate a new ChatBoxes collection, which by default
// We instantiate a new ChatBoxes collection, which by default
// will be empty.
// will be empty.
this
.
newchatboxes
=
new
this
.
ChatBoxes
();
var
newchatboxes
=
new
this
.
ChatBoxes
();
expect
(
this
.
newchatboxes
.
length
).
toEqual
(
0
);
expect
(
newchatboxes
.
length
).
toEqual
(
0
);
// The chatboxes will then be fetched from localStorage inside the
// The chatboxes will then be fetched from localStorage inside the
// onConnected method
// onConnected method
this
.
newchatboxes
.
onConnected
();
newchatboxes
.
onConnected
();
expect
(
this
.
newchatboxes
.
length
).
toEqual
(
6
);
expect
(
newchatboxes
.
length
).
toEqual
(
6
);
// Check that the roster items retrieved from localStorage
// Check that the roster items retrieved from localStorage
// have the same attributes values as the original ones.
// have the same attributes values as the original ones.
attrs
=
[
'
id
'
,
'
box_id
'
,
'
visible
'
];
attrs
=
[
'
id
'
,
'
box_id
'
,
'
visible
'
];
for
(
i
=
0
;
i
<
attrs
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
attrs
.
length
;
i
++
)
{
new_attrs
=
_
.
pluck
(
_
.
pluck
(
this
.
newchatboxes
.
models
,
'
attributes
'
),
attrs
[
i
]);
new_attrs
=
_
.
pluck
(
_
.
pluck
(
newchatboxes
.
models
,
'
attributes
'
),
attrs
[
i
]);
old_attrs
=
_
.
pluck
(
_
.
pluck
(
this
.
chatboxes
.
models
,
'
attributes
'
),
attrs
[
i
]);
old_attrs
=
_
.
pluck
(
_
.
pluck
(
this
.
chatboxes
.
models
,
'
attributes
'
),
attrs
[
i
]);
expect
(
_
.
isEqual
(
new_attrs
,
old_attrs
)).
toEqual
(
true
);
expect
(
_
.
isEqual
(
new_attrs
,
old_attrs
)).
toEqual
(
true
);
}
}
...
@@ -443,13 +443,13 @@
...
@@ -443,13 +443,13 @@
},
xmppchat
));
},
xmppchat
));
it
(
"
will be removed from localStorage when closed
"
,
$
.
proxy
(
function
()
{
it
(
"
will be removed from localStorage when closed
"
,
$
.
proxy
(
function
()
{
this
.
newchatboxes
=
new
this
.
ChatBoxes
();
var
newchatboxes
=
new
this
.
ChatBoxes
();
expect
(
this
.
newchatboxes
.
length
).
toEqual
(
0
);
expect
(
newchatboxes
.
length
).
toEqual
(
0
);
// onConnected will fetch chatboxes in localStorage, but
// onConnected will fetch chatboxes in localStorage, but
// because there aren't any open chatboxes, there won't be any
// because there aren't any open chatboxes, there won't be any
// in localStorage either.
// in localStorage either.
this
.
chatboxes
.
onConnected
();
new
chatboxes
.
onConnected
();
expect
(
this
.
chatboxes
.
length
).
toEqual
(
0
);
expect
(
new
chatboxes
.
length
).
toEqual
(
0
);
},
xmppchat
));
},
xmppchat
));
describe
(
"
A Chat Message
"
,
$
.
proxy
(
function
()
{
describe
(
"
A Chat Message
"
,
$
.
proxy
(
function
()
{
...
...
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