Commit Graph

343 Commits (eb2c5546018bc60777a3ae54be8b2f03e3b15bf4)

Author SHA1 Message Date
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
Joao Pedro De Almeida Pereira 3eb92f7ea3 Update test requirements for the latest rev of Chrome. 2017-04-24 13:07:04 +01:00
Dave Page 04ccc84bf6 Revert "Update Chromedriver version for Chrome 58."
This reverts commit 70832286bc.

The Jenkins CI doesn't like this at all.
2017-04-21 10:15:17 +01:00
Joao Pedro De Almeida Pereira 70832286bc Update Chromedriver version for Chrome 58.
Note:
If you had previously installed the old driver you need to uninstall and install again it.

$ pip uninstall chromedriver_installer
$ pip install -r regression/requirements.txt
2017-04-21 09:54:18 +01:00
Matthew Kleiman d663d553c5 Allow column or row selection in the query tool. Fixes #2216 2017-04-18 13:28:45 +01:00
Navnath Gadakh 62716c4193 Include passed test results in the JSON output from the regression tests. 2017-04-12 13:11:53 +01:00
Murtuza Zabuawala a2a2b8b888 Ensure the query tool displays but does not render HTML returned by the server in the results grid. Fixes #2330. 2017-04-10 14:07:48 +01:00
Navnath Gadakh 79e81478e3 Fix a regression framework issue with Python 2.6. 2017-04-10 11:28:10 +01:00
Dave Page a2c4cb1606 Adding a delay clearly didn't fix the feature tests :-( 2017-04-07 15:33:41 +01:00
Dave Page 8a01cdfaf9 Add a 0.5 second delay to treeview node expansion in the feature tests, to try to (temporarily) allow for script loading time. Tentatively enable the feature tests in CI to see if it works. 2017-04-07 12:41:54 +01:00
Dave Page de80545400 Include an example of running just the feature tests. 2017-04-07 12:37:00 +01:00
Dave Page a412e3226f Use a more appropriate output file name. 2017-04-06 09:34:19 +01:00
Navnath Gadakh dd23f71478 Write a JSON file when regression tests run, listing results. 2017-04-06 09:33:29 +01:00
Sarah McAlear 1d27341e21 Fix translation extraction for new client side translations, and update catalogs. 2017-03-28 15:21:49 -04:00
Dave Page 95f43d59b8 Revert "Ensure client-side translations are correctly extracted into the message templates."
This reverts commit 82bd97aed0.

There are still issues extracting with these changes.
2017-03-27 13:53:40 -04:00
Sarah McAlear 82bd97aed0 Ensure client-side translations are correctly extracted into the message templates. 2017-03-27 13:24:47 -04:00
Sarah McAlear 66815643a9 Fix a cleanup SQL query to enable running feature tests on CI against Greenplum. 2017-03-25 22:09:00 -04:00
Dave Page 6152d73f13 Fix some code inspection complaints 2017-03-25 22:04:52 -04:00
Dave Page 59a6a08e8a Add file missed from the previous commit. 2017-03-23 12:06:13 +00:00
Atira Odhner 10920404e1 Re-organised the regression directory now we have multiple test suites: move test_utils.py into python_test_utils/ 2017-03-23 11:59:31 +00:00
Atira Odhner fe9bc379c7 Replace the template selection feature test with one that tests table DDL generation (which also covers template selection). 2017-03-23 11:47:21 +00:00
Atira Odhner 77007996ed Support generation of DDL for tables in Greenplum DB. Fixes #2261 2017-03-23 11:40:06 +00:00
Dave Page 4ff082ee74 Use correct file header for a JS file. 2017-03-20 19:32:52 +00:00
Dave Page b2a74ad26d Fix a bunch of file headers. 2017-03-16 14:27:55 +00:00
Joao Pedro De Almeida Pereira 6ad6bf5aab Update test requirements to include a version of Selenium that supports Chrome 57, and the chromedriver installer. 2017-03-16 09:53:26 +00:00
Atira Odhner 2abd3724c2 Ensure the screenshots directory exists before trying to save regression test screenshots 2017-03-15 22:06:04 +00:00
Dave Page cc4686f1bb README improvements. 2017-03-15 17:16:02 +00:00
Atira Odhner dbddad50bf Move the package.json file to the web/ directory 2017-03-15 17:15:16 +00:00
Atira Odhner 5593faf2a4 Move the karma config and node_modules into the web directory. 2017-03-15 17:13:55 +00:00
Atira Odhner 2f84156dc6 Add Jasmine test framework for JS testing. 2017-03-15 17:09:22 +00:00
Joao Pedro De Almeida Pereira d756f2f6c6 Create screenshots when feature tests fail. 2017-03-09 15:34:51 +00:00
Dave Page 981ebfbcf7 Ensure feature tests are compatible with Python 3.5.
This is required even if they aren't run, as RPM builds will try to byte compile all files in the distro.
2017-03-08 09:49:48 +00:00
Ashesh Vashi da9aa3ccbd Don't try to start chromedriver and friends if the feature tests are excluded. 2017-03-08 09:21:28 +00:00
Dave Page 3658ca6c55 Avoid leaving chromedriver processes cluttering the landscape after running the feature tests.
Per https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/3378, we were doing it wrong :-(
2017-03-07 13:49:52 +00:00
Dave Page 3317a02120 Fix regression tests with runtime auth. Fixes #2228 2017-03-06 15:24:52 +00:00
Dave Page af29eac6ba Move another test-only dependency to web/regression/requirements.txt 2017-03-02 09:18:45 +00:00
Atira Odhner e89c54c15d Make feature test app teardown more reliable, and tests faster
- don't spin up app and chromedriver between each test
    - catching signals also tears down the app
    - do layout reset between tests, but assume that tests will not leave a modal opened.

 Use selenium built-in waiting function and fix flakiness around clicking the alertify OK button

    - we think the OK button does not have its event bound when it is created.

If you see more flakiness around clicking the alertify OK button, let us know. The element is clickable but we have to arbitrarily wait for the event to be bound and that timing may vary system to system.

The feature tests are about 7 seconds faster now.

Tira & Joao
2017-03-01 13:20:06 +00:00
Atira Odhner 5fa1e83f0a Ensure feature tests use the TEST_SQLITE_PATH, not SQLITE_PATH. 2017-02-28 17:09:32 +00:00
Dave Page 1e5de7e66e Merge the Python 2 & 3 requirements files, and break out test requirements into a separate file. 2017-02-26 09:06:17 +00:00
Atira Odhner fe1aec5de0 Add feature test framework, using selenium and chromedriver for UI testing.
Written by both George and Atira at Pivotal.
2017-02-22 12:41:28 +00:00
Atira Odhner b6486f3d42 Test suite runner enhancements:
To chase down a set of tests that were failing together, we wanted to run
deeper trees of tests. We changed the behavior of the --pkg argument to
runtests.py so it runs tests under a package and its subpackages, instead
of for a single node.

It gave us more flexibility in what tests to run. This also includes the
--exclude option.

To run tests for a single node, ".tests" can be appended to the package path.

Tira & George.
2017-02-15 15:10:31 +00:00
Dave Page 56bd1f6c05 Fix Python 2.6 compatibility. 2017-02-13 10:18:22 +00:00
Atira Odhner ec9e8b79a3 Basic support for viewing tables in Greenplum. Patch from George & Tira @ Pivotal. 2017-02-13 10:02:20 +00:00
Dave Page 9aa479ea2e Spit out an exit code when running the regression tests. 2017-02-08 16:52:03 +00:00
Navnath Gadakh fd53e0c527 Disable upgrade checks during regression testing. 2017-01-31 10:29:07 +00:00
George Gelashvili 19be3529f8 Create a template loader for SQL templates.
This will automatically find the correct version of a template for the server version, and allows us to remove templates that were previously duplicated for different server versions.

Patch by George & Tira at Pivotal. Review by me and Murtuza from EDB.

Discussion: https://www.postgresql.org/message-id/flat/CAHowoHaU9_pkCt%2B1g8dpY3hsXXZmsJZiJH-3-_Hd%2BC1MxiGhtA%40mail.gmail.com#CAHowoHaU9_pkCt+1g8dpY3hsXXZmsJZiJH-3-_Hd+C1MxiGhtA@mail.gmail.com
2017-01-30 11:25:03 +00:00
George Gelashvili b4d4cffc60 Python 3 fix for the regression tests 2017-01-20 15:29:57 +00:00
Jonas Thelemann 2db705ad80 Add runtime/pgAdmin4 to .gitignore, and re-order entries for ease of maintenance. 2017-01-16 14:46:44 +00:00
Navnath Gadakh 1325b30e0b Various improvements to the regression tests, notably avoiding use of signals unavailable on Windows. 2017-01-08 18:48:04 +05:30
Dave Page f221194bcc Update copyright notices for 2017. 2017-01-04 13:33:32 +00:00
Dave Page 8d2dff1482 Always create databases from template0 when running regression tests, to ensure consistency and avoid concurrency issues. 2016-10-18 11:57:31 +01:00
Dave Page 345ce1b6d2 Fix attribute check. 2016-10-15 16:48:52 -07:00
Dave Page 056ed21148 Allow test servers to be enabled or disabled easily in the config 2016-10-15 08:44:40 -07:00
Navnath Gadakh ae612f5403 Major update to the test suite:
1. Code changes (due to drop objects functionality).
2. Quoting for database names in drop databases.
3. Code changes for import errors for pickle_path and advanced_config variables.
2016-10-07 13:59:43 +01:00
Dave Page 7175929cab Ensure that the directory paths are as they should be under the runtime. Note that this change requires (for now) the regression tests to be run from the web/regression directory. 2016-09-26 16:38:27 +01:00
Dave Page d077626cdc Improve layout of regression test format 2016-09-26 14:16:04 +01:00
Navnath Gadakh a4aae4c245 Update role and tablespace tests to cleanup properly following a failure. 2016-09-26 14:02:59 +01:00
Navnath Gadakh 1cb5a7c7ca Update regression tests to resolve issues where database/connections were getting mixed up. 2016-09-22 12:58:38 +01:00
Navnath Gadakh c84fd83595 Enhanced summary output for the test suite. 2016-09-19 16:49:06 +01:00
Navnath Gadakh d3d8836f61 Introduce a test config database for the regression tests, and track/remove objects that are created during testing. 2016-09-14 16:26:12 +01:00
Priyanka Shendge a535eddfcd Add schema and database child node regression tests. 2016-08-23 11:50:41 +01:00
Dave Page 99b4a0fe5b Add unit tests for schemas, collations and trigger functions. 2016-08-16 12:54:02 +01:00
Navnath Gadakh 81e2bc1e80 Test suite enhancements:
1. The user will specify the tablespace path in test_config.json.in
2.  If tablespace path not found, skip the test cases for that server(Only tablespace test cases)
3.  Add the skipped test summary in the test result. (Now it's showing on console + in log file, but need to update in a final enhanced test summary report. Which is research point we will work on that after finishing all nodes API test cases)
4.  Removed the test_ prefix from the values in the config files.
5. Add tablespace and roles tests
2016-08-09 16:05:40 +01:00
Dave Page 1ec1e9663c Ignore the pickle. 2016-08-03 10:25:10 +01:00
Dave Page 5987af1b44 Minor readme tweak. 2016-07-27 15:35:11 +01:00
Navnath Gadakh 5c3c543d2e Test suite improvements:
- Test framework support API testing with multiple server for this we need to modify test_config.json(for user it’s test_config.json.in) and test_advanced_config.json(for user it’s test_advanced_config.json.in). Server details of PG and  PPAS are included in both .in files.

- Removed the logic of logging in  the test client on each test scenario(As per Khushboo's comment in previous email).  We need this logic in test cases under ‘browser/tests/’ as for test scenarios like change password and  invalid login test cases as test client should be logged out first. So, as per this the code is slightly modified in ‘browser/tests/’.
2016-07-27 15:33:36 +01:00
Dave Page ae9bbc0305 Ignore regression test files. 2016-07-18 14:50:49 +01:00
Dave Page f17c2e3b84 Enhancements to the regression test suite.
Navnath Gadakh and Priyanka Shendge
2016-07-18 14:50:21 +01:00
Dave Page 80e108aa55 Fix regression test harness to allow for removal of the schema version from config.py 2016-06-30 09:46:46 +01:00
Dave Page 7d0fe669ca Code tidy. 2016-06-21 14:21:06 +01:00
Dave Page 3026b470e9 Optimise Python imports. 2016-06-21 14:12:14 +01:00
Priyanka Shendge 98d473a7ec Initial version of a regression test framework 2016-04-17 10:39:08 -04:00