created functional_tests.list_page to handle common FT helpers; almost every FT file affected & less reliant on .base, which no longer contains those helpers
This commit is contained in:
@@ -2,23 +2,25 @@ from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
|
||||
from .base import FunctionalTest
|
||||
from .list_page import ListPage
|
||||
|
||||
class LayoutAndStylingTest(FunctionalTest):
|
||||
def test_layout_and_styling(self):
|
||||
self.browser.get(self.live_server_url)
|
||||
list_page = ListPage(self)
|
||||
|
||||
self.browser.set_window_size(1024, 768)
|
||||
# print("Viewport width:", self.browser.execute_script("return window.innerWidth"))
|
||||
|
||||
inputbox = self.get_item_input_box()
|
||||
inputbox = list_page.get_item_input_box()
|
||||
self.assertAlmostEqual(
|
||||
inputbox.location['x'] + inputbox.size['width'] / 2,
|
||||
512,
|
||||
delta=10,
|
||||
)
|
||||
|
||||
self.add_list_item("testing")
|
||||
inputbox = self.get_item_input_box()
|
||||
list_page.add_list_item("testing")
|
||||
inputbox = list_page.get_item_input_box()
|
||||
self.assertAlmostEqual(
|
||||
inputbox.location['x'] + inputbox.size['width'] / 2,
|
||||
512,
|
||||
|
||||
Reference in New Issue
Block a user