FTs now exist in own test files, ea. reliant on base.py to execute
This commit is contained in:
28
src/functional_tests/test_layout_and_styling.py
Normal file
28
src/functional_tests/test_layout_and_styling.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
|
||||
from .base import FunctionalTest
|
||||
|
||||
class LayoutAndStylingTest(FunctionalTest):
|
||||
def test_layout_and_styling(self):
|
||||
self.browser.get(self.live_server_url)
|
||||
|
||||
self.browser.set_window_size(1024, 768)
|
||||
print("Viewport width:", self.browser.execute_script("return window.innerWidth"))
|
||||
|
||||
inputbox = self.browser.find_element(By.ID, 'id-new-item')
|
||||
self.assertAlmostEqual(
|
||||
inputbox.location['x'] + inputbox.size['width'] / 2,
|
||||
512,
|
||||
delta=10,
|
||||
)
|
||||
|
||||
inputbox.send_keys('testing')
|
||||
inputbox.send_keys(Keys.ENTER)
|
||||
self.wait_for_row_in_list_table('1. testing')
|
||||
inputbox = self.browser.find_element(By.ID, 'id-new-item')
|
||||
self.assertAlmostEqual(
|
||||
inputbox.location['x'] + inputbox.size['width'] / 2,
|
||||
512,
|
||||
delta=10,
|
||||
)
|
||||
Reference in New Issue
Block a user