public inbox for [email protected]  
help / color / mirror / Atom feed
From: Atira Odhner <[email protected]>
To: Dave Page <[email protected]>
To: pgadmin-hackers <[email protected]>
Cc: Sarah McAlear <[email protected]>
Subject: Re: Acceptance Tests against a browser (WIP)
Date: Tue, 21 Feb 2017 17:12:46 -0500
Message-ID: <CA+Vc24oYaUDmXY+Xpzm8e3jt0fdVZedwt8_SJg7H6RDgesjDJQ@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxozK0dJ2Hsi3DW1LZW37Qyy2quRaGpxOfURHWkdG3JUMmQ@mail.gmail.com>
References: <CA+Vc24rPt8BGgtZM5Pv4CARpw7t42A5aqQX5q0_QyWWOfgsGTA@mail.gmail.com>
	<CAHowoHbyxYrnROe+8BDBaf_Z8KneW95be8g-5OMZ4q5jFH28Ow@mail.gmail.com>
	<CA+OCxoyNGb4A6BLV=u4gBCCBzj+HT_5GKPmnmu91WAGrpkEZtg@mail.gmail.com>
	<CAHowoHYNQC5kovTvkVoYWRr6NCDvLY-8PsEMcJLsu-7z43VNeg@mail.gmail.com>
	<CA+OCxoy+miWFpGa6W=1t7swn8vPvDayKtNdGnYUdaYOPNEkQ2A@mail.gmail.com>
	<CAHowoHYZxQxVLxA0N8iKoVGN=0vahSxrc0Kd4LkqoOWQYUSmkQ@mail.gmail.com>
	<CAHowoHa4k7E6LBDaiuUFPBKOcsa_ML7M3KEhDZUsbR-KKujemw@mail.gmail.com>
	<CA+OCxow6adDHsG2VTtVbRQ2ybCOdKTanFGf1hNoVdn_Gt9Betw@mail.gmail.com>
	<CA+OCxozeqDfoAiJ4AYf-Hnoq5FTCwWVXcEE-h460H5-_RVg9jw@mail.gmail.com>
	<CAHowoHa32=Y8zjYjZ_DHLukxHFzJZ9kV6y1ErDUwfPaE5MNCrw@mail.gmail.com>
	<CA+Vc24rpjYertAeAqK0T5eXAe=oGOCg2y09gNshgamih1KrOMg@mail.gmail.com>
	<CA+OCxozuy8DMJq79FTmk5p86jW-Z_88i85Wx-yc2OYLg=FTznQ@mail.gmail.com>
	<CAHowoHbXL2wu2feErTTWhgmcM4=48KATZkvguGRiy-UNNW-mfQ@mail.gmail.com>
	<CA+OCxoymnnPU5N5VU37xNWBGLZUSrSshwQSVVy1ut++YqT6UQQ@mail.gmail.com>
	<CA+OCxoxZMuXOPiNEMbYCBPXaZYBquRpcNd2YpvfwbS1T8bUPzg@mail.gmail.com>
	<CA+Vc24pjFs=Qy4-eFq5bWUAzRfwZkictJ0GykxbNh3hz=1YcBw@mail.gmail.com>
	<CA+OCxozt9evQcAtsLhRvO0xYL7QKr6Gk=RMUzTJ_w0HfFYtVww@mail.gmail.com>
	<CA+Vc24r=B7+2nEMquJde0cCwRS66oEdQhB2BDAkMDzdGtPGtjg@mail.gmail.com>
	<CA+Vc24ornL=p=eepG+MOt2wAX+A29rhJyMYq-tgHkwLk0F40DQ@mail.gmail.com>
	<CA+OCxozsTtd+dTRV7=N+xD-0fD4_fPAq+iFrORPk3QU2mHo6UA@mail.gmail.com>
	<CA+Vc24p_Q9FGy3MGCHUd_HaGfHNmqkfqrqRV9HSkS7cSosTdFA@mail.gmail.com>
	<CA+OCxowRnWpS5sBRWFdL=cprJ4rU_bencj2VpbLx4YjtJg-TMQ@mail.gmail.com>
	<CA+Vc24rG9rERsphieMhGTPLSCajX=DUV2T_0rB6tK+WYz+V=+A@mail.gmail.com>
	<CA+OCxoxvhPXStN2VLsdHAgetGwT3aSQDhf3c5eAgYh=KqOGSbw@mail.gmail.com>
	<CA+Vc24qwf1iDiJ9aQDWq1bDHqgsAWbTQ4Y9MkLw+SRhrPtuXgA@mail.gmail.com>
	<CA+OCxozK0dJ2Hsi3DW1LZW37Qyy2quRaGpxOfURHWkdG3JUMmQ@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

