Skip to content

Fix flaky youtube embed test#1419

Merged
Bramjetten merged 3 commits intomainfrom
fix-flaky-tests
Jan 11, 2026
Merged

Fix flaky youtube embed test#1419
Bramjetten merged 3 commits intomainfrom
fix-flaky-tests

Conversation

@Bramjetten
Copy link
Contributor

Add explicit waits for:

  • The embed modal controller to initialize before clicking Youtube
  • The input field to be present after Turbo Frame update

This prevents race conditions where assertions fire during frame replacement.

Bramjetten and others added 3 commits January 11, 2026 19:22
Add explicit waits for:
- The embed modal controller to initialize before clicking Youtube
- The input field to be present after Turbo Frame update

This prevents race conditions where assertions fire during frame replacement.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1. account_test.rb: Add missing `parts: []` to view_template
   - The test was adding a view_template without a :parts key
   - This polluted the global theme state causing API serializer
     to fail with "undefined method 'map' for nil" when run after

2. editing_pages_test.rb: Remove dependency on YouTube API response
   - Don't check for specific video title (requires network call)
   - Just verify the embed element was inserted
   - Increase wait time to 10s for slower CI environments

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1. test_creating_a_new_page: Add wait: 10 for Publish button
   - Page creation and redirect can be slow on CI

2. Replace youtube embed test with button embed test
   - YouTube embed requires network call to oembed API
   - Button embed has no external dependencies
   - Still tests the full embed flow: modal, form, insert, save, render

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Bramjetten Bramjetten merged commit 582b28b into main Jan 11, 2026
1 check passed
@Bramjetten Bramjetten deleted the fix-flaky-tests branch January 11, 2026 18:42
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.

1 participant