Commit b8809a40 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch '225637-flaky-test' into 'master'

Try to fix a flaky Epic show spec

Closes #225637

See merge request gitlab-org/gitlab!35852
parents 59e851de e31cf877
......@@ -141,14 +141,12 @@ RSpec.describe 'Epic show', :js do
let!(:notes) { create_list(:note, 2, noteable: epic) }
context 'when sorted by `Oldest first`' do
it 'shows label `Oldest first`' do
it 'shows comments in the correct order' do
page.within('[data-testid="sort-discussion-filter"]') do
expect(find('.js-dropdown-text')).to have_content('Oldest first')
end
end
it 'shows comments in the correct order' do
items = all('.timeline-entry .timeline-discussion-body p')
items = all('.timeline-entry .timeline-discussion-body .note-text')
expect(items[0]).to have_content(notes[0].note)
expect(items[1]).to have_content(notes[1].note)
end
......@@ -163,14 +161,12 @@ RSpec.describe 'Epic show', :js do
end
end
it 'shows label `Newest first`' do
it 'shows comments in the correct order' do
page.within('[data-testid="sort-discussion-filter"]') do
expect(find('.js-dropdown-text')).to have_content('Newest first')
end
end
it 'shows comments in the correct order' do
items = all('.timeline-entry .timeline-discussion-body p')
items = all('.timeline-entry .timeline-discussion-body .note-text')
expect(items[0]).to have_content(notes[1].note)
expect(items[1]).to have_content(notes[0].note)
end
......
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