Hi Dave,

We fixed the flakiness issues that we saw (hopefully they are the same ones
you were seeing.) by tearing down connections to the acceptance_test_db
before attempting to drop it at the beginning of the test. Once we have
access to the CI pipeline we can help out there to ensure the flakiness is
gone.

We wrapped the README at 80 characters, and removed the misleading function
definition from the test.

As far as the screenshots go, I'm more inclined to remove the
screenshotting than to work on improving it. It currently only works when
the failure is due to an AssertionError since that's what failureException
relies on.

We also renamed acceptance to feature_tests since 'acceptance' seemed
ambiguous/redundant with 'regression'.

Tira & Sara


On Mon, Feb 13, 2017 at 9:36 AM, Dave Page <[email protected]> wrote:

> Hi,
>
> I've been playing with this for the last couple of hours, and I just
> can't get it to work reliably;
>
> - A good percentage of the time the browser opens with a URL of
> "data:," and does nothing more. This appears to happen if tests fail,
> which still leaves server processes running in the background.
>
> - The connect_to_server test usually seems to work.
>
> - The template_selection_feature test usually does *not* work. I can't
> see an obvious reason, but I suspect it's a race condition. What seems
> to happen is that the function definition is entered, but not
> registered by the UI, so the mSQL panel just ends up saying
> "incomplete definition". Manually checking what was input proves that
> everything is correct - and indeed, returning the SQL tab shows the
> expected SQL.
>
> Other issues I noted:
>
> - The template_selection_feature test should just enter BEGIN/END.
> What it currently enters is an entire function definition, when only
> the body content is expected. E.g.
>
>         self.page.fill_codemirror_area_with(
> """BEGIN
>
> END;
> """
>         )
>
> - Screenshots are being taken of failed tests:
>   1) I've never actually seen any get saved
>   2) They should be saved to the same directory as the test log, not /tmp
>   3) They should have guaranteed unique names, and be mentioned in the
> test output so the user can reference the image to the failure.
>
> The reason the last two items are important is that I've now got a
> test server running the test suite with every supported version of
> Python, for every supported database (well, almost, pending a couple
> of fixes). I have separate workspaces for each Python version, and a
> single test run might run every test 10 times, once for each database
> server.
>
> - Please wrap the README at < 80 chars.
>
>
>
> On Thu, Feb 9, 2017 at 4:17 PM, Atira Odhner <[email protected]> wrote:
> > Hi Dave,
> >
> >>  I think the problem was that the way you phrased it,
> >
> >
> > You're right, we totally messed that up. We were talking about making 3
> > patches and ended up making only 2 and forgot to reword that bit.
> > Sorry about that.
> >
> > Here are the two patches for this change that resolves the AttributeError
> > you were seeing. The first patch is identical to the patch of the same
> name
> > in the other email thread.
> >
> >> We're used to
> >> dealing with larger patchsets via the mailing list - typically as long
> >> as you're clear about any dependencies, it shouldn't be a problem.
> >
> >
> > Great! We'll try sending patchsets from now on and hopefully that
> resolves
> > some of the issues we were seeing.
> >
> > Tira & George
> >
> > On Thu, Feb 9, 2017 at 9:28 AM, Dave Page <[email protected]> wrote:
> >>
> >> Hi
> >>
> >> On Thu, Feb 9, 2017 at 2:20 PM, Atira Odhner <[email protected]>
> wrote:
> >> > Certainly.  We did mention the dependency in the email. Would it be
> >> > better
> >> > to mention it in the patch name?
> >>
> >> I think the problem was that the way you phrased it, it sounded
> >> optional ("an updated patch which does not include adding that test
> >> helper in case you apply the show-tables patch first"). I think a
> >> clear "This patch is dependent on patch Foo" would suffice.
> >>
> >> > Is there a better way for us to manage
> >> > these changes? On other open source projects, I've seen github mirrors
> >> > set
> >> > up so that changes can be pulled in like branches rather then as patch
> >> > applies. That would have avoided this situation since the parent
> commit
> >> > would be pulled in with the same SHA from either pull request branch
> and
> >> > git
> >> > would not see it as a conflict.
> >> >
> >> > I'm rather new to dealing with patch files like this so I would love
> >> > some
> >> > tips.
> >>
> >> The Postgres project in general is quite conservative and stuck in
> >> it's ways about how things are done (which is usually a good thing
> >> considering you trust your data to the resulting code). We're used to
> >> dealing with larger patchsets via the mailing list - typically as long
> >> as you're clear about any dependencies, it shouldn't be a problem.
> >> Some of us use tools like PyCharms for handling patches and helping
> >> with reviews etc. which I guess replaces most, if not all of the
> >> GitHub functionality over plain git.
> >>
> >> --
> >> Dave Page
> >> Blog: http://pgsnake.blogspot.com
> >> Twitter: @pgsnake
> >>
> >> EnterpriseDB UK: http://www.enterprisedb.com
> >> The Enterprise PostgreSQL Company
> >
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] 0003-Rename-acceptance-feature_tests-and-make-tests-less-.patch (12.5K, 3-0003-Rename-acceptance-feature_tests-and-make-tests-less-.patch)
  download | inline diff:
