opencollective / opencollective-app

OpenCollective App - used to manage budgets and approve expenses
https://app.opencollective.com
MIT License
9 stars 5 forks source link

Export transactions #112

Closed sedubois closed 8 years ago

sedubois commented 8 years ago

csv_file export_button

sedubois commented 8 years ago

Implements https://github.com/OpenCollective/api/issues/67

I put userName and userEmail because userName may be null.

NB: this won't work any more if API starts to return paginated contents, as UI provides what it has in memory.

asood123 commented 8 years ago

@sedubois Thanks for submitting this. Could you please write a test for the Export button? Let me know if you need help. Lots of examples in test/unit (don't worry about adding it in end2end tests right now).

sedubois commented 8 years ago

As mentioned in ApproveButton.js, using shallow rendering makes unit testing tricky as feature is under development and e.g Simulate.click() still requires a DOM (https://blog.algolia.com/how-we-unit-test-react-components-using-expect-jsx/). So onClick method is manually triggered in the test.

sedubois commented 8 years ago

Also unsure why selenium tests yield Connection refused! Is selenium server started?.

asood123 commented 8 years ago

This was hard to merge after all those changes. So, I moved the changes manually to a different branch and simplified them a little bit: https://github.com/OpenCollective/app/pull/146. Let me know @sedubois if I missed anything.