summaryrefslogtreecommitdiff
path: root/spec/features/profiles/user_search_settings_spec.rb
blob: 0b05e6c9489e7cdf2fec86fb607d087fe155e80c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'User searches their settings', :js do
  let_it_be(:user) { create(:user) }

  before do
    sign_in(user)
  end

  context 'in profile page' do
    before do
      visit profile_path
    end

    it_behaves_like 'can search settings', 'Public avatar', 'Main settings'
  end

  context 'in preferences page' do
    before do
      visit profile_preferences_path
    end

    it_behaves_like 'can search settings', 'Syntax highlighting theme', 'Behavior'
  end
end