From 52bc460dffa6497a2074178d74aafeeeae0be292 Mon Sep 17 00:00:00 2001
From: "George Gelashvili, Sarah McAlear and Tira Odhner"
 <[email protected]>
Date: Tue, 21 Feb 2017 11:25:36 -0500
Subject: [PATCH 1/2] Rename acceptance -> feature_tests and make tests less
 flaky by tearing down the database connection before running the test

---
 .../{acceptance => feature_tests}/__init__.py      |  0
 .../connect_to_server_feature_test.py              | 22 +++---------------
 .../template_selection_feature_test.py             | 24 ++++----------------
 web/pgadmin/utils/route.py                         |  2 +-
 web/regression/README                              |  6 ++---
 .../tests => regression/feature_utils}/__init__.py |  0
 .../{utils => feature_utils}/app_starter.py        |  0
 web/regression/feature_utils/base_feature_test.py  | 26 ++++++++++++++++++++++
 .../{utils => feature_utils}/pgadmin_page.py       |  6 ++++-
 web/regression/test_utils.py                       |  5 +++++
 web/regression/utils/__init__.py                   |  0
 11 files changed, 47 insertions(+), 44 deletions(-)
 rename web/pgadmin/{acceptance => feature_tests}/__init__.py (100%)
 rename web/pgadmin/{acceptance/tests => feature_tests}/connect_to_server_feature_test.py (78%)
 rename web/pgadmin/{acceptance/tests => feature_tests}/template_selection_feature_test.py (74%)
 rename web/{pgadmin/acceptance/tests => regression/feature_utils}/__init__.py (100%)
 rename web/regression/{utils => feature_utils}/app_starter.py (100%)
 create mode 100644 web/regression/feature_utils/base_feature_test.py
 rename web/regression/{utils => feature_utils}/pgadmin_page.py (95%)
 delete mode 100644 web/regression/utils/__init__.py

