Skip to content

Commit

Permalink
fix(test): flaky test within delete text question
Browse files Browse the repository at this point in the history
- use accept_prompt to wait for dialog to occur first then click Delete Question
  • Loading branch information
bivanalhar authored and cysjonathan committed Dec 16, 2024
1 parent 0b9fafe commit a4f0491
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@
question = create(:course_assessment_question_text_response, assessment: assessment)
visit course_assessment_path(course, assessment)

within find('section', text: question.title) { click_button 'Delete' }
click_button 'Delete question'
within find('section', text: question.title) { find('button[aria-label="Delete"]').click }
accept_prompt

expect_toastify('Question successfully deleted.')
expect(page).not_to have_content(question.title)
Expand Down

0 comments on commit a4f0491

Please sign in to comment.