Files
python-tdd/src/functional_tests/test_layout_and_styling.py

28 lines
873 B
Python
Raw Normal View History

from .base import FunctionalTest
from .note_page import NotePage
class LayoutAndStylingTest(FunctionalTest):
def test_layout_and_styling(self):
self.create_pre_authenticated_session("disco@test.io")
self.browser.get(self.live_server_url)
note_page = NotePage(self)
self.browser.set_window_size(1024, 768)
# print("Viewport width:", self.browser.execute_script("return window.innerWidth"))
inputbox = note_page.get_item_input_box()
self.assertAlmostEqual(
inputbox.location['x'] + inputbox.size['width'] / 2,
512,
delta=10,
)
note_page.add_note_item("testing")
inputbox = note_page.get_item_input_box()
self.assertAlmostEqual(
inputbox.location['x'] + inputbox.size['width'] / 2,
512,
delta=10,
)