Commit Graph

221 Commits (c7b29d35aeaf1e16c9d83cbdfae8dd5e1a8a3443)

Author SHA1 Message Date
Akshay Joshi ccf58570b1 Support running feature tests against Firefox. Fixes #3270 2018-05-15 15:10:11 +01:00
Joao De Almeida Pereira bc4d16eb83 Initial version of the new tree implementation.
This is the first version of our Tree implementation. At this point is a
very simple tree without no abstractions and with code that eventually
is not very performant, but this is only the first iteration and we are
trying to follow the 'Last Responsible Moment Principle' [1].

Implemention details:
- Creation of PGBrowser.treeMenu
- Initial version of the Tree Adaptor 'pgadmin/static/js/tree/tree.js'
- TreeFake test double that can replace the Tree for testing purposes
- Tests, As an interesting asside because Fake’s need to behave like
  the real object you will noticed that there are tests for this type
  of double and they the same as of the real object.

[1] https://medium.com/@aidanjcasey/guiding-principles-for-an-evolutionary-software-architecture-b6dc2cb24680

Patched by: Victoria && Joao
Reviewed by: Khushboo & Ashesh
2018-05-14 18:00:23 +05:30
Dave Page 8937375885 Standardise the error handling for parsing of JSON response messages from the server. Fixes #3238 2018-05-04 16:56:15 +01:00
Akshay Joshi b7fb01ab04 Add support for SSH tunneled connections. Fixes #1447 2018-05-04 11:27:27 +01:00
Murtuza Zabuawala 455c45ea85 Update chromedriver version to support Chrome 66. 2018-05-04 10:20:14 +01:00
Dave Page 59d8f6fb84 Allow feature tests to run in Chrome headless mode. 2018-05-02 16:51:17 +01:00
Khushboo Vashi 732d8d903d F5 key should work to refresh Browser tree. Fixes #3284
Refactoring by:  Joao Pedro De Almeida Pereira
2018-05-02 11:43:42 +05:30
Ashesh Vashi c94439bf8e Fixed the issues for all the javascript files reported by the liner. 2018-04-30 17:51:57 +05:30
Murtuza Zabuawala f5e474e4ec Ensure the query tool will open properly under MS Edge. 2018-04-10 11:09:59 +01:00
Murtuza Zabuawala fa1854bd85 Allow sorting when viewing/editing data. Fixes #1894 2018-04-05 16:25:17 +01:00
Murtuza Zabuawala b7c86da586 Fix requirements for Python 2.6. 2018-04-04 12:26:44 +01:00
Murtuza Zabuawala a705fb46a8 Refactor and simplify query tool connection error handling code. Fixes #3235 2018-04-04 11:20:36 +01:00
Murtuza Zabuawala be055ce57d Update Python and JS modules. Fixes #3154 2018-04-04 10:47:01 +01:00
Khushboo Vashi 7805170783 Add the ability to enable/disable UI animations. Fixes #1978 2018-04-03 14:52:13 +01:00
Joao Pedro De Almeida Pereira 94e1e46201 Show more granular timing info in the query tool history panel. Fixes #3244 2018-04-03 14:11:11 +01:00
Akshay Joshi 637f3b9d1a Fix a number of broken connection detection scenarios. 2018-03-21 08:38:18 +00:00
Khushboo Vashi 534f1f35fe Appropriately set the cookie path. Fixes #3197 2018-03-19 17:09:19 +00:00
Murtuza Zabuawala 34f1ebc88e Ensure the host parameter is correctly pickup up from the service file. Fixes #3200 2018-03-19 12:38:44 +00:00
Murtuza Zabuawala 9ea118ca57 Ensure the file manager properly escapes file & directory names. Fixes #3196 2018-03-19 10:58:12 +00:00
Murtuza Zabuawala 48319d56df Update required ChromeDriver version for current versions of Chrome. Fixes #3219
This requires an update to build/test envs:

