mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-11 23:24:32 +08:00
fix tests
This commit is contained in:
parent
db4cc4ef08
commit
a0cbe8606a
8 changed files with 7 additions and 8 deletions
|
@ -107,7 +107,7 @@ MessageItem = React.createClass
|
||||||
AttachmentComponent = @state.AttachmentComponent
|
AttachmentComponent = @state.AttachmentComponent
|
||||||
attachments = _.filter @props.message.files, (f) -> not f.contentId?
|
attachments = _.filter @props.message.files, (f) -> not f.contentId?
|
||||||
attachments.map (file) =>
|
attachments.map (file) =>
|
||||||
<AttachmentComponent file={file} download={@state.downloads[file.id]}/>
|
<AttachmentComponent file={file} key={file.id} download={@state.downloads[file.id]}/>
|
||||||
|
|
||||||
_messageIsEmptyForward: ->
|
_messageIsEmptyForward: ->
|
||||||
# Returns true if the message contains "Forwarded" or "Fwd" in the first 250 characters.
|
# Returns true if the message contains "Forwarded" or "Fwd" in the first 250 characters.
|
||||||
|
|
|
@ -40,7 +40,7 @@ MessageList = React.createClass
|
||||||
render: ->
|
render: ->
|
||||||
return <div></div> if not @state.current_thread?
|
return <div></div> if not @state.current_thread?
|
||||||
|
|
||||||
<div class="message-list" id="message-list">
|
<div className="message-list" id="message-list">
|
||||||
<div tabIndex=1 className="messages-wrap">
|
<div tabIndex=1 className="messages-wrap">
|
||||||
{@_oldMessageListHeaders()}
|
{@_oldMessageListHeaders()}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
# For more detailed documentation see
|
# For more detailed documentation see
|
||||||
# https://atom.io/docs/latest/advanced/keymaps
|
# https://atom.io/docs/latest/advanced/keymaps
|
||||||
'.thread-list-container':
|
'.thread-list':
|
||||||
's' : 'thread-list:star-thread' # Gmail
|
's' : 'thread-list:star-thread' # Gmail
|
||||||
'cmd-L' : 'thread-list:star-thread' # Mac mail
|
'cmd-L' : 'thread-list:star-thread' # Mac mail
|
||||||
'ctrl-G': 'thread-list:star-thread' # Outlook
|
'ctrl-G': 'thread-list:star-thread' # Outlook
|
||||||
|
|
|
@ -8,7 +8,7 @@ ThreadListMixin =
|
||||||
|
|
||||||
componentDidMount: ->
|
componentDidMount: ->
|
||||||
@thread_store_unsubscribe = ThreadStore.listen @_onChange
|
@thread_store_unsubscribe = ThreadStore.listen @_onChange
|
||||||
@thread_unsubscriber = atom.commands.add '.thread-list-container', {
|
@thread_unsubscriber = atom.commands.add '.thread-list', {
|
||||||
'thread-list:star-thread': => @_onStarThread()
|
'thread-list:star-thread': => @_onStarThread()
|
||||||
}
|
}
|
||||||
@body_unsubscriber = atom.commands.add 'body', {
|
@body_unsubscriber = atom.commands.add 'body', {
|
||||||
|
|
|
@ -30,7 +30,7 @@ ThreadListTabular = React.createClass
|
||||||
unlisten() for unlisten in @unlisteners
|
unlisten() for unlisten in @unlisteners
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
<div class="thread-list" id="thread-list">
|
<div className="thread-list" id="thread-list">
|
||||||
<div tabIndex=1
|
<div tabIndex=1
|
||||||
className="thread-list-container thread-list-tabular">
|
className="thread-list-container thread-list-tabular">
|
||||||
|
|
||||||
|
|
|
@ -234,7 +234,7 @@ describe "ThreadListTabular", ->
|
||||||
expect(ReactTestUtils.isCompositeComponentWithType(@thread_list,
|
expect(ReactTestUtils.isCompositeComponentWithType(@thread_list,
|
||||||
ThreadListTabular)).toBe true
|
ThreadListTabular)).toBe true
|
||||||
|
|
||||||
it "archives on keymap", ->
|
it "stars on keymap", ->
|
||||||
spyOn(@thread_list, "_onStarThread")
|
spyOn(@thread_list, "_onStarThread")
|
||||||
InboxTestUtils.keyPress("s", @thread_list.getDOMNode())
|
InboxTestUtils.keyPress("s", @thread_list.getDOMNode())
|
||||||
expect(@thread_list._onStarThread).toHaveBeenCalled()
|
expect(@thread_list._onStarThread).toHaveBeenCalled()
|
||||||
|
|
|
@ -85,7 +85,6 @@ Utils =
|
||||||
files = fs.listTreeSync('./static/images')
|
files = fs.listTreeSync('./static/images')
|
||||||
for file in files
|
for file in files
|
||||||
Utils.images[path.basename(file)] = file.substr(7)
|
Utils.images[path.basename(file)] = file.substr(7)
|
||||||
console.log('Loaded Images', Utils.images)
|
|
||||||
|
|
||||||
if window.devicePixelRatio > 1
|
if window.devicePixelRatio > 1
|
||||||
return Utils.images["#{name}@2x.#{ext}"] ? Utils.images[fullname] ? Utils.images["#{name}@1x.#{ext}"]
|
return Utils.images["#{name}@2x.#{ext}"] ? Utils.images[fullname] ? Utils.images["#{name}@1x.#{ext}"]
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ThemeManager
|
||||||
stylesElement.onDidRemoveStyleElement @styleElementRemoved.bind(this)
|
stylesElement.onDidRemoveStyleElement @styleElementRemoved.bind(this)
|
||||||
stylesElement.onDidUpdateStyleElement @styleElementUpdated.bind(this)
|
stylesElement.onDidUpdateStyleElement @styleElementUpdated.bind(this)
|
||||||
|
|
||||||
if atom.inDevMode()
|
if atom.inDevMode() and not atom.inSpecMode()
|
||||||
console.log('In Dev Mode - Watching /static for LESS changes')
|
console.log('In Dev Mode - Watching /static for LESS changes')
|
||||||
watchStylesIn = (folder) =>
|
watchStylesIn = (folder) =>
|
||||||
stylePaths = fs.listTreeSync(folder)
|
stylePaths = fs.listTreeSync(folder)
|
||||||
|
|
Loading…
Add table
Reference in a new issue