Re: [pgAdmin4][patch] Fix feature tests failure

2017-08-25 Thread Ashesh Vashi
On Wed, Aug 16, 2017 at 8:54 AM, Violet Cheng  wrote:

> Hi,
>
> Is there any update on this patch? Will it be committed soon?
>
> Hi Violet,

I've committed the patch with some changes.
Removed one more occurrence of '_assert_not_clickable_because_out_of_view'
added later by Hao Wang in commit: 5141debae7e08d205e813dd9fc52b737a9f18184.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


> Thanks,
> Violet
>
> On Thu, Aug 10, 2017 at 11:32 AM, Wenlin Zhang  wrote:
>
>> As Sarah discussed with Khushboo on slack (pgadminhackers.slack.com for
>> those who would like to join) yesterday, these errors seem to occur only on
>> her Ubuntu system. We have not replicated them on Mac. But they exist
>> before this patch, also.
>>
>> We notice that copy/paste functionality is being tested in two feature
>> tests, the query_tool_journey_test.py and 
>> copy_selected_query_results_feature_test.py.
>> Perhaps we only need to test this behavior in one of the tests?
>>
>> We've confirmed that the patch is able to be applied against the current
>> state of master without any changes after yesterday's commits.
>>
>> Thanks,
>>
>> Wenlin and Matt
>>
>
>


Re: [pgAdmin4][patch] Fix feature tests failure

2017-08-15 Thread Violet Cheng
Hi,

Is there any update on this patch? Will it be committed soon?

Thanks,
Violet

On Thu, Aug 10, 2017 at 11:32 AM, Wenlin Zhang  wrote:

> As Sarah discussed with Khushboo on slack (pgadminhackers.slack.com for
> those who would like to join) yesterday, these errors seem to occur only on
> her Ubuntu system. We have not replicated them on Mac. But they exist
> before this patch, also.
>
> We notice that copy/paste functionality is being tested in two feature
> tests, the query_tool_journey_test.py and 
> copy_selected_query_results_feature_test.py.
> Perhaps we only need to test this behavior in one of the tests?
>
> We've confirmed that the patch is able to be applied against the current
> state of master without any changes after yesterday's commits.
>
> Thanks,
>
> Wenlin and Matt
>


Re: [pgAdmin4][patch] Fix feature tests failure

2017-08-09 Thread Wenlin Zhang
As Sarah discussed with Khushboo on slack (pgadminhackers.slack.com for
those who would like to join) yesterday, these errors seem to occur only on
her Ubuntu system. We have not replicated them on Mac. But they exist
before this patch, also.

We notice that copy/paste functionality is being tested in two feature
tests, the query_tool_journey_test.py and
copy_selected_query_results_feature_test.py. Perhaps we only need to test
this behavior in one of the tests?

We've confirmed that the patch is able to be applied against the current
state of master without any changes after yesterday's commits.

Thanks,

Wenlin and Matt


Re: [pgAdmin4][patch] Fix feature tests failure

2017-08-08 Thread Khushboo Vashi
Hi Sarah,

I am doing this and didn't reply on this thread as we are discussing this
on the another thread (the History Update patch).

Thanks,
Khushboo

On Wed, Aug 9, 2017 at 9:10 AM, Sarah McAlear  wrote:

> Hi Hackers!
>
> Could someone review this patch, please?
>
> Thanks so much!
> Sarah
>
> On Mon, Aug 7, 2017 at 4:42 PM, Wenlin Zhang  wrote:
>
>> Hi Hackers,
>>
>> This patch is about fixing the feature tests failure.
>>
>> Thanks,
>> Wenlin, Violet & Hao
>>
>
>


Re: [pgAdmin4][patch] Fix feature tests failure

2017-08-08 Thread Sarah McAlear
Hi Hackers!

Could someone review this patch, please?

Thanks so much!
Sarah

On Mon, Aug 7, 2017 at 4:42 PM, Wenlin Zhang  wrote:

> Hi Hackers,
>
> This patch is about fixing the feature tests failure.
>
> Thanks,
> Wenlin, Violet & Hao
>


[pgAdmin4][patch] Fix feature tests failure

2017-08-07 Thread Wenlin Zhang
Hi Hackers,

This patch is about fixing the feature tests failure.

Thanks,
Wenlin, Violet & Hao
diff --git a/web/pgadmin/feature_tests/query_tool_journey_test.py 
b/web/pgadmin/feature_tests/query_tool_journey_test.py
index 0795028c..dcab7241 100644
--- a/web/pgadmin/feature_tests/query_tool_journey_test.py
+++ b/web/pgadmin/feature_tests/query_tool_journey_test.py
@@ -100,9 +100,6 @@ class QueryToolJourneyTest(BaseFeatureTest):
 query_we_need_to_scroll_to = self.page.find_by_xpath(
 "//*[@id='query_list']/ul/li[17]"
 )
-self._assert_not_clickable_because_out_of_view(
-query_we_need_to_scroll_to
-)
 for _ in range(17):
 ActionChains(self.page.driver) \
 .send_keys(Keys.ARROW_DOWN) \
@@ -137,8 +134,6 @@ class QueryToolJourneyTest(BaseFeatureTest):
 def _assert_clickable(self, element):
 self.page.click_element(element)
 
-def _assert_not_clickable_because_out_of_view(self, element):
-self.assertRaises(self.page.click_element(element))
 
 def after(self):
 self.page.close_query_tool()
diff --git a/web/pgadmin/feature_tests/query_tool_tests.py 
b/web/pgadmin/feature_tests/query_tool_tests.py
index 8e138170..212885f0 100644
--- a/web/pgadmin/feature_tests/query_tool_tests.py
+++ b/web/pgadmin/feature_tests/query_tool_tests.py
@@ -643,7 +643,7 @@ SELECT 1/0;"""
 self.page.find_by_id("btn-flash").click()
 self.page.wait_for_query_tool_loading_indicator_to_disappear()
 self.page.click_tab('Messages')
-self.driver.find_element_by_xpath(
+self.page.find_by_xpath(
 '//div[contains(@class, "sql-editor-message") and 
contains(string(), "division by zero")]'
 )
 
@@ -660,7 +660,7 @@ END;"""
 self.page.find_by_id("btn-flash").click()
 self.page.wait_for_query_tool_loading_indicator_to_disappear()
 self.page.click_tab('Messages')
-self.driver.find_element_by_xpath(
+self.page.find_by_xpath(
 '//div[contains(@class, "sql-editor-message") and 
contains(string(), "Query returned successfully")]'
 )
 
@@ -689,7 +689,7 @@ SELECT relname FROM pg_class WHERE relkind IN ('r','s','t') 
and relnamespace = 2
 -- 3. Execute long running query.
 -- 4. Cancel long running query execution.
 END;
-SELECT 1, pg_sleep(10)"""
+SELECT 1, pg_sleep(300)"""
 self.page.fill_codemirror_area_with(query)
 
 self.page.find_by_id("btn-query-dropdown").click()
@@ -721,10 +721,10 @@ SELECT 1, pg_sleep(10)"""
 auto_commit_btn.click()
 
 self.page.find_by_id("btn-flash").click()
-self.driver.find_element_by_xpath("//*[@id='fetching_data']")
+self.page.find_by_xpath("//*[@id='fetching_data']")
 self.page.find_by_id("btn-cancel-query").click()
 self.page.wait_for_query_tool_loading_indicator_to_disappear()
 self.page.click_tab('Messages')
-self.driver.find_element_by_xpath(
+self.page.find_by_xpath(
 '//div[contains(@class, "sql-editor-message") and 
contains(string(), "canceling statement due to user request")]'
 )