GitLab steht aufgrund wichtiger Wartungsarbeiten am Montag, den 8. März, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit 8b0cdf4c authored by Douwe Maan's avatar Douwe Maan

Merge branch '23875-fixup-failing-spec' into 'master'

Prevent a spec from failing in `spec/features/merge_requests/diff_notes_resolve_spec.rb`

## What does this MR do?

Fixes a failing spec in `spec/features/merge_requests/diff_notes_resolve_spec.rb`

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

Tests failing on master. RSpec executes inner `before` blocks after outer `before` blocks, so the second note was being added *after* loading the page, and then being pulled in by running JS on the page, causing intermittent failures if we clicked the resolve button before the note was loaded.

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG]( entry added
- [ ] [Documentation created/updated](
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](
- [ ] Conform by the [style guides](
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](

## What are the relevant issue numbers?

Closes #23875

See merge request !7150
parents 66870960 671556c6
......@@ -194,12 +194,12 @@
context 'multiple notes' do
before do
create(:diff_note_on_merge_request, project: project, noteable: merge_request)
it 'does not mark discussion as resolved when resolving single note' do
page.within '.diff-content .note' do
page.first '.diff-content .note' do
sleep 1
expect(first('.line-resolve-btn')['data-original-title']).to eq("Resolved by #{}")
......@@ -212,7 +212,9 @@
it 'resolves discussion' do
page.all('.note').each do |note|
note.all('.line-resolve-btn').each do |button|
expect(page).to have_content('Resolved by')
......@@ -292,7 +294,7 @@
expect(holder).to have_selector('.discussion-next-btn')
it 'displays next discussion even if hidden' do
page.all('.note-discussion').each do |discussion|
page.within discussion do
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