debian-mirror-gitlab/spec/features/merge_request/user_expands_diff_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
844 B
Ruby
Raw Permalink Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2019-02-15 15:39:39 +05:30
require 'spec_helper'
2023-03-17 16:20:25 +05:30
RSpec.describe 'User expands diff', :js, feature_category: :code_review_workflow do
2019-02-15 15:39:39 +05:30
let(:project) { create(:project, :public, :repository) }
let(:merge_request) { create(:merge_request, source_branch: 'expand-collapse-files', source_project: project, target_project: project) }
before do
2022-04-04 11:22:00 +05:30
allow(Gitlab::CurrentSettings).to receive(:diff_max_patch_bytes).and_return(100.bytes)
2021-01-29 00:20:46 +05:30
2019-02-15 15:39:39 +05:30
visit(diffs_project_merge_request_path(project, merge_request))
wait_for_requests
end
it 'allows user to expand diff' do
2022-04-04 11:22:00 +05:30
page.within find("[id='4c76a1271e41072d7da9fe40bf0f79f7384d472a']") do
2021-01-29 00:20:46 +05:30
find('[data-testid="expand-button"]').click
2019-02-15 15:39:39 +05:30
wait_for_requests
2021-01-29 00:20:46 +05:30
expect(page).not_to have_content('Expand file')
2019-02-15 15:39:39 +05:30
expect(page).to have_selector('.code')
end
end
end