pip uninstall chromedriver_installer
pip install -r regression/requirements.txt
2018-03-19 10:05:41 +00:00
Joao Pedro De Almeida Pereira 3c4359270e Fix trim function which was causing some JS errors during Server Properties validation. Victoria & Joao 2018-03-14 17:58:01 -04:00
Joao Pedro De Almeida Pereira 876ce1799a Skip tests where appropriate on GPDB. Fixes #3190
Victoria & Joao @ Pivotal.
2018-03-13 15:32:35 -04:00
Victoria Henry 6b03cb78af Refactor server dialogue validation for better unit testing.
Victoria & Joao @ Pivotal.
2018-03-13 14:47:32 -04:00
Joao Pedro De Almeida Pereira e7316e2181 Update Jasmine to v3. Fixes #3182 2018-03-07 16:01:04 +00:00
Joao Pedro De Almeida Pereira d1ab47c10c Disable function statistics on Greenplum. Fixes #3176 2018-03-07 11:52:02 +00:00
Joao Pedro De Almeida Pereira 427314cfdf Support for external tables in GPDB. Fixes #3168 2018-03-02 16:49:25 +00:00
Murtuza Zabuawala 92a0bb605d Ensure we can edit grid values in the debugger using keyboard shortcuts. Fixes #3153 2018-03-02 15:05:04 +00:00
Murtuza Zabuawala a9de043fef Add keyboard shortcuts for the Query Tool. Fixes #2900 2018-02-27 14:32:03 +00:00
Harshal Dhumal aa1849c13a Support tab navigation in dialogs. Fixes #2898 2018-02-27 11:18:36 +00:00
Murtuza Zabuawala 7301e30ff3 Fix PEP8 issues in various modules. Fixes #3121 2018-02-19 11:12:35 +00:00
Joao Pedro De Almeida Pereira 0677ad254a Un-vendorise React, now that it contains bug fixes we need. 2018-02-19 10:53:54 +00:00
Joao Pedro De Almeida Pereira 15862e903a Fix creation of tables and columns in GPDB. Fixes #3099 2018-02-19 10:40:10 +00:00
Murtuza Zabuawala 942ac733a4 Configurable shortcuts in the Debugger. Fixes #2901 2018-02-09 12:43:27 +00:00
Joao Pedro De Almeida Pereira e16a952753 Support EXPLAIN on Greenplum. Fixes #3097
- Extract SQLEditor.execute and SQLEditor._poll into their own files and add test around them
 - Extract SQLEditor backend functions that start executing query to their own files and add tests around it
 - Move the Explain SQL from the front-end and now pass the Explain plan parameters as a JSON object in the start query call.
 - Extract the compile_template_name into a function that can be used by the different places that try to select the version of the template and the server type
2018-02-09 11:54:42 +00:00
Murtuza Zabuawala 489349b4e9 Add tools for checking PEP8 compliance. Fixes #3063 2018-01-29 12:45:32 +00:00
Harshal Dhumal 66341e6947 Add infrastructure for managing configurable keyboard shortcuts. 2018-01-25 12:49:06 +00:00
Murtuza Zabuawala 97760d65c2 Add keyboard navigation in Query tool module via Tab/Shift-Tab key. Fixes #2896
Note:
1) Once the keyboard shortcut infrastructure is ready we will add generic shortcut to focus out from CodeMirror editor and set foucs to next element, Right now there is no way of doing this, For testing purpose you can manually focus out from CodeMirror and click on data output panel to continue navigate using Tab key.
2) As of now inner panel's are not getting focused on Tab/Shift-Tab keys but once RM#2895 patch gets committed it will start working automatically as it's inherited code which will add tabindex tag automatically on each newly created wcDocker panel.
2018-01-25 12:27:13 +00:00
Murtuza Zabuawala 0e41b3364b Support keyboard navigation in the debugger. Fixes #2897
In passing, fix injection of variable values. Fixes #2981
2018-01-23 11:58:10 +00:00
Joao Pedro De Almeida Pereira 56e922f5ab Support Properties on Greenplum databases. Fixes #3015 2018-01-15 14:44:40 +05:30
Dave Page 89821c0d19 Update copyright notices for 2018. 2018-01-05 10:42:50 +00:00
Harshal Dhumal 88bcd3b512 Make the query tool datatype test easily configurable and extendable and add support for multi-dimensional arrays and enums. 2017-12-18 15:10:47 +00:00
Harshal Dhumal 1a4e21e6dd Fix regression tests for password reset in server mode 2017-11-30 13:16:59 +00:00
Ashesh Vashi d54c35d74f Fixing the lint error messages in javascript using 'eslint --fix'
command.
2017-11-30 13:01:41 +05:30
Dave Page 182369cbab And remove the extra semicolons. Sigh. 2017-11-20 17:15:15 +00:00
Dave Page be8d3604fb Add missing semicolons. 2017-11-20 17:12:10 +00:00
Murtuza Zabuawala ce246ecce4 Stop Python 2.6 barfing on newer versions of Selenium 2017-11-20 16:55:54 +00:00
Khushboo Vashi 0c566f132e Allow configuration of CSV and clipboard formatting of query results. Fixes #2781 2017-11-20 13:50:47 +00:00
Murtuza Zabuawala 2f17ecba76 Update selenium version 2017-11-16 14:22:44 +00:00
Dave Page afd65018db Current versions of Chrome need a newer driver for selenium tests. 2017-11-16 12:13:53 +00:00
Murtuza Zabuawala 2ddbddba33 Improve display of error messages in the query tool. Fixes #2700 2017-09-20 11:29:24 +01:00
Dave Page cca7526b9b Remove menu icon tests that are no longer required. 2017-09-11 10:13:54 +01:00
Harshal Dhumal ceb9438000 Cleanup feature tests. Fixes #2586 2017-08-29 14:57:56 +01:00
Dave Page 507d8b3fe4 Regression tests aren't run under the runtime, so no need to check for builtins.SERVER_MODE's existence. 2017-08-25 11:56:10 +01:00
Dave Page f195b18f2d Ship with pre-configured paths that can work in both Server and Desktop modes out of the box. Fixes #2662
Ship the web code using server mode with appropriate paths by default and enable the runtime to override the mode, and force into desktop changing the appropriate paths to user-specific ones.

