Tuesday, July 24, 2012

Melange Functional Testing: New Tests


This week i worked on creating the following test scripts:

(1) test_gsoc_proposal.py
(2) test_gsoc_faq_page.py
(3) test_gsoc_events_and_timeline.py
(4) test_gsoc_connect_with_us.py
(5) test_gci_timeline.py
(6) test_gci_tasks_page.py

Next week i will work on improving the test scripts. GSoC Proposal test was quite fun, It involved iframe. Switching to iframe and then switching back was interesting. It is good to see executing functional tests :)

Monday, July 23, 2012

Comments & Connections Finally Play Nice

If you've been following my series of "Daily Snippet" posts to the melange-soc-dev list, you'll know that I've made a whole bunch of fixes and may even be eagerly awaiting to hear whether I actually got this working. I'm happy to say that the ShowConnection page now supports the user and org admins leaving comments on a connection now accompanied by more reliable buttons, reasonable status messages, and a bunch of stability fixes. At the risk of boring both of us to tears (you by reading this and me by typing it), I'm going to glaze over what I've done this week. If you want more details I would be happy to provide them, or you can dig back through the Daily Snippet messages.

  • Fixed Connection notifications in the User/Org ConnectionPage transactions
  • Modified template for above notification so that it's a little cleaner
  • Revamped ShowConnection's checkAccess() method so that it actually does what it's supposed to (and added a connectionFromKwargs() method to the Mutator class)
  • Added newCommentContext() to gsoc.logic.helper.notifications for notifications of new Connections
  • Added getComments() to and made associated changes in ShowConnection's conext() method
  • Modified/Stole code from proposal_review and put it in the show_connection template in order to display GSoCComment instances
  • Added PostHandler() class (also stolen from proposal_review) to gsoc/views/connection.py and modified it to work for Connections. Also added it to gsoc callback
  • Added associated URL patterns to gsoc/views/helper/url_patterns and url_names
  • Modified commentVisible() in soc/views/helper/access_checker to take an org argument so that it can be used by both proposal_review and connection without extensive modification - also modified where it is invoked in those two modules
There's probably more, but I think that this is a good list. Take a peek at the results:
User perspective:

Same data, org admin perspective:

This snippet idea was awesome, it really helps keep me on track and motivates me to get what I need done on time. I'm going to make one more change and try to eliminate the query in connectionFromKwargs() mentioned above and will commit everything tonight. The two big things on my radar right now are inviting users without profiles (or even entities) and integration; I need to start by fixing a link Daniel sent me on my production instance.