fix tests

pull/1306/head
Audric Ackermann 5 years ago
parent b75bb71a22
commit 133d541a48
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -231,7 +231,7 @@
messages.push(i18n('kickedFromTheGroup', names[0]));
}
}
return messages.join(', ');
return messages.join(' ');
}
if (this.isEndSession()) {
return i18n(this.getEndSessionTranslationKey());

@ -3,7 +3,7 @@
"label": "Session",
"submenu": [
{
"label": "About Session",
"label": "About",
"click": null
},
{
@ -39,10 +39,6 @@
{
"label": "Set Up with Import",
"click": null
},
{
"label": "Set Up as New Device",
"click": null
}
]
},

@ -3,7 +3,7 @@
"label": "Session",
"submenu": [
{
"label": "About Session",
"label": "About",
"click": null
},
{

@ -6,10 +6,6 @@
"label": "Set Up with Import",
"click": null
},
{
"label": "Set Up as New Device",
"click": null
},
{
"type": "separator"
},
@ -134,7 +130,7 @@
"type": "separator"
},
{
"label": "About Session",
"label": "About",
"click": null
}
]

@ -123,7 +123,7 @@
"type": "separator"
},
{
"label": "About Session",
"label": "About",
"click": null
}
]

@ -94,21 +94,21 @@ describe('MessageCollection', () => {
message = messages.add({ group_update: { left: 'Alice' } });
assert.equal(
message.getDescription(),
'Alice left the group',
'Alice has left the group.',
'Notes one person leaving the group.'
);
message = messages.add({ group_update: { name: 'blerg' } });
assert.equal(
message.getDescription(),
"Group name has been set to 'blerg'",
"Group name is now 'blerg'.",
'Returns a single notice if only group_updates.name changes.'
);
message = messages.add({ group_update: { joined: ['Bob'] } });
assert.equal(
message.getDescription(),
'Bob joined the group',
'Bob joined the group.',
'Returns a single notice if only group_updates.joined changes.'
);
@ -117,7 +117,7 @@ describe('MessageCollection', () => {
});
assert.equal(
message.getDescription(),
'Bob, Alice, Eve joined the group',
'Bob, Alice, Eve joined the group.',
'Notes when >1 person joins the group.'
);
@ -126,7 +126,7 @@ describe('MessageCollection', () => {
});
assert.equal(
message.getDescription(),
"Group name has been set to 'blerg', Bob joined the group",
"Group name is now 'blerg'. Bob joined the group.",
'Notes when there are multiple changes to group_updates properties.'
);

@ -74,27 +74,6 @@ describe('NetworkStatusView', () => {
assert.match(networkStatusView.$el.text(), /Offline/);
});
});
describe('network status when registration is not done', () => {
beforeEach(() => {
Whisper.Registration.remove();
});
it('should display an unlinked message', () => {
networkStatusView.update();
assert.match(networkStatusView.$el.text(), /Relink/);
});
it('should override socket status', () => {
_([
WebSocket.CONNECTING,
WebSocket.OPEN,
WebSocket.CLOSING,
WebSocket.CLOSED,
]).forEach(socketStatusVal => {
socketStatus = socketStatusVal;
networkStatusView.update();
assert.match(networkStatusView.$el.text(), /Relink/);
});
});
});
describe('network status when registration is done', () => {
beforeEach(() => {
networkStatusView.navigatorOnLine = () => true;

Loading…
Cancel
Save