Note that this change will likely cause more advanced users to have to tweak configs.

RPMs will also need changes to create /var/lib/pgadmin and /var/log/pgadmin, owned by the webserver account.
2017-08-25 10:54:28 +01:00
Sarah McAlear b585063a26 Refactor keyboard shortcut functions in the query tool. Fix some incorrect keycodes and update docs.
Initial work by Sarah & Violet @ Pivotal, with additional tweaks by Murtuza @ EDB.
2017-08-21 15:27:29 +01:00
Murtuza Zabuawala 2e2ca26020 Ensure role names are escaped in the membership control. Fixes #2606 2017-08-21 14:00:33 +01:00
Violet Cheng d527769bf8 Extract the generate_url(..) function from node.js, and collection.js 2017-08-17 21:43:07 +05:30
Hao Wang 5141debae7 UX improvements of the history in the query tool.
- Added copy button for query text.
- Historical queries are binned/grouped by day.

Patch By: Hao Wang, Sarah McAlear
2017-08-09 16:52:43 +05:30
Akshay Joshi e506fa1dbe Improved alertify notification logic. Remove AlertifyWrapper class and extend notification methods in alertify itself. 2017-07-31 18:59:44 +05:30
Murtuza Zabuawala af26d983e5 Fixup tests following label changes. 2017-07-26 13:45:44 +01:00
Joao Pedro De Almeida Pereira fe95b7670b Ensure the appropriate entry is focussed when entering the history tab. 2017-07-24 11:46:06 +01:00
Harshal Dhumal 7182b59976 Ensure arrow keys work correctly when the pane is focused instead of the tab in the query tool history. 2017-07-21 13:33:59 +01:00
Murtuza Zabuawala b313cbce0d Fix regression tests after Dave broke them. 2017-07-21 10:57:29 +01:00
Sarah McAlear 86dc1e81f1 Move Query Tool keyboard shortcut code into a new module and add tests. 2017-07-20 22:22:25 +01:00
Matthew Kleiman e29cd8d83d Improve the history UI. 2017-07-20 20:50:37 +01:00
Matthew Kleiman 21bfcd83f4 Allow navigation of query history using the arrow keys. Fixes #2590 2017-07-20 20:47:40 +01:00
Murtuza Zabuawala bab3da24e6 Support SSL in the regression tests. Fixes #2170 2017-07-18 15:23:11 +01:00
Surinder Kumar 4a91bcde30 Webpack all the things! Fixes #2135
This significantly speeds up loading of the application; in an average of 3 tests, v1.6
loaded in 11.5s in the runtime on a Mac, whilst the webpacked version of the code
loaded in 5.53s.
2017-07-18 15:13:17 +01:00
Harshal Dhumal fc78202600 Fix clear history. 2017-07-07 15:51:06 +01:00
Matthew Kleiman e2cbaaef71 UI tweaks for the query history. 2017-07-06 13:08:29 +01:00
Harshal Dhumal 76939e4f63 Prompt the user to save dirty queries rather than discard them for a more natural workflow. Fixes #1972 2017-07-04 23:39:10 +01:00
Dave Page ffb00b502a Fix a couple of gripes from the JS linter on Windows. 2017-06-30 10:34:06 +01:00
Joao Pedro De Almeida Pereira f2d2075d81 Update alertify alerts to use the styling defined in the styleguide (missed some files in the original commit). 2017-06-30 10:23:12 +01:00
Joao Pedro De Almeida Pereira 7f55412059 Overhaul the query history tab to allow browsing of the history and full query text. Fixes #2282
Patch by Joao and the team at Pivotal.
2017-06-27 10:55:57 -04:00
Harshal Dhumal c65158312d Use on-demand loading for results in the query tool. Fixes #2137
With a 27420 row query, pgAdmin III runs the query in 5.873s on my laptop. pgAdmin 4 now takes ~1s.
2017-06-27 09:03:04 -04:00
Khushboo Vashi 6b6d3369b3 Wait for the Tools menu to be populated when running the feature tests, instead of failing.
Fix by Khushboo, based on Harshal's previous work.
2017-06-23 14:07:31 +01:00
Matthew Kleiman 94aa5487fb Update Slickgrid to 2.3.7. As this version includes all the features we need, it can be moved out of the vendor directory and we'll use yarn to pull it in. 2017-06-23 09:35:56 +01:00
Khushboo Vashi 1ee555e468 Ensure the feature tests use the correct test settings database. Fixes #2486 2017-06-16 10:17:38 +01:00
Dave Page 5d45dee686 Fix Yarn tasks for Windows 2017-06-15 15:32:07 +01:00
Surinder Kumar 2a87585665 Fix script options which were inadvertently broken in the query tool tab naming patch. 2017-06-15 12:19:47 +01:00
Surinder Kumar 2b4a8ed89c Un-break the feature tests. Fixes from Surinder and myself. 2017-06-14 09:59:11 +01:00
Ashesh Vashi 467825c2d1 Package 'mock' is required for testing, and for Python < 3.3 only. 2017-06-13 15:57:56 +05:30
Ashesh Vashi 903389d7b7 Required mock package for python < 3.3.
It was required for the commit:
1208206bc0

