Note functional test

I implement the functional test for notes and fix some minor problems in
the show view of notes.