diff --git a/web/pgadmin/acceptance/__init__.py b/web/pgadmin/feature_tests/__init__.py
similarity index 100%
rename from web/pgadmin/acceptance/__init__.py
rename to web/pgadmin/feature_tests/__init__.py
diff --git a/web/pgadmin/acceptance/tests/connect_to_server_feature_test.py b/web/pgadmin/feature_tests/connect_to_server_feature_test.py
similarity index 78%
rename from web/pgadmin/acceptance/tests/connect_to_server_feature_test.py
rename to web/pgadmin/feature_tests/connect_to_server_feature_test.py
index c3bee4e6..2a7f638e 100644
--- a/web/pgadmin/acceptance/tests/connect_to_server_feature_test.py
+++ b/web/pgadmin/feature_tests/connect_to_server_feature_test.py
@@ -7,29 +7,20 @@
 #
 ##############################################################
 
-from selenium import webdriver
 from selenium.webdriver import ActionChains
 
 import config as app_config
-from pgadmin.utils.route import BaseTestGenerator
 from regression import test_utils
-from regression.utils.app_starter import AppStarter
-from regression.utils.pgadmin_page import PgadminPage
+from regression.feature_utils.base_feature_test import BaseFeatureTest
 
 
-class ConnectsToServerFeatureTest(BaseTestGenerator):
+class ConnectsToServerFeatureTest(BaseFeatureTest):
     """
     Tests that a database connection can be created from the UI
     """
 
     def setUp(self):
-        if app_config.SERVER_MODE:
-            self.skipTest("Currently, config is set to start pgadmin in server mode. "
-                          "This test doesn't know username and password so doesn't work in server mode")
-
-        driver = webdriver.Chrome()
-        self.app_starter = AppStarter(driver, app_config)
-        self.page = PgadminPage(driver, app_config)
+        super(ConnectsToServerFeatureTest, self).setUp()
 
         connection = test_utils.get_db_connection(self.server['db'],
                                                   self.server['username'],
@@ -40,9 +31,6 @@ class ConnectsToServerFeatureTest(BaseTestGenerator):
         test_utils.create_database(self.server, "acceptance_test_db")
         test_utils.create_table(self.server, "acceptance_test_db", "test_table")
 
-        self.app_starter.start_app()
-        self.page.wait_for_app()
-
     def runTest(self):
         self.assertEqual(app_config.APP_NAME, self.page.driver.title)
         self.page.wait_for_spinner_to_disappear()
@@ -61,10 +49,6 @@ class ConnectsToServerFeatureTest(BaseTestGenerator):
                                                   self.server['port'])
         test_utils.drop_database(connection, "acceptance_test_db")
 
-    def failureException(self, *args, **kwargs):
-        self.page.driver.save_screenshot('/tmp/pgadmin_connect_to_server_test_failure.png')
-        return AssertionError(*args, **kwargs)
-
     def _connects_to_server(self):
         self.page.find_by_xpath("//*[@class='aciTreeText' and .='Servers']").click()
         self.page.driver.find_element_by_link_text("Object").click()
diff --git a/web/pgadmin/acceptance/tests/template_selection_feature_test.py b/web/pgadmin/feature_tests/template_selection_feature_test.py
similarity index 74%
rename from web/pgadmin/acceptance/tests/template_selection_feature_test.py
rename to web/pgadmin/feature_tests/template_selection_feature_test.py
index b7405d56..858950f4 100644
--- a/web/pgadmin/acceptance/tests/template_selection_feature_test.py
+++ b/web/pgadmin/feature_tests/template_selection_feature_test.py
@@ -1,22 +1,13 @@
 from selenium import webdriver
 from selenium.webdriver import ActionChains
 
