Skip to content

Commit

Permalink
Fix: Flaky add submission test (round 2) (#3948)
Browse files Browse the repository at this point in the history
Because:
* It has appeared again:
https://app.circleci.com/pipelines/github/TheOdinProject/theodinproject/5600/workflows/5c7ebb19-cdbc-4c1f-822d-25b3e547137a/jobs/15911/tests#failed-test-0
* Capybara is trying to open the form before the project submissions
turbo frame is finished loading.

This commit:
* Wait until the turbo frame is finished loading and then open the
submission modal.
  • Loading branch information
KevinMulhern authored Jul 10, 2023
1 parent 1804e6e commit 6b522ee
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@

context 'when setting a submission as private' do
it 'will display the submission for the submission owner but not for other users' do
form = Pages::ProjectSubmissions::Form.new.open.fill_in

form.v2_make_private
form.submit
wait_for_turbo_frame("project-submissions_lesson_#{lesson.id}") do
form = Pages::ProjectSubmissions::Form.new.open.fill_in
form.v2_make_private
form.submit
end

within(:test_id, 'submissions-list') do
page.driver.refresh
Expand Down

0 comments on commit 6b522ee

Please sign in to comment.