functional_tests + CI: rename pass + structural consolidations + parallel test-FTs split — every FT file now starts with one of 6 prefixes (test_admin_* / test_bill_* / test_core_* / test_dash_* / test_game_room_* / test_trinket_*) plus the 4 page-roots test_billboard / test_dashboard / test_gameboard / test_jasmine, so the partition is unambiguous and stable for tooling (the previous mix of test_applet_*, test_room_*, test_component_*, ad-hoc names had no consistent grouping); session-side: merged test_gatekeeper_bud_btn.py into test_bud_btn.py (then user renamed to test_core_bud_btn.py) — both files drove the same #id_bud_btn UI in two contexts (post-share + gatekeeper invite) and shared the bud-btn.js skeleton, so consolidation was overdue; split test_component_cards_tarot.py into test_admin_tarot.py (just TarotAdminTest, sitting next to test_admin / test_admin_post_readonly) + 3 classes (TarotDeckTest / GameKitDeckSelectionTest / GameKitPageTest) appended to test_game_room_tray.py; updated stale test_bud_btn.py references in the test_core_bud_btn.py docstring + test_admin_post_readonly.py comment to point at the new filename; user-driven renames (22 files): test_applet_my_notes/posts → test_bill_my_*, test_applet_new_post[_line_validation] → test_bill_new_post[_line_validation], test_applet_my_sky → test_dash_my_sky, test_applet_palette → test_dash_palette, test_wallet → test_dash_wallet, test_login → test_core_login, test_navbar → test_core_navbar, test_sharing → test_core_sharing, test_layout_and_styling → test_core_styling, test_my_buds → test_bill_my_buds, test_bud_btn → test_core_bud_btn, test_deck_contribution → test_game_room_deck_contrib, test_game_invite → test_game_room_invite, test_room_gatekeeper → test_game_room_gatekeeper, test_room_role_select → test_game_room_select_role, test_room_sea_select → test_game_room_select_sea, test_room_sig_select → test_game_room_select_sig, test_room_sky_select → test_game_room_select_sky, test_room_tray → test_game_room_tray, test_component_tray_tooltip → test_game_room_tray_tooltip; the post_page.py / room_page.py helper modules from the May-12 sprint absorbed the cross-file FT imports that would otherwise have cascade-broken on these renames
.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>
This commit is contained in:
63
src/functional_tests/test_bill_new_post.py
Normal file
63
src/functional_tests/test_bill_new_post.py
Normal file
@@ -0,0 +1,63 @@
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
|
||||
from .base import FunctionalTest
|
||||
from .post_page import PostPage
|
||||
|
||||
|
||||
class NewVisitorTest(FunctionalTest):
|
||||
# Test methods
|
||||
def test_can_start_a_post(self):
|
||||
self.create_pre_authenticated_session("alice@test.io")
|
||||
self.browser.get(self.live_server_url + '/billboard/')
|
||||
post_page = PostPage(self)
|
||||
|
||||
self.assertIn('Earthman RPG', self.browser.title)
|
||||
header_text = self.browser.find_element(By.TAG_NAME, 'h1').text
|
||||
self.assertIn('Welcome', header_text)
|
||||
|
||||
inputbox = post_page.get_line_input_box()
|
||||
self.assertEqual(inputbox.get_attribute('placeholder'), 'Enter a post line')
|
||||
|
||||
inputbox.send_keys('Buy peacock feathers')
|
||||
|
||||
inputbox.send_keys(Keys.ENTER)
|
||||
post_page.wait_for_row_in_post_table("Buy peacock feathers", 1)
|
||||
|
||||
post_page.add_post_line("Use peacock feathers to make a fly")
|
||||
|
||||
post_page.wait_for_row_in_post_table("Use peacock feathers to make a fly", 2)
|
||||
post_page.wait_for_row_in_post_table("Buy peacock feathers", 1)
|
||||
|
||||
def test_multiple_users_can_start_posts_at_different_urls(self):
|
||||
self.create_pre_authenticated_session("alice@test.io")
|
||||
self.browser.get(self.live_server_url + '/billboard/')
|
||||
post_page = PostPage(self)
|
||||
post_page.add_post_line("Buy peacock feathers")
|
||||
|
||||
edith_post_url = self.browser.current_url
|
||||
self.assertRegex(
|
||||
edith_post_url,
|
||||
r'/billboard/post/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/$',
|
||||
)
|
||||
|
||||
self.browser.delete_all_cookies()
|
||||
|
||||
self.create_pre_authenticated_session("disco@test.io")
|
||||
self.browser.get(self.live_server_url + '/billboard/')
|
||||
post_page = PostPage(self)
|
||||
page_text = self.browser.find_element(By.TAG_NAME, 'body').text
|
||||
self.assertNotIn('Buy peacock feathers', page_text)
|
||||
|
||||
post_page.add_post_line("Buy milk")
|
||||
|
||||
francis_post_url = self.browser.current_url
|
||||
self.assertRegex(
|
||||
francis_post_url,
|
||||
r'/billboard/post/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/$',
|
||||
)
|
||||
self.assertNotEqual(francis_post_url, edith_post_url)
|
||||
|
||||
page_text = self.browser.find_element(By.TAG_NAME, 'body').text
|
||||
self.assertNotIn('Buy peacock feathers', page_text)
|
||||
self.assertIn('Buy milk', page_text)
|
||||
Reference in New Issue
Block a user