mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
More spec fixes
This commit is contained in:
parent
c9e5b68f16
commit
617224be29
2 changed files with 7 additions and 5 deletions
|
@ -9,7 +9,7 @@ describe "AccountSwitcher", ->
|
||||||
|
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
account = AccountStore.accounts()[0]
|
account = AccountStore.accounts()[0]
|
||||||
spyOn(AccountStore, "accounts").andReturn [
|
accounts = [
|
||||||
account,
|
account,
|
||||||
{
|
{
|
||||||
emailAddress: "dillon@nylas.com",
|
emailAddress: "dillon@nylas.com",
|
||||||
|
@ -17,10 +17,8 @@ describe "AccountSwitcher", ->
|
||||||
label: "work"
|
label: "work"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
spyOn(SidebarStore, "currentAccount").andReturn account
|
|
||||||
|
|
||||||
switcher = TestUtils.renderIntoDocument(
|
switcher = TestUtils.renderIntoDocument(
|
||||||
<AccountSwitcher />
|
<AccountSwitcher accounts={accounts} focusedAccounts={[account]} />
|
||||||
)
|
)
|
||||||
|
|
||||||
it "doesn't render the dropdown if nothing clicked", ->
|
it "doesn't render the dropdown if nothing clicked", ->
|
||||||
|
@ -49,5 +47,6 @@ describe "AccountSwitcher", ->
|
||||||
items = TestUtils.scryRenderedDOMComponentsWithClass dropdown, "secondary-item"
|
items = TestUtils.scryRenderedDOMComponentsWithClass dropdown, "secondary-item"
|
||||||
newAccountButton = TestUtils.scryRenderedDOMComponentsWithClass dropdown, "new-account-option"
|
newAccountButton = TestUtils.scryRenderedDOMComponentsWithClass dropdown, "new-account-option"
|
||||||
|
|
||||||
expect(items.length).toBe 3
|
# The unified Inbox item, then both accounts, then the manage item
|
||||||
|
expect(items.length).toBe 4
|
||||||
expect(newAccountButton.length).toBe 1
|
expect(newAccountButton.length).toBe 1
|
||||||
|
|
|
@ -3,6 +3,8 @@ DatabaseStore = require '../stores/database-store'
|
||||||
QueryRange = require './query-range'
|
QueryRange = require './query-range'
|
||||||
MutableQueryResultSet = require './mutable-query-result-set'
|
MutableQueryResultSet = require './mutable-query-result-set'
|
||||||
|
|
||||||
|
verbose = false
|
||||||
|
|
||||||
class QuerySubscription
|
class QuerySubscription
|
||||||
constructor: (@_query, @_options = {}) ->
|
constructor: (@_query, @_options = {}) ->
|
||||||
@_set = null
|
@_set = null
|
||||||
|
@ -105,6 +107,7 @@ class QuerySubscription
|
||||||
return false
|
return false
|
||||||
|
|
||||||
log: (msg) =>
|
log: (msg) =>
|
||||||
|
return unless verbose
|
||||||
console.log(msg) if @_query._klass.name is 'Thread'
|
console.log(msg) if @_query._klass.name is 'Thread'
|
||||||
|
|
||||||
update: =>
|
update: =>
|
||||||
|
|
Loading…
Reference in a new issue