Skip to content

Commit

Permalink
Update user create
Browse files Browse the repository at this point in the history
  • Loading branch information
blacksmith-welder committed Sep 7, 2024
1 parent 7d134ca commit 0583467
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
11 changes: 6 additions & 5 deletions staff-features/users/user_create.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ Feature: Create User
Background:
Given the user is logged in as an administrator
Scenario: User is created
Given the user is on the Manage Users page
When the user clicks on 'Create User'
When the user clicks on 'System'
And the user clicks on 'Manage Users'
And the user clicks on 'Create User'
And the user fills in the Username
And the user fills in the Full name
And the user fills in the Password
And the user fills in the Confirm password
And the user clicks on 'Create Account'
Then the 'User Created' message is displayed
And the new user should appear in the search results
Scenario: User is not created because required fields are missing
Given the user is on the Manage Users page
When the user clicks on 'Create User'
When the user clicks on 'System'
And the user clicks on 'Manage Users'
And the user clicks on 'Create User'
And the user clicks on 'Create Account'
Then the following error messages are displayed:
| Username - can't be empty |
Expand Down
9 changes: 0 additions & 9 deletions staff-features/users/user_create.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# frozen_string_literal: true

Given 'the user is on the Manage Users page' do
click_on 'System'
click_on 'Manage Users'
end

When 'the user fills in the Username' do
@uuid = SecureRandom.uuid

Expand All @@ -22,7 +17,3 @@
When 'the user fills in the Confirm password' do
fill_in 'Confirm password', with: "password #{@uuid}"
end

And 'the new user should appear in the search results' do
expect_record_to_be_in_search_results(@uuid)
end

0 comments on commit 0583467

Please sign in to comment.