2018-09-10 09:16:13 -05:00
|
|
|
##########################################################################
|
|
|
|
#
|
|
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
|
|
#
|
2019-01-02 04:24:12 -06:00
|
|
|
# Copyright (C) 2013 - 2019, The pgAdmin Development Team
|
2018-09-10 09:16:13 -05:00
|
|
|
# This software is released under the PostgreSQL Licence
|
|
|
|
#
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
from __future__ import print_function
|
|
|
|
import sys
|
|
|
|
import random
|
|
|
|
import time
|
|
|
|
|
|
|
|
from regression.python_test_utils import test_utils
|
|
|
|
from regression.feature_utils.base_feature_test import BaseFeatureTest
|
|
|
|
from selenium.common.exceptions import TimeoutException, \
|
|
|
|
StaleElementReferenceException
|
|
|
|
|
|
|
|
|
|
|
|
class BrowserToolBarFeatureTest(BaseFeatureTest):
|
|
|
|
"""
|
|
|
|
This feature test will test the tool bar on Browser panel.
|
|
|
|
"""
|
|
|
|
|
|
|
|
scenarios = [
|
|
|
|
("Browser tool bar feature test", dict())
|
|
|
|
]
|
|
|
|
|
|
|
|
test_table_name = ""
|
|
|
|
|
|
|
|
def before(self):
|
|
|
|
self.page.wait_for_spinner_to_disappear()
|
|
|
|
self.page.add_server(self.server)
|
|
|
|
self.test_table_name = "test_table" + str(random.randint(1000, 3000))
|
|
|
|
test_utils.create_table(self.server, self.test_db,
|
|
|
|
self.test_table_name)
|
|
|
|
|
|
|
|
def runTest(self):
|
|
|
|
# Check for query tool button
|
|
|
|
print("\nQuery Tool ToolBar Button ",
|
|
|
|
file=sys.stderr, end="")
|
|
|
|
self.test_query_tool_button()
|
|
|
|
print("OK.", file=sys.stderr)
|
|
|
|
|
|
|
|
# Check for view data button
|
|
|
|
print("\nView Data ToolBar Button ",
|
|
|
|
file=sys.stderr, end="")
|
|
|
|
self.test_view_data_tool_button()
|
|
|
|
print("OK.", file=sys.stderr)
|
|
|
|
|
|
|
|
# Check for filtered rows button
|
|
|
|
print("\nFiltered Rows ToolBar Button ",
|
|
|
|
file=sys.stderr, end="")
|
|
|
|
self.test_filtered_rows_tool_button()
|
|
|
|
print("OK.", file=sys.stderr)
|
|
|
|
|
|
|
|
def after(self):
|
|
|
|
self.page.remove_server(self.server)
|
|
|
|
|
|
|
|
def _locate_database_tree_node(self):
|
|
|
|
self.page.toggle_open_tree_item(self.server['name'])
|
|
|
|
self.page.toggle_open_tree_item('Databases')
|
|
|
|
self.page.toggle_open_tree_item(self.test_db)
|
|
|
|
|
|
|
|
def test_query_tool_button(self):
|
|
|
|
self._locate_database_tree_node()
|
|
|
|
|
|
|
|
retry_count = 0
|
|
|
|
while retry_count < 5:
|
|
|
|
try:
|
Improvement in the look and feel of the whole application
Changed the SCSS/CSS for the below third party libraries to adopt the
new look 'n' feel:
- wcDocker
- Alertify dialogs, and notifications
- AciTree
- Bootstrap Navbar
- Bootstrap Tabs
- Bootstrap Drop-Down menu
- Backgrid
- Select2
Adopated the new the look 'n' feel for the dialogs, wizard, properties,
tab panels, tabs, fieldset, subnode control, spinner control, HTML
table, and other form controls.
- Font is changed to Roboto
- Using SCSS variables to define the look 'n' feel
- Designer background images for the Login, and Forget password pages in
'web' mode
- Improved the look 'n' feel for the key selection in the preferences
dialog
- Table classes consistency changes across the application
- File Open and Save dialog list view changes
Author(s): Aditya Toshniwal & Khushboo Vashi
2018-12-21 05:44:55 -06:00
|
|
|
self.page.find_by_css_selector(
|
2019-06-11 09:11:13 -05:00
|
|
|
".wcFrameButton[title='Query Tool']:not(.disabled)")\
|
|
|
|
.click()
|
2018-09-10 09:16:13 -05:00
|
|
|
break
|
|
|
|
except StaleElementReferenceException:
|
|
|
|
retry_count += 1
|
|
|
|
|
|
|
|
time.sleep(0.5)
|
Improvement in the look and feel of the whole application
Changed the SCSS/CSS for the below third party libraries to adopt the
new look 'n' feel:
- wcDocker
- Alertify dialogs, and notifications
- AciTree
- Bootstrap Navbar
- Bootstrap Tabs
- Bootstrap Drop-Down menu
- Backgrid
- Select2
Adopated the new the look 'n' feel for the dialogs, wizard, properties,
tab panels, tabs, fieldset, subnode control, spinner control, HTML
table, and other form controls.
- Font is changed to Roboto
- Using SCSS variables to define the look 'n' feel
- Designer background images for the Login, and Forget password pages in
'web' mode
- Improved the look 'n' feel for the key selection in the preferences
dialog
- Table classes consistency changes across the application
- File Open and Save dialog list view changes
Author(s): Aditya Toshniwal & Khushboo Vashi
2018-12-21 05:44:55 -06:00
|
|
|
self.page.find_by_css_selector(".wcPanelTab .wcTabIcon.fa.fa-bolt")
|
2018-09-10 09:16:13 -05:00
|
|
|
|
|
|
|
def test_view_data_tool_button(self):
|
2018-10-17 05:50:22 -05:00
|
|
|
self.page.select_tree_item(self.test_db)
|
2018-09-10 09:16:13 -05:00
|
|
|
self.page.toggle_open_tree_item('Schemas')
|
|
|
|
self.page.toggle_open_tree_item('public')
|
2019-03-21 07:04:37 -05:00
|
|
|
self.page.toggle_open_tables_node()
|
2018-09-10 09:16:13 -05:00
|
|
|
self.page.select_tree_item(self.test_table_name)
|
|
|
|
|
|
|
|
retry_count = 0
|
|
|
|
while retry_count < 5:
|
|
|
|
try:
|
Improvement in the look and feel of the whole application
Changed the SCSS/CSS for the below third party libraries to adopt the
new look 'n' feel:
- wcDocker
- Alertify dialogs, and notifications
- AciTree
- Bootstrap Navbar
- Bootstrap Tabs
- Bootstrap Drop-Down menu
- Backgrid
- Select2
Adopated the new the look 'n' feel for the dialogs, wizard, properties,
tab panels, tabs, fieldset, subnode control, spinner control, HTML
table, and other form controls.
- Font is changed to Roboto
- Using SCSS variables to define the look 'n' feel
- Designer background images for the Login, and Forget password pages in
'web' mode
- Improved the look 'n' feel for the key selection in the preferences
dialog
- Table classes consistency changes across the application
- File Open and Save dialog list view changes
Author(s): Aditya Toshniwal & Khushboo Vashi
2018-12-21 05:44:55 -06:00
|
|
|
self.page.find_by_css_selector(
|
2019-06-11 09:11:13 -05:00
|
|
|
".wcFrameButton[title='View Data']:not(.disabled)").click()
|
2018-09-10 09:16:13 -05:00
|
|
|
break
|
|
|
|
except StaleElementReferenceException:
|
|
|
|
retry_count += 1
|
|
|
|
|
|
|
|
time.sleep(0.5)
|
Improvement in the look and feel of the whole application
Changed the SCSS/CSS for the below third party libraries to adopt the
new look 'n' feel:
- wcDocker
- Alertify dialogs, and notifications
- AciTree
- Bootstrap Navbar
- Bootstrap Tabs
- Bootstrap Drop-Down menu
- Backgrid
- Select2
Adopated the new the look 'n' feel for the dialogs, wizard, properties,
tab panels, tabs, fieldset, subnode control, spinner control, HTML
table, and other form controls.
- Font is changed to Roboto
- Using SCSS variables to define the look 'n' feel
- Designer background images for the Login, and Forget password pages in
'web' mode
- Improved the look 'n' feel for the key selection in the preferences
dialog
- Table classes consistency changes across the application
- File Open and Save dialog list view changes
Author(s): Aditya Toshniwal & Khushboo Vashi
2018-12-21 05:44:55 -06:00
|
|
|
self.page.find_by_css_selector(".wcPanelTab .wcTabIcon.fa.fa-bolt")
|
2018-09-10 09:16:13 -05:00
|
|
|
|
|
|
|
def test_filtered_rows_tool_button(self):
|
|
|
|
retry_count = 0
|
|
|
|
while retry_count < 5:
|
|
|
|
try:
|
Improvement in the look and feel of the whole application
Changed the SCSS/CSS for the below third party libraries to adopt the
new look 'n' feel:
- wcDocker
- Alertify dialogs, and notifications
- AciTree
- Bootstrap Navbar
- Bootstrap Tabs
- Bootstrap Drop-Down menu
- Backgrid
- Select2
Adopated the new the look 'n' feel for the dialogs, wizard, properties,
tab panels, tabs, fieldset, subnode control, spinner control, HTML
table, and other form controls.
- Font is changed to Roboto
- Using SCSS variables to define the look 'n' feel
- Designer background images for the Login, and Forget password pages in
'web' mode
- Improved the look 'n' feel for the key selection in the preferences
dialog
- Table classes consistency changes across the application
- File Open and Save dialog list view changes
Author(s): Aditya Toshniwal & Khushboo Vashi
2018-12-21 05:44:55 -06:00
|
|
|
self.page.find_by_css_selector(
|
2019-06-11 09:11:13 -05:00
|
|
|
".wcFrameButton[title='Filtered Rows']:not(.disabled)")\
|
|
|
|
.click()
|
2018-09-10 09:16:13 -05:00
|
|
|
break
|
|
|
|
except StaleElementReferenceException:
|
|
|
|
retry_count += 1
|
|
|
|
|
|
|
|
time.sleep(0.5)
|
Improvement in the look and feel of the whole application
Changed the SCSS/CSS for the below third party libraries to adopt the
new look 'n' feel:
- wcDocker
- Alertify dialogs, and notifications
- AciTree
- Bootstrap Navbar
- Bootstrap Tabs
- Bootstrap Drop-Down menu
- Backgrid
- Select2
Adopated the new the look 'n' feel for the dialogs, wizard, properties,
tab panels, tabs, fieldset, subnode control, spinner control, HTML
table, and other form controls.
- Font is changed to Roboto
- Using SCSS variables to define the look 'n' feel
- Designer background images for the Login, and Forget password pages in
'web' mode
- Improved the look 'n' feel for the key selection in the preferences
dialog
- Table classes consistency changes across the application
- File Open and Save dialog list view changes
Author(s): Aditya Toshniwal & Khushboo Vashi
2018-12-21 05:44:55 -06:00
|
|
|
self.page.find_by_css_selector(
|
2019-06-11 09:11:13 -05:00
|
|
|
".alertify .ajs-header[data-title~='Filter']")
|
2018-09-10 09:16:13 -05:00
|
|
|
self.page.click_modal('Cancel')
|