-import config as app_config
-from pgadmin.utils.route import BaseTestGenerator
 from regression import test_utils
-from regression.utils.app_starter import AppStarter
-from regression.utils.pgadmin_page import PgadminPage
+from regression.feature_utils.base_feature_test import BaseFeatureTest
 
 
-class TemplateSelectionFeatureTest(BaseTestGenerator):
+class TemplateSelectionFeatureTest(BaseFeatureTest):
     def setUp(self):
-        if app_config.SERVER_MODE:
-            self.skipTest("Currently, config is set to start pgadmin in server mode. "
-                          "This test doesn't know username and password so doesn't work in server mode")
-
-        driver = webdriver.Chrome()
-        self.app_starter = AppStarter(driver, app_config)
-        self.page = PgadminPage(driver, app_config)
+        super(TemplateSelectionFeatureTest, self).setUp()
 
         connection = test_utils.get_db_connection(self.server['db'],
                                                   self.server['username'],
@@ -27,9 +18,6 @@ class TemplateSelectionFeatureTest(BaseTestGenerator):
 
         test_utils.create_database(self.server, "acceptance_test_db")
 
-        self.app_starter.start_app()
-        self.page.wait_for_app()
-
         self.page.add_server(self.server)
 
     def runTest(self):
@@ -71,8 +59,4 @@ $BODY$
                                                   self.server['db_password'],
                                                   self.server['host'],
                                                   self.server['port'])
-        test_utils.drop_database(connection, "acceptance_test_db")
-
-    def failureException(self, *args, **kwargs):
-        self.page.driver.save_screenshot('/tmp/pgadmin_sql_template_selection_failure.png')
-        return AssertionError(*args, **kwargs)
+        test_utils.drop_database(connection, "acceptance_test_db")
\ No newline at end of file
diff --git a/web/pgadmin/utils/route.py b/web/pgadmin/utils/route.py
index 996892a6..2dea25d9 100644
--- a/web/pgadmin/utils/route.py
+++ b/web/pgadmin/utils/route.py
@@ -48,7 +48,7 @@ class TestsGeneratorRegistry(ABCMeta):
         # Register this type of module, based on the module name
         # Avoid registering the BaseDriver itself
 
-        if name != 'BaseTestGenerator':
+        if name != 'BaseTestGenerator' and name != 'BaseFeatureTest':
             TestsGeneratorRegistry.registry[d['__module__']] = cls
 
         ABCMeta.__init__(cls, name, bases, d)
diff --git a/web/regression/README b/web/regression/README
index 7101eb75..d16111b6 100644
--- a/web/regression/README
+++ b/web/regression/README
@@ -103,7 +103,7 @@ Test Data Details
 Execution:
 -----------
 
-- For acceptance tests to run as part of the entire test suite, Chrome and chromedriver need to be installed:
+- For feature tests to run as part of the entire test suite, Chrome and chromedriver need to be installed:
   get chromedriver from https://sites.google.com/a/chromium.org/chromedriver/downloads or a package manager
   and make sure it is on the PATH
 
@@ -137,8 +137,8 @@ Execution:
 
 - Exclude a package and its subpackages when running tests:
 
-    Example: exclude acceptance tests but run all others:
-    run 'python runtests.py --exclude acceptance'
+    Example: exclude feature tests but run all others:
+    run 'python runtests.py --exclude feature_tests'
 
     Example: exclude multiple packages:
     run 'python runtests.py --exclude browser.server_groups.servers.databases,browser.server_groups.servers.tablespaces'
