Skip to content

Refactor/design - #347

Merged
KisuHypee merged 59 commits into
mainfrom
refactor/design
Sep 12, 2026
Merged

KisuHypee merged 59 commits into
mainfrom
refactor/design

Conversation

@vocalfreak

Copy link
Copy Markdown
Collaborator

No description provided.

Structural changes:
- Add database_cleaner-active_record to test group for truncation between
  browser tests (replaces transactional rollback for system tests)
- Register :propro_headless_chrome driver with console logging prefs
- Create BrowserSystemTestCase base class with proper setup/teardown
  (viewport resize, DatabaseCleaner start/clean, wait_for_turbo helper)
- Add TestSupport::WithClues module for browser log/HTML dumps on failure
- Blank fixture_table_names for system tests (100% FactoryBot, no fixtures)
- Increase Capybara.default_max_wait_time to 5s for parallel contention

CI fix:
- Remove install-chromedriver from ci.yml (Selenium Manager resolves the
  matching driver for installed Chrome; bundling its own chromedriver broke
  system tests with version mismatch)

Test conversions:
- Convert all browser tests to inherit BrowserSystemTestCase
- Remove per-test use_transactional_tests, driven_by, teardown, login_as
  overrides (now inherited from base)
- Fix sidebar_collapse before/after idiom (scroll main, not window)
- Fix tabs_sticky scroll_main to poll until scrolled (not one-shot)
- Fix tabs_sticky sidebar pin assertion to use before/after geometry
  comparison instead of hardcoded pixel offsets
- Fix mobile_overflow drawer test to dispatch Escape via window keyboard
  event (Selenium send_keys to unfocused headless window drops events)
- Fix course_tab_persistence and sidebar_collapse to use scripted clicks
  for elements where headless Chrome intermittently swallows trusted clicks
  (reproduced as cold-worker first-click failures under full parallelism)
- Revert settings_coursecode_test to page.execute_script approach (this
  specific turbo-method link is unreliable with both native and Capybara
  click methods; scripted click is the only deterministic path)
- Delete dead tmp_fill_probe_test.rb
- Delete stale storage/*.sqlite3* files (PostgreSQL is now the sole DB)

All changes verified: bin/rails test (155 runs, 0 failures) and
bin/rails test:system ×3 (78 runs each, 0 failures, different seeds)
@KisuHypee
KisuHypee merged commit 38003fa into main Sep 12, 2026
1 check passed
KisuHypee added a commit that referenced this pull request Sep 12, 2026
Revert "Merge pull request #347 from hackerspacemmu/refactor/design"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants