test fixes

This commit is contained in:
Evan Morikawa 2015-03-05 13:56:55 -08:00
parent b3271432ef
commit 4635bf7d14
3 changed files with 13 additions and 11 deletions

View file

@ -228,10 +228,11 @@ describe "MessageList", ->
MessageParticipants) MessageParticipants)
expect(items.length).toBe 5 expect(items.length).toBe 5
it "displays the thread participants on the page", -> # We no longer do this (for now)
items = TestUtils.scryRenderedComponentsWithType(@message_list, # it "displays the thread participants on the page", ->
ParticipantsItem) # items = TestUtils.scryRenderedComponentsWithType(@message_list,
expect(items.length).toBe 1 # ParticipantsItem)
# expect(items.length).toBe 1
it "focuses new composers when a draft is added", -> it "focuses new composers when a draft is added", ->
spyOn(@message_list, "_focusRef") spyOn(@message_list, "_focusRef")

View file

@ -259,10 +259,11 @@ describe "ThreadListTabular", ->
ThreadListTabularItem) ThreadListTabularItem)
expect(items.length).toBe 3 expect(items.length).toBe 3
it "Expects there to be headers", -> # We no longer put headers in the thread list (for now)
heads = ReactTestUtils.scryRenderedDOMComponentsWithClass(@thread_list, "thread-list-header") # it "Expects there to be headers", ->
expect(heads.length).toBe(3) # heads = ReactTestUtils.scryRenderedDOMComponentsWithClass(@thread_list, "thread-list-header")
# expect(heads.length).toBe(3)
#
describe "ThreadListTabularItem", -> describe "ThreadListTabularItem", ->
beforeEach -> beforeEach ->

View file

@ -76,8 +76,8 @@ describe "Contact", ->
expect(c3.displayFirstName()).toBe "" expect(c3.displayFirstName()).toBe ""
expect(c3.displayLastName()).toBe "" expect(c3.displayLastName()).toBe ""
it "should properly return `Me` as the display name for the current user", -> it "should properly return `You` as the display name for the current user", ->
c1 = new Contact {name: " Test Monkey", email: NamespaceStore.current().emailAddress} c1 = new Contact {name: " Test Monkey", email: NamespaceStore.current().emailAddress}
expect(c1.displayName()).toBe "Me" expect(c1.displayName()).toBe "You"
expect(c1.displayFirstName()).toBe "Me" expect(c1.displayFirstName()).toBe "You"
expect(c1.displayLastName()).toBe "" expect(c1.displayLastName()).toBe ""