diff --git a/web/pgadmin/acceptance/tests/__init__.py b/web/regression/feature_utils/__init__.py
similarity index 100%
rename from web/pgadmin/acceptance/tests/__init__.py
rename to web/regression/feature_utils/__init__.py
diff --git a/web/regression/utils/app_starter.py b/web/regression/feature_utils/app_starter.py
similarity index 100%
rename from web/regression/utils/app_starter.py
rename to web/regression/feature_utils/app_starter.py
diff --git a/web/regression/feature_utils/base_feature_test.py b/web/regression/feature_utils/base_feature_test.py
new file mode 100644
index 00000000..62d3bb36
--- /dev/null
+++ b/web/regression/feature_utils/base_feature_test.py
@@ -0,0 +1,26 @@
+from selenium import webdriver
+
+import config as app_config
+from pgadmin.utils.route import BaseTestGenerator
+from regression.feature_utils.app_starter import AppStarter
+from regression.feature_utils.pgadmin_page import PgadminPage
+
+
+class BaseFeatureTest(BaseTestGenerator):
+    def setUp(self):
+        if app_config.SERVER_MODE:
+            self.skipTest("Currently, config is set to start pgadmin in server mode. "
+                          "This test doesn't know username and password so doesn't work in server mode")
+
+        driver = webdriver.Chrome()
+        self.app_starter = AppStarter(driver, app_config)
+        self.page = PgadminPage(driver, app_config)
+        self.app_starter.start_app()
+        self.page.wait_for_app()
+
+    def failureException(self, *args, **kwargs):
+        self.page.driver.save_screenshot('/tmp/feature_test_failure.png')
+        return AssertionError(*args, **kwargs)
+
+    def runTest(self):
+        pass
\ No newline at end of file
diff --git a/web/regression/utils/pgadmin_page.py b/web/regression/feature_utils/pgadmin_page.py
similarity index 95%
rename from web/regression/utils/pgadmin_page.py
rename to web/regression/feature_utils/pgadmin_page.py
index d6a5836c..8d2843f6 100644
--- a/web/regression/utils/pgadmin_page.py
+++ b/web/regression/feature_utils/pgadmin_page.py
@@ -1,4 +1,5 @@
 import time
+
 from selenium.common.exceptions import NoSuchElementException
 from selenium.webdriver import ActionChains
 from selenium.webdriver.common.keys import Keys
@@ -65,6 +66,9 @@ class PgadminPage:
             "//pre[contains(@class,'CodeMirror-line')]/../../../*[contains(@class,'CodeMirror-code')]").click()
         ActionChains(self.driver).send_keys(field_content).perform()
 
