diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-12-04 13:52:54 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-12-04 14:10:59 +0200 |
commit | ad551e5e719fe4ef168242c8a19dcdbc92d7e6c2 (patch) | |
tree | 519af6496d55eac193e38eebdd03b0eddd1ca0fc /spec/features/admin/admin_users_spec.rb | |
parent | 40c86cfede43164e9037bac9d712e72c45bd8aea (diff) | |
download | gitlab-ce-ad551e5e719fe4ef168242c8a19dcdbc92d7e6c2.tar.gz |
Keep sorting selection when search users on admin panel
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/features/admin/admin_users_spec.rb')
-rw-r--r-- | spec/features/admin/admin_users_spec.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/features/admin/admin_users_spec.rb b/spec/features/admin/admin_users_spec.rb index 27f1d777274..931095936a6 100644 --- a/spec/features/admin/admin_users_spec.rb +++ b/spec/features/admin/admin_users_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe "Admin::Users" do - include Spec::Support::Helpers::Features::RowsHelpers + include Spec::Support::Helpers::Features::ListRowsHelpers let!(:user) do create(:omniauth_user, provider: 'twitter', extern_uid: '123456') @@ -39,7 +39,7 @@ describe "Admin::Users" do create(:user, name: 'Dmitriy') end - it 'search users by name' do + it 'searches users by name' do visit admin_users_path(search_query: 'Foo') expect(page).to have_content('Foo Bar') @@ -65,6 +65,16 @@ describe "Admin::Users" do expect(first_row.text).to include('Foo Bar') expect(second_row.text).to include('Foo Baz') end + + it 'searches with respect of sorting' do + visit admin_users_path(sort: 'Name') + + fill_in :search_query, with: 'Foo' + click_button('Search users') + + expect(first_row.text).to include('Foo Bar') + expect(second_row.text).to include('Foo Baz') + end end describe 'Two-factor Authentication filters' do |