pgAdmin 4 commit: Extract the tests and refactor some of the methods. - Mailing list pgadmin-hackers

From Ashesh Vashi
Subject pgAdmin 4 commit: Extract the tests and refactor some of the methods.
Date
Msg-id E1fQ9th-0001WJ-VB@gothos.postgresql.org
Whole thread Raw
List pgadmin-hackers
Extract the tests and refactor some of the methods.

Extract some of the ACI Tree functionalities, and decouple it from the
main source. Also - create some abstractions from the repeated code
around the enable/disable the schema children object create/edit/delete
functionalities, and also created the dialog wrappers for backup and
restore dialogs.

Reviewed by: Khushboo and Ashesh
Refactored by: Ashesh

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=7dd6372eeb3fb2c979fa767afc95d5ee6e2e41ee
Author: Joao De Almeida Pereira <jdealmeidapereira@pivotal.io>

Modified Files
--------------
.../schemas/collations/static/js/collation.js      |  34 +-
.../databases/schemas/domains/static/js/domain.js  |  38 +-
.../foreign_tables/static/js/foreign_table.js      |  37 +-
.../static/js/fts_configuration.js                 |  38 +-
.../fts_dictionaries/static/js/fts_dictionary.js   |  39 +-
.../schemas/fts_parser/static/js/fts_parser.js     |  38 +-
.../fts_templates/static/js/fts_template.js        |  38 +-
.../schemas/functions/static/js/function.js        |  41 +-
.../functions/static/js/trigger_function.js        |  40 +-
.../schemas/sequences/static/js/sequence.js        |  39 +-
.../servers/databases/schemas/static/js/child.js   |  22 +
.../servers/databases/schemas/static/js/schema.js  |  46 +-
.../schemas/static/js/schema_child_tree_node.js    |  41 ++
.../schemas/tables/column/static/js/column.js      |  36 +-
.../check_constraint/static/js/check_constraint.js |   1 -
.../static/js/exclusion_constraint.js              |   1 -
.../foreign_key/static/js/foreign_key.js           |   1 -
.../index_constraint/static/js/primary_key.js      |   1 -
.../static/js/unique_constraint.js                 |   1 -
.../tables/constraints/static/js/constraints.js    |   2 -
.../schemas/tables/indexes/static/js/index.js      |  12 +-
.../tables/partitions/static/js/partition.js       |  68 +--
.../schemas/tables/rules/static/js/rule.js         |   2 -
.../tables/static/js/enable_disable_triggers.js    |  52 ++
.../databases/schemas/tables/static/js/table.js    | 112 +---
.../schemas/tables/triggers/static/js/trigger.js   |  59 +-
.../databases/schemas/types/static/js/type.js      |  41 +-
.../databases/schemas/views/static/js/mview.js     |  52 +-
.../databases/schemas/views/static/js/view.js      |  59 +-
web/pgadmin/browser/static/js/collection.js        |   8 +-
web/pgadmin/browser/static/js/node.js              |  32 +-
web/pgadmin/static/js/alertify/dialog.js           | 150 +++++
web/pgadmin/static/js/alertify/dialog_factory.js   |  52 ++
web/pgadmin/static/js/alertify/dialog_wrapper.js   |  57 ++
.../static/js/nodes/supported_database_node.js     |  37 ++
web/pgadmin/static/js/tree/pgadmin_tree_node.js    |  72 +++
web/pgadmin/static/js/tree/tree.js                 |  18 +-
web/pgadmin/tools/backup/static/js/backup.js       | 616 +------------------
.../tools/backup/static/js/backup_dialog.js        |  72 +++
.../backup/static/js/backup_dialog_wrapper.js      | 258 ++++++++
web/pgadmin/tools/backup/static/js/menu_utils.js   |  23 +
web/pgadmin/tools/datagrid/static/js/datagrid.js   | 117 +---
.../tools/datagrid/static/js/get_panel_title.js    |  33 +
web/pgadmin/tools/datagrid/static/js/show_data.js  |  92 +++
.../tools/datagrid/static/js/show_query_tool.js    |  63 ++
.../tools/grant_wizard/static/js/grant_wizard.js   |  56 +-
.../tools/grant_wizard/static/js/menu_utils.js     |  16 +
.../tools/import_export/static/js/import_export.js |  29 +-
.../tools/maintenance/static/js/maintenance.js     |  49 +-
.../tools/maintenance/static/js/menu_utils.js      |  13 +
web/pgadmin/tools/restore/static/js/menu_utils.js  |  18 +
web/pgadmin/tools/restore/static/js/restore.js     | 389 +-----------
web/pgadmin/tools/restore/static/js/restore.js.rej | 322 ++++++++++
.../tools/restore/static/js/restore_dialog.js      |  57 ++
.../restore/static/js/restore_dialog_wrapper.js    | 255 ++++++++
.../javascript/backup/backup_dialog_spec.js        | 205 +++++++
.../backup/backup_dialog_wrapper_spec.js           | 675 +++++++++++++++++++++
.../backup/global_server_backup_dialog_spec.js     | 168 +++++
.../javascript/backup/menu_utils_spec.js           |  55 ++
.../javascript/common_keyboard_shortcuts_spec.js   |   4 -
.../javascript/datagrid/get_panel_title_spec.js    |  82 +++
.../javascript/datagrid/show_data_spec.js          | 171 ++++++
.../javascript/datagrid/show_query_tool_spec.js    | 125 ++++
web/regression/javascript/fake_browser/browser.js  |  12 +
web/regression/javascript/fake_endpoints.js        |   6 +
web/regression/javascript/fake_model.js            |  21 +
.../javascript/nodes/schema/child_menu_spec.js     | 253 ++++++++
.../javascript/restore/restore_dialog_spec.js      | 203 +++++++
.../restore/restore_dialog_wrapper_spec.js         | 593 ++++++++++++++++++
.../javascript/sqleditor/filter_dialog_specs.js    |   2 -
.../table/enable_disable_triggers_spec.js          | 271 +++++++++
.../javascript/tree/pgadmin_tree_node_spec.js      | 353 +++++++++++
web/regression/javascript/tree/tree_fake.js        |  28 +-
web/webpack.shim.js                                |   1 +
web/webpack.test.config.js                         |   2 +
75 files changed, 5186 insertions(+), 1939 deletions(-)


pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: [pgAdmin4][patch] sqleditor connection status minor patch
Next
From: Dave Page
Date:
Subject: Re: [pgAdmin4][RM#3289] Can't query SQL_ASCII database.