+    def click_tab(self, tab_name):
+        self.find_by_xpath("//*[contains(@class,'wcPanelTab') and contains(.,'" + tab_name + "')]").click()
+
     def wait_for_input_field_content(self, field_name, content):
         def input_field_has_content():
             element = self.driver.find_element_by_xpath(
@@ -117,4 +121,4 @@ class PgadminPage:
             time_waited += sleep_time
             time.sleep(sleep_time)
 
-        raise RuntimeError("timed out waiting for " + waiting_for_message)
+        raise AssertionError("timed out waiting for " + waiting_for_message)
diff --git a/web/regression/test_utils.py b/web/regression/test_utils.py
index b4445d7d..1c2d244d 100644
--- a/web/regression/test_utils.py
+++ b/web/regression/test_utils.py
@@ -157,6 +157,11 @@ def drop_database(connection, database_name):
     """This function used to drop the database"""
     if database_name not in ["postgres", "template1", "template0"]:
         pg_cursor = connection.cursor()
+
+        pg_cursor.execute(
+            "SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity "
+            "WHERE pg_stat_activity.datname ='%s' and pid <> pg_backend_pid();" % database_name
+                          )
         pg_cursor.execute("SELECT * FROM pg_database db WHERE"
                           " db.datname='%s'" % database_name)
         if pg_cursor.fetchall():
diff --git a/web/regression/utils/__init__.py b/web/regression/utils/__init__.py
deleted file mode 100644
index e69de29b..00000000
-- 
2.11.0



  [application/octet-stream] 0004-wrap-README-in-80-characters-and-simplify-TemplateSe.patch (3.2K, 4-0004-wrap-README-in-80-characters-and-simplify-TemplateSe.patch)
  download | inline diff:
From 186e6fda2557e23346a14340364187bd0fc8dcee Mon Sep 17 00:00:00 2001
From: Sarah McAlear and Tira Odhner <[email protected]>
Date: Tue, 21 Feb 2017 15:42:45 -0500
Subject: [PATCH 2/2] wrap README in 80 characters and simplify
 TemplateSelectionFeatureTest

---
 README                                                      | 13 +++++++------
 .../feature_tests/template_selection_feature_test.py        | 11 +----------
 2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/README b/README
index c4a533e2..ed010174 100644
--- a/README
+++ b/README
@@ -2,7 +2,7 @@ pgAdmin 4
 =========
 
 pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the
-PostgreSQL (http://www.postgresql.org) database. 
+PostgreSQL (http://www.postgresql.org) database.
 
 In the following documentation and examples, "$PGADMIN4_SRC/" is used to denote
 the top-level directory of a copy of the pgAdmin source tree, either from a
@@ -53,9 +53,10 @@ By default, the runtime application will be built in release mode.
 On Linux, an executable called 'pgAdmin4' will be built, and on Mac OS X, an
 app bundle called pgAdmin4.app will be created.
 
-To build the runtime on a Windows system, export PYTHON_HOME and PYTHON_VERSION 
-variables in the System environment. Specify the PYTHON_VERSION with the major 
-and minor number. Do not specify micro level version.
+To build the runtime on a Windows system, export PYTHON_HOME and
+PYTHON_VERSION variables in the System environment. Specify the
+PYTHON_VERSION with the major and minor number. Do not specify micro level
+version.
 
 For example, given a Python version of A.B.C; A - Major number, B - Minor
 number, C - Micro level (Bug fix releases).
@@ -100,7 +101,7 @@ process is fairly simple - adapt as required for your distribution:
    pg_config can be found for building psycopg2), and install the required
    packages:
 
-    (pgadmin4) $ PATH=$PATH:/usr/local/pgsql/bin pip install -r $PGADMIN4_SRC/requirements_py2.txt
+   $ PATH=$PATH:/usr/local/pgsql/bin pip install -r $PGADMIN4_SRC/requirements_py2.txt
 
    If you are using Python 3, use the requirements_py3.txt file instead.
 
@@ -302,6 +303,6 @@ pgAdmin Hackers mailing list:
 
 [email protected]
 
--- 
+--
 Dave Page
 pgAdmin Project Lead
diff --git a/web/pgadmin/feature_tests/template_selection_feature_test.py b/web/pgadmin/feature_tests/template_selection_feature_test.py
index 858950f4..ceb12478 100644
--- a/web/pgadmin/feature_tests/template_selection_feature_test.py
+++ b/web/pgadmin/feature_tests/template_selection_feature_test.py
@@ -36,16 +36,7 @@ class TemplateSelectionFeatureTest(BaseFeatureTest):
         self.page.find_by_partial_link_text("Trigger function...").click()
         self.page.fill_input_by_field_name("name", "test-trigger-function")
         self.page.find_by_partial_link_text("Definition").click()
-        self.page.fill_codemirror_area_with(
-"""CREATE OR REPLACE FUNCTION log_last_name_changes()
-RETURNS TRIGGER AS
-$BODY$
-BEGIN
-
-END;
-$BODY$
-"""
-        )
+        self.page.fill_codemirror_area_with("some-trigger-function-content")
         self.page.find_by_partial_link_text("SQL").click()
 
         self.page.find_by_xpath("//*[contains(@class,'CodeMirror-lines') and contains(.,'LEAKPROOF')]")
-- 
2.11.0



view thread (30+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Acceptance Tests against a browser (WIP)
  In-Reply-To: <CA+Vc24oYaUDmXY+Xpzm8e3jt0fdVZedwt8_SJg7H6RDgesjDJQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox