Welcome to mirror list, hosted at ThFree Co, Russian Federation.

users.rb « admin « steps « features - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 659008dd875a0e9f126dd7f14a5cc7a2e5c02343 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
class AdminUsers < Spinach::FeatureSteps
  include SharedAuthentication
  include SharedPaths
  include SharedAdmin

  Then 'I should see all users' do
    User.all.each do |user|
      page.should have_content user.name
    end
  end

  And 'Click edit' do
    @user = User.first
    find("#edit_user_#{@user.id}").click
  end

  And 'Input non ascii char in username' do
    fill_in 'user_username', with: "\u3042\u3044"
  end

  And 'Click save' do
    click_button("Save")
  end

  Then 'See username error message' do
    within "#error_explanation" do
      page.should have_content "Username"
    end
  end

  And 'Not changed form action url' do
    page.should have_selector %(form[action="/admin/users/#{@user.username}"])
  end

  step 'I submit modified user' do
    check :user_can_create_group
    click_button 'Save'
  end

  step 'I see user attributes changed' do
    page.should have_content 'Can create groups: Yes'
  end

  step 'click edit on my user' do
    find("#edit_user_#{current_user.id}").click
  end
end