Created
          April 5, 2017 18:27 
        
      - 
      
 - 
        
Save carlosble/88abb521cc594aeea29580a0155d6139 to your computer and use it in GitHub Desktop.  
    Populate the store with server data
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | it("renders the invoice coming from server", (done) => { | |
| const invoice = { | |
| reference: '0001', | |
| amount: '10.00', | |
| }; | |
| spyNotifier.slowOperationFinished = () => { | |
| let billRow = page.find(BillsTable).first().find(BillRow); | |
| expect(billRow.length).toBe(1); | |
| done(); | |
| }; | |
| stubApi.getInvoices = () =>{ | |
| return Promise.resolve([invoice]); | |
| }; | |
| createPage(); | |
| }); | |
| function createPage() { | |
| let BillsPage = createBillsPage(stubApi, spyNotifier); | |
| page = mount( | |
| <Provider store={store}> | |
| <BillsPage/> | |
| </Provider>); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment