.woodpecker/main.yaml — CI test-FTs step splits into parallel siblings test-FTs-non-room (22 files via `ls functional_tests/test_*.py | grep -v 'test_game_room_'`) + test-FTs-room (9 files via `ls functional_tests/test_game_room_*.py`); room cluster is the heaviest (~70% of the pre-split ~40-min wall-clock) and now runs concurrently w. the rest instead of in series; DAG explicit via depends_on on every step (Woodpecker mixes default-sequential w. depends_on awkwardly, so each step pins its prerequisite); collectstatic stays in test-two-browser-FTs only — the shared workspace propagates assets to both parallel FT steps, no race + no duplication; screendumps + build-and-push fan back in (depends_on both parallel steps); deploy-staging + deploy-prod depend on build-and-push smoke-import: 31/31 FT modules green after the rename pass Code architected by Disco DeDisco <discodedisco@outlook.com> Git commit message Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
38 lines
1.5 KiB
Python
38 lines
1.5 KiB
Python
from .base import FunctionalTest
|
|
from .post_page import PostPage
|
|
|
|
|
|
class LayoutAndStylingTest(FunctionalTest):
|
|
def test_layout_and_styling(self):
|
|
self.create_pre_authenticated_session("disco@test.io")
|
|
self.browser.get(self.live_server_url + '/billboard/')
|
|
post_page = PostPage(self)
|
|
|
|
self.browser.set_window_size(1024, 768)
|
|
|
|
def section_center(el):
|
|
return self.browser.execute_script("""
|
|
var el = arguments[0];
|
|
var ancestor = el.parentElement;
|
|
while (ancestor && ancestor.tagName !== 'SECTION'
|
|
&& !ancestor.classList.contains('container')) {
|
|
ancestor = ancestor.parentElement;
|
|
}
|
|
var a = ancestor || document.body;
|
|
var s = a.getBoundingClientRect();
|
|
var cs = window.getComputedStyle(a);
|
|
var pl = parseFloat(cs.paddingLeft);
|
|
var pr = parseFloat(cs.paddingRight);
|
|
var r = el.getBoundingClientRect();
|
|
return [r.x + r.width / 2, s.x + pl + (s.width - pl - pr) / 2];
|
|
""", el)
|
|
|
|
inputbox = post_page.get_line_input_box()
|
|
input_c, section_c = section_center(inputbox)
|
|
self.assertAlmostEqual(input_c, section_c, delta=10)
|
|
|
|
post_page.add_post_line("testing")
|
|
inputbox = post_page.get_line_input_box()
|
|
input_c, section_c = section_center(inputbox)
|
|
self.assertAlmostEqual(input_c, section_c, delta=10)
|