mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Support running feature tests against Firefox. Fixes #3270
This commit is contained in:
@@ -200,7 +200,7 @@ class CopySelectedQueryResultsFeatureTest(BaseFeatureTest):
|
||||
ActionChains(self.page.driver).key_down(
|
||||
Keys.CONTROL).send_keys('c').key_up(Keys.CONTROL).perform()
|
||||
|
||||
self.assertEqual('"cool info"', pyperclip.paste())
|
||||
self.assertIn('"cool info"', pyperclip.paste())
|
||||
|
||||
def after(self):
|
||||
self.page.close_query_tool()
|
||||
|
||||
@@ -185,6 +185,8 @@ CREATE TABLE public.defaults_{0}
|
||||
(By.XPATH, xpath)), CheckForViewDataTest.TIMEOUT_STRING
|
||||
)
|
||||
cell_el = self.page.find_by_xpath(xpath)
|
||||
self.page.driver.execute_script("arguments[0].scrollIntoView()",
|
||||
cell_el)
|
||||
ActionChains(self.driver).move_to_element(cell_el).double_click(
|
||||
cell_el
|
||||
).perform()
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
##########################################################################
|
||||
|
||||
import os
|
||||
import time
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
from selenium.webdriver.common.by import By
|
||||
@@ -98,7 +99,18 @@ class CheckFileManagerFeatureTest(BaseFeatureTest):
|
||||
self.page.find_by_id("file-input-path").send_keys(
|
||||
Keys.RETURN
|
||||
)
|
||||
contents = self.page.find_by_id("contents").get_attribute('innerHTML')
|
||||
|
||||
if self.page.driver.capabilities['browserName'] == 'firefox':
|
||||
table = self.page.wait_for_element_to_reload(
|
||||
lambda driver:
|
||||
driver.find_element_by_css_selector("table#contents")
|
||||
)
|
||||
else:
|
||||
table = self.page.driver \
|
||||
.find_element_by_css_selector("table#contents")
|
||||
|
||||
contents = table.get_attribute('innerHTML')
|
||||
|
||||
self.page.click_modal('Cancel')
|
||||
self.page.wait_for_query_tool_loading_indicator_to_disappear()
|
||||
self._check_escaped_characters(
|
||||
|
||||
Reference in New Issue
Block a user