Also, do not fetch the scenario-name, when it is not avaiable (but - use
default vaule as the stringified test-case itself).
2017-06-13 15:43:31 +05:30
Shruti B Iyer 1208206bc0 Initial re-vamp of the History tab. 2017-06-13 09:50:41 +01:00
Shruti B Iyer 3f4f8b9e77 Add linting support, and, well, lint. 2017-06-12 16:55:14 +01:00
Shruti B Iyer 659eb1c1e8 Bring React into the tree, and add linting and bundling framework for the JS etc. 2017-06-12 16:51:54 +01:00
Ashesh Vashi fd3ddbeafb Implementation of the client side 'url_for(...)' function.
Created a url_for function module to be used by different javascript
modules to use the same functionality of flask at client side.

A python module can expose the list of endpoints, used by its
javascripts, by overriding the 'get_exposed_url_endpoints(self)'
function.

In this patch, we have modified all the browser modules to use this
function. It will allow us to move the majority of the javascript
modules of browser nodes from templates directory to the static
directory.

TODO::
- Move these javascripts modules to the static directory.
- Use this function in all the applicable javascript modules.
  e.g. tools, miscellaneous modules
2017-06-12 12:01:25 +05:30
Sarah McAlear 01bfa88309 Improvements to the Query Results grid:
- Improve the UI
- Allow copy/paste from sets of rows, columns or arbitrary blocks of cells

Patch by Matt, Shruti, Joao and Sarah @ Pivotal

Fixes #2476
2017-06-08 13:31:36 +01:00
Surinder Kumar 2fddf750e6 Retain column sizing in the query tool results grid when the same query is re-run multiple times in a row. Fixes #1971 2017-06-08 12:41:56 +01:00
George Gelashvili f89aec867a Resolve the PG datatype feature test flakiness and make for a nice buttery crust. 2017-06-07 14:26:42 +01:00
George Gelashvili 8d8e7dab3c Extract row staging into it's own module with tests. 2017-06-07 14:17:10 +01:00
Shruti B Iyer 0d05385585 Update the styling to use the set of grays defined in the WIP style guide. 2017-06-07 13:57:49 +01:00
Surinder Kumar beda7ebbf2 Add feature tests for the View Data tool. 2017-06-06 12:54:20 +01:00
George Gelashvili 10caae4dc6 Increase feature test timeouts. 2017-05-27 14:17:06 -04:00
Khushboo Vashi 3216eca4a8 Add feature tests to ensure that data types are properly rendered in the query tool. 2017-05-26 10:46:58 -04:00
Joao Pedro De Almeida Pereira 3bf17d9df4 1) Splits the SQL query used to retrieve the Dependents, Dependencies, and Roles SQL file into multiple versioned files.
2) Add Unit Tests for each file.
3) Add ORDER BY into Copy Selection Feature test to ensure the results are retrieved always in the same order
4) Renamed the Scenario of the xss_checks_pgadmin_debugger_test and skip it for versions less than 9.1
5) Deleted unused __init__.py files.
2017-05-15 10:40:46 +05:30
Murtuza Zabuawala aea0d93390 Hide menu options for creating objects, if the object type is set to hidden. Includes Jasmine tests. Fixes #2225 2017-05-12 12:10:46 +01:00
Khushboo Vashi 94b7fc483a Fix sorting of sizes on the statistics views by sorting raw values and prettifying on the client side. Includes Jasmine tests for the prettyfying function. Fixes #2315 2017-05-08 11:29:13 +01:00
Navnath Gadakh c32bf7780e Windows compatibility fixes for the test suite. 2017-05-08 09:25:05 +01:00
Sarah McAlear 4acecfa59a Use a different server name for unit vs. feature tests to avoid some observed conflicts. 2017-05-02 12:00:30 +01:00