Tuesday, August 14, 2012

Wrapping Up and Testing

Hey all, sorry for the super late blog post this time. I've spent my Melange time this week working on a potpourri of issues that Lennard has kindly pointed out for me by volunteering to try to break my code. Some of these smaller fixes include:

  • Including the message from the form in the connection notification email
  • Sending connection emails to the person it's actually supposed to be sent to
  • Added an email field to AnonymousConnection that prevents sending duplicate invitations to the same email address
  • Added an error flash message to OrgConnectionPage and a url parameter in order to notify the user when the above condition arises
  • Added functionality to gsoc/views/profile that will automatically promote users to the role offered by the org
  • Changed the representation of a message in soc/models/connection/Connection to a db.TextProperty so that the form will render its Textarea widget correctly and allow for multiline input
    • Removed the widget override for message in Meta
  • Using commas instead of semicolons now for the emailed/dupes parameters that are posted back onto the OrgConnectionPage in order to support displaying multiple emails 
  • Fixed a bug that allowed the existence of a User entity to prevent a person from being marked as "anonymous" (no GSoCProfile) to establish an anonymous connection
  • Added an extra column to dashboard to display the status of a connection
    • Added a status() method to the connection model to get a quick, user friendly status and replaced the _determineStatus method (which I hated) in the ShowConnection page with a call to GSoCConnection.status() and display it in a single status field.
  • Now registering with an anonymous connection also redirects you to the dashboard
  • Incorporated Lennard's welcome email code for new mentors in this commit into connection for org admins and mentors
I've also been delving deeper into the testing suite and determining what to test and how to do it; this is what I'll be working on for the rest of the week. One dilemma I do have is when a user accepts an org admin connection and is promoted as such, they have the ability to view the status of their own connection. I need to either remove all actions from the connection form or delete the connection after it's been completed (assuming the user did not accept only the mentor position out of an org admin offer), which is a small shift in the logic of the connection and is something I want to discuss at the weekly conference today. Again, sorry for the late post!!!

Melange Functional Testing


This week i worked on things like removing the need to specify manually whether we are identifying an element by xpath or id, instead let the modules do it for you. This was one of the suggestions from Leo which i implemented this week. Apart from that i worked on killing the server as soon as test case has finished execution although some minor changes can be made to it in course of time.

Also i fixed the clear function in seed_db.py and started to make changes in seed_db so that it fits my need. Now seed_db in my branch first clear the already present data in the datastore and after that it seed the datastore. Changes were also made to all the test cases so that they fit in with the changes in base module. Next week i am planning to add some more features to the existing framework.