mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-04 06:18:24 +08:00
fix(account-sidebar): Fix specs to match new unread counts
This commit is contained in:
parent
afa6968dc4
commit
e72d522b2b
1 changed files with 203 additions and 192 deletions
|
@ -34,217 +34,228 @@ describe "AccountSidebarStore", ->
|
|||
name: 'Drafts'
|
||||
]
|
||||
|
||||
expected = [
|
||||
{
|
||||
label: 'Mailboxes',
|
||||
items: [
|
||||
{
|
||||
id: '1',
|
||||
# Note: If you replace this JSON with new JSON, you may have to replace
|
||||
# A\E with A\\E manually.
|
||||
expected = [{
|
||||
label: 'Mailboxes',
|
||||
items: [
|
||||
{
|
||||
id: '1',
|
||||
name: 'Inbox',
|
||||
mailViewFilter: {
|
||||
name: 'Inbox',
|
||||
mailViewFilter: {
|
||||
name: 'Inbox',
|
||||
category: {
|
||||
client_id: '1',
|
||||
name: 'inbox',
|
||||
display_name: 'Inbox',
|
||||
id: '1'
|
||||
},
|
||||
iconName: 'inbox.png'
|
||||
category: {
|
||||
client_id: '1',
|
||||
name: 'inbox',
|
||||
display_name: 'Inbox',
|
||||
id: '1'
|
||||
},
|
||||
children: [
|
||||
|
||||
]
|
||||
iconName: 'inbox.png'
|
||||
},
|
||||
{
|
||||
id: 'starred',
|
||||
children: [
|
||||
|
||||
],
|
||||
unreadCount: null
|
||||
},
|
||||
{
|
||||
id: 'starred',
|
||||
name: 'Starred',
|
||||
mailViewFilter: {
|
||||
name: 'Starred',
|
||||
mailViewFilter: {
|
||||
name: 'Starred',
|
||||
iconName: 'starred.png'
|
||||
},
|
||||
children: [
|
||||
|
||||
]
|
||||
iconName: 'starred.png'
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
children: [
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
name: 'Sent',
|
||||
mailViewFilter: {
|
||||
name: 'Sent',
|
||||
mailViewFilter: {
|
||||
name: 'Sent',
|
||||
category: {
|
||||
client_id: '3',
|
||||
name: 'sent',
|
||||
display_name: 'Sent',
|
||||
id: '3'
|
||||
},
|
||||
iconName: 'sent.png'
|
||||
category: {
|
||||
client_id: '3',
|
||||
name: 'sent',
|
||||
display_name: 'Sent',
|
||||
id: '3'
|
||||
},
|
||||
children: [
|
||||
|
||||
]
|
||||
iconName: 'sent.png'
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
children: [
|
||||
|
||||
],
|
||||
unreadCount: 0
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
name: 'Important',
|
||||
mailViewFilter: {
|
||||
name: 'Important',
|
||||
mailViewFilter: {
|
||||
name: 'Important',
|
||||
category: {
|
||||
client_id: '4',
|
||||
name: 'important',
|
||||
display_name: 'Important',
|
||||
id: '4'
|
||||
},
|
||||
iconName: 'important.png'
|
||||
category: {
|
||||
client_id: '4',
|
||||
name: 'important',
|
||||
display_name: 'Important',
|
||||
id: '4'
|
||||
},
|
||||
children: [
|
||||
|
||||
]
|
||||
iconName: 'important.png'
|
||||
},
|
||||
{
|
||||
id: 'Drafts',
|
||||
component: {
|
||||
children: [
|
||||
|
||||
},
|
||||
name: 'Drafts',
|
||||
sheet: 'stub',
|
||||
children: [
|
||||
],
|
||||
unreadCount: 0
|
||||
},
|
||||
{
|
||||
id: 'Drafts',
|
||||
component: {
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Folders',
|
||||
iconName: 'folder.png',
|
||||
items: [
|
||||
{
|
||||
id: 'a',
|
||||
},
|
||||
name: 'Drafts',
|
||||
sheet: 'stub',
|
||||
children: [
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Folders',
|
||||
items: [
|
||||
{
|
||||
id: 'a',
|
||||
name: 'A',
|
||||
mailViewFilter: {
|
||||
name: 'A',
|
||||
mailViewFilter: {
|
||||
name: 'A',
|
||||
category: {
|
||||
client_id: 'a',
|
||||
display_name: 'A',
|
||||
id: 'a'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
category: {
|
||||
client_id: 'a',
|
||||
display_name: 'A',
|
||||
id: 'a'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
id: 'a+b',
|
||||
name: 'B',
|
||||
mailViewFilter: {
|
||||
name: 'A/B',
|
||||
category: {
|
||||
client_id: 'a+b',
|
||||
display_name: 'A/B',
|
||||
id: 'a+b'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
id: 'a+b+c',
|
||||
name: 'C',
|
||||
mailViewFilter: {
|
||||
name: 'A/B/C',
|
||||
category: {
|
||||
client_id: 'a+b+c',
|
||||
display_name: 'A/B/C',
|
||||
id: 'a+b+c'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
children: [
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'a+d',
|
||||
name: 'D',
|
||||
mailViewFilter: {
|
||||
name: 'A.D',
|
||||
category: {
|
||||
client_id: 'a+d',
|
||||
display_name: 'A.D',
|
||||
id: 'a+d'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
children: [
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'a+e',
|
||||
name: 'E',
|
||||
mailViewFilter: {
|
||||
name: 'A\\E',
|
||||
category: {
|
||||
client_id: 'a+e',
|
||||
display_name: 'A\\E',
|
||||
id: 'a+e'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
children: [
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'a+b-c',
|
||||
name: 'B-C',
|
||||
mailViewFilter: {
|
||||
name: 'A/B-C',
|
||||
category: {
|
||||
client_id: 'a+b-c',
|
||||
display_name: 'A/B-C',
|
||||
id: 'a+b-c'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
children: [
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
{
|
||||
id: 'b',
|
||||
name: 'B',
|
||||
mailViewFilter: {
|
||||
children: [
|
||||
{
|
||||
id: 'a+b',
|
||||
name: 'B',
|
||||
category: {
|
||||
client_id: 'b',
|
||||
display_name: 'B',
|
||||
id: 'b'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
id: 'b+c',
|
||||
name: 'C',
|
||||
mailViewFilter: {
|
||||
name: 'B/C',
|
||||
category: {
|
||||
client_id: 'b+c',
|
||||
display_name: 'B/C',
|
||||
id: 'b+c'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
mailViewFilter: {
|
||||
name: 'A/B',
|
||||
category: {
|
||||
client_id: 'a+b',
|
||||
display_name: 'A/B',
|
||||
id: 'a+b'
|
||||
},
|
||||
children: [
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
id: 'a+b+c',
|
||||
name: 'C',
|
||||
mailViewFilter: {
|
||||
name: 'A/B/C',
|
||||
category: {
|
||||
client_id: 'a+b+c',
|
||||
display_name: 'A/B/C',
|
||||
id: 'a+b+c'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
children: [
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
unreadCount: 0
|
||||
}
|
||||
],
|
||||
unreadCount: 0
|
||||
},
|
||||
{
|
||||
id: 'a+d',
|
||||
name: 'D',
|
||||
mailViewFilter: {
|
||||
name: 'A.D',
|
||||
category: {
|
||||
client_id: 'a+d',
|
||||
display_name: 'A.D',
|
||||
id: 'a+d'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
children: [
|
||||
|
||||
],
|
||||
unreadCount: 0
|
||||
},
|
||||
{
|
||||
id: 'a+e',
|
||||
name: 'E',
|
||||
mailViewFilter: {
|
||||
name: 'A\\E',
|
||||
category: {
|
||||
client_id: 'a+e',
|
||||
display_name: 'A\\E',
|
||||
id: 'a+e'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
children: [
|
||||
|
||||
],
|
||||
unreadCount: 0
|
||||
},
|
||||
{
|
||||
id: 'a+b-c',
|
||||
name: 'B-C',
|
||||
mailViewFilter: {
|
||||
name: 'A/B-C',
|
||||
category: {
|
||||
client_id: 'a+b-c',
|
||||
display_name: 'A/B-C',
|
||||
id: 'a+b-c'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
children: [
|
||||
|
||||
],
|
||||
unreadCount: 0
|
||||
}
|
||||
],
|
||||
unreadCount: 0
|
||||
},
|
||||
{
|
||||
id: 'b',
|
||||
name: 'B',
|
||||
mailViewFilter: {
|
||||
name: 'B',
|
||||
category: {
|
||||
client_id: 'b',
|
||||
display_name: 'B',
|
||||
id: 'b'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
id: 'b+c',
|
||||
name: 'C',
|
||||
mailViewFilter: {
|
||||
name: 'B/C',
|
||||
category: {
|
||||
client_id: 'b+c',
|
||||
display_name: 'B/C',
|
||||
id: 'b+c'
|
||||
},
|
||||
iconName: 'folder.png'
|
||||
},
|
||||
children: [
|
||||
|
||||
],
|
||||
unreadCount: 0
|
||||
}
|
||||
],
|
||||
unreadCount: 0
|
||||
}
|
||||
],
|
||||
iconName: 'folder.png'
|
||||
}]
|
||||
|
||||
AccountSidebarStore._refreshSections()
|
||||
|
||||
|
|
Loading…
Reference in a new issue