2026-01-14 13:23:31 -05:00
|
|
|
from .base import FunctionalTest
|
2026-03-11 13:59:43 -04:00
|
|
|
from .note_page import NotePage
|
2026-01-14 13:23:31 -05:00
|
|
|
|
2026-02-19 20:31:29 -05:00
|
|
|
|
2026-01-14 13:23:31 -05:00
|
|
|
class LayoutAndStylingTest(FunctionalTest):
|
|
|
|
|
def test_layout_and_styling(self):
|
2026-03-06 21:34:43 -05:00
|
|
|
self.create_pre_authenticated_session("disco@test.io")
|
2026-01-14 13:23:31 -05:00
|
|
|
self.browser.get(self.live_server_url)
|
2026-03-11 13:59:43 -04:00
|
|
|
note_page = NotePage(self)
|
2026-01-14 13:23:31 -05:00
|
|
|
|
|
|
|
|
self.browser.set_window_size(1024, 768)
|
2026-01-19 19:09:11 -05:00
|
|
|
# print("Viewport width:", self.browser.execute_script("return window.innerWidth"))
|
2026-01-14 13:23:31 -05:00
|
|
|
|
2026-03-11 13:59:43 -04:00
|
|
|
inputbox = note_page.get_item_input_box()
|
2026-01-14 13:23:31 -05:00
|
|
|
self.assertAlmostEqual(
|
|
|
|
|
inputbox.location['x'] + inputbox.size['width'] / 2,
|
|
|
|
|
512,
|
|
|
|
|
delta=10,
|
|
|
|
|
)
|
|
|
|
|
|
2026-03-11 13:59:43 -04:00
|
|
|
note_page.add_note_item("testing")
|
|
|
|
|
inputbox = note_page.get_item_input_box()
|
2026-01-14 13:23:31 -05:00
|
|
|
self.assertAlmostEqual(
|
|
|
|
|
inputbox.location['x'] + inputbox.size['width'] / 2,
|
|
|
|
|
512,
|
|
|
|
|
delta=10,
|
|
|
|
|
)
|