fix tests

This commit is contained in:
Evan Morikawa 2015-03-05 15:19:05 -08:00
parent db4cc4ef08
commit a0cbe8606a
8 changed files with 7 additions and 8 deletions

View file

@ -107,7 +107,7 @@ MessageItem = React.createClass
AttachmentComponent = @state.AttachmentComponent
attachments = _.filter @props.message.files, (f) -> not f.contentId?
attachments.map (file) =>
<AttachmentComponent file={file} download={@state.downloads[file.id]}/>
<AttachmentComponent file={file} key={file.id} download={@state.downloads[file.id]}/>
_messageIsEmptyForward: ->
# Returns true if the message contains "Forwarded" or "Fwd" in the first 250 characters.

View file

@ -40,7 +40,7 @@ MessageList = React.createClass
render: ->
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">
{@_oldMessageListHeaders()}

View file

@ -7,7 +7,7 @@
# For more detailed documentation see
# https://atom.io/docs/latest/advanced/keymaps
'.thread-list-container':
'.thread-list':
's' : 'thread-list:star-thread' # Gmail
'cmd-L' : 'thread-list:star-thread' # Mac mail
'ctrl-G': 'thread-list:star-thread' # Outlook

View file

@ -8,7 +8,7 @@ ThreadListMixin =
componentDidMount: ->
@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()
}
@body_unsubscriber = atom.commands.add 'body', {

View file

@ -30,7 +30,7 @@ ThreadListTabular = React.createClass
unlisten() for unlisten in @unlisteners
render: ->
<div class="thread-list" id="thread-list">
<div className="thread-list" id="thread-list">
<div tabIndex=1
className="thread-list-container thread-list-tabular">

View file

@ -234,7 +234,7 @@ describe "ThreadListTabular", ->
expect(ReactTestUtils.isCompositeComponentWithType(@thread_list,
ThreadListTabular)).toBe true
it "archives on keymap", ->
it "stars on keymap", ->
spyOn(@thread_list, "_onStarThread")
InboxTestUtils.keyPress("s", @thread_list.getDOMNode())
expect(@thread_list._onStarThread).toHaveBeenCalled()

View file

@ -85,7 +85,6 @@ Utils =
files = fs.listTreeSync('./static/images')
for file in files
Utils.images[path.basename(file)] = file.substr(7)
console.log('Loaded Images', Utils.images)
if window.devicePixelRatio > 1
return Utils.images["#{name}@2x.#{ext}"] ? Utils.images[fullname] ? Utils.images["#{name}@1x.#{ext}"]

View file

@ -30,7 +30,7 @@ class ThemeManager
stylesElement.onDidRemoveStyleElement @styleElementRemoved.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')
watchStylesIn = (folder) =>
stylePaths = fs.listTreeSync(folder)