Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container Profile create #103

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions staff_features/container_profiles/container_profile_create.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Feature: Container Profile Create
Background:
Given an administrator user is logged in
Scenario: Open new container profile page from Create in the main toolbar
When the user clicks on 'Create'
And the user clicks on 'Container Profile' in the dropdown menu
Then the New Container Profile page is displayed
Scenario: Open new container profile page from Manage Container Profile
When the user clicks on 'System'
And the user clicks on 'Manage Container Profiles' in the dropdown menu
And the user clicks on 'Create Container Profile'
Then the New Container Profile page is displayed
Scenario: Open new container profile page from Browse in the main toolbar
When the user clicks on 'Browse'
And the user clicks on 'Container Profiles' in the dropdown menu
And the user clicks on 'Create Container Profile'
Then the New Container Profile page is displayed
Scenario: Container Profile is created
When the user clicks on 'Create'
And the user clicks on 'Container Profile' in the dropdown menu
And the user fills in 'Name'
And the user fills in 'Depth' with '1.1'
And the user fills in 'Height' with '2.2'
And the user fills in 'Width' with '3.3'
And the user clicks on 'Save'
Then the 'Container Profile' created message is displayed
And the Container Profile is created
Scenario: Container Proofile is not created because required fields are missing
When the user clicks on 'Create'
And the user clicks on 'Container Profile' in the dropdown menu
And the user clicks on 'Save'
Then the following error messages are displayed
| Name - Property is required but was missing |
| Height - Property is required but was missing |
| Width - Property is required but was missing |
| Depth - Property is required but was missing |
Scenario: Container Profile is not created because Depth is alphanumeric
When the user clicks on 'Create'
And the user clicks on 'Container Profile' in the dropdown menu
And the user fills in 'Name'
And the user fills in 'Depth' with 'abc'
And the user fills in 'Height' with '2.2'
And the user fills in 'Width' with '3.3'
And the user clicks on 'Save'
Then the following error message is displayed
| Depth - Must be a number with no more than 2 decimal places |
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

Then 'the New Container Profile page is displayed' do
expect(current_url).to eq "#{STAFF_URL}/container_profiles/new"
expect(find('h2').text).to eq 'New Container Profile Container Profile'
end

Then 'the Container Profile is created' do
@container_profile_id = current_url.split('/').pop

visit "#{STAFF_URL}/container_profiles/#{@container_profile_id}/edit"

expect(find('#container_profile_name_').value).to eq @uuid
end
Loading