Commit 9c2d0a47 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch...

Merge branch '297201-flaky-spec-in-spec-features-issues-issue_state_spec-rb-issue-state-when-closed-when-clicking' into 'master'

test: Refresh the page to avoid flakiness

See merge request gitlab-org/gitlab!51380
parents 852ea7c0 4b09763e
...@@ -13,10 +13,13 @@ RSpec.describe 'issue state', :js do ...@@ -13,10 +13,13 @@ RSpec.describe 'issue state', :js do
shared_examples 'issue closed' do |selector| shared_examples 'issue closed' do |selector|
it 'can close an issue' do it 'can close an issue' do
wait_for_requests
expect(find('.status-box')).to have_content 'Open' expect(find('.status-box')).to have_content 'Open'
within selector do within selector do
click_button 'Close issue' click_button 'Close issue'
wait_for_requests
end end
expect(find('.status-box')).to have_content 'Closed' expect(find('.status-box')).to have_content 'Closed'
...@@ -25,10 +28,13 @@ RSpec.describe 'issue state', :js do ...@@ -25,10 +28,13 @@ RSpec.describe 'issue state', :js do
shared_examples 'issue reopened' do |selector| shared_examples 'issue reopened' do |selector|
it 'can reopen an issue' do it 'can reopen an issue' do
wait_for_requests
expect(find('.status-box')).to have_content 'Closed' expect(find('.status-box')).to have_content 'Closed'
within selector do within selector do
click_button 'Reopen issue' click_button 'Reopen issue'
wait_for_requests
end end
expect(find('.status-box')).to have_content 'Open' expect(find('.status-box')).to have_content 'Open'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment