Hi
On Fri, Feb 24, 2017 at 7:14 PM, Atira Odhner <aodhner@pivotal.io> wrote:
> Hi hackers,
>
> We made some changes to start to make the javascript testable:
>
> - Move clipboard copying into its own file so we can test the
> interaction with it when we start adding column selection
> - Create a translations.js and translate.js which uses flask to pull in
> translations, but
> lets us have the flask template rendering confined to that one file,
> enabling us to test javascript files that rely on translations
> - add jasmine javascript testing which currently runs from the browser
> at /static/SpecRunner.html when the app is up.
> - delete some dead code from sqleditor.js
>
> Why we decided to make translate.js only support interpolations of the form
> "%(variable)s":
> - it matches functionality in python
> - having named variables allows for multiple interpolations in one
> sentence without the risk that a translation will swap the order
There are various issues with this patch:
- It needs to be broken up - one change, one patch. There are 4
distinct changes here, that each need to be reviewed on their own
merit.
- The changes to the translation mechanism need discussion. How will
it work? What do developers have to do differently? When will the
changes it allows be implemented?
- There are no doc updates corresponding to the changes to the
translation mechanism.
- What does the jasmine testing actually do? There are no doc or
README updates to describe it.
- There is no update to libraries.txt
- The jasmine code seems to be littered with cruft that we don't want
to be carrying in our repo. Can it be reduced to the bare minimum
CSS/JS files?
- Test code (including jasmine) needs to be isolated from the
application code, e.g. in a tests/ directory. Future versions of
pgAdmin will exclude the test suite code from their packaging.
> Future things we'd like to add to this:
> - make jasmine run from the commandline with the rest of the tests
I think that's a pre-requisite for any additional test functionality
at this point, given that we're moving to fully automated testing.
Thanks, Dave.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company