Application Administration Screen Acceptance Criteria - SwitchitFF/Switchit GitHub Wiki
Feature: Application Administration Screen
Application Administration will allow an authorized user to manage details about a Switchit-managed application. These details include:
1. The name of the application
2. A list of Switchit application administrators
3. An optional description of the application
4. A list of flags that belong to the application
Scenario: Add New Application
Given the application Admin Screen is opened with no ApplicationId
Then A blank field for name of the application is displayed
And a blank field for the application description
And the Application Owners listbox is displayed with no members
And the 'Add' Application Owners button is displayed
And the 'Add' Application Owners button is disabled
And the Switches listbox is displayed with no members
And the 'Add' Switches button is displayed
And the 'Add' Switches button is disabled
And the form 'Save' button is displayed
Scenario: The form is initially opened for Add
Given The user has opened the form to add a new application and has not typed in any information
Then The Save button is disabled
And the Reset button is disabled
Scenario: Successful addition of a new application to Switchit with minimum information provided
Given A user has elected to add a new application to Switchit
And the application name does not already exist in Switchit
When the user has filled in the name of the application
And the user has filled in the application description
And the user has clicked the Save button
Then the application is added to the data store
And the application name is set to the name in the application name field
And the description set to the text in the application description field
And the user adding the application is added to the data store as an administrator of the application
And the screen is refreshed to display the user in the list of administrators
And a blank list of switches is displayed
Scenario: Successful add of a new application to Switchit with all information provided
Given A user has elected to add a new application to Switchit
And the application name does not already exist in Switchit
When the user has filled in the name of the application
And the user has clicked the Save button
Then the application is added to the data store
And the application name is set to the name in the application name field
And the description set to null
And the user adding the application is added to the data store as an administrator of the application
And the screen is refreshed to display the user in the list of administrators
And a blank list of switches is displayed
Scenario: Failed add of a new application to Switchit Due to Already Existing Application Name
Given A user has elected to add a new application to Switchit
And the application name already exists in Switchit
Then the user is shown an error message "The application '<application name>' already exists."
Scenario: Failed add of a new application to Switchit Due to a Missing Application Name
Given A user has elected to add a new application to Switchit
And the user has clicked the Save button
But the Application Name field is empty
Then the user is shown an error message "An application cannot be added to Switchit without an application name."
And the focus should return to the Application Name field
Scenario: Failed add of a new application to Switchit Due to Connectivity Issue
Given A user has elected to add a new application to Switchit
And the application cannot connect to the backing data store
Then the user is shown an error message "Switchit could not talk to the database. The application '<application name>' was not saved."
Scenario: Edit Existing Application
Given the application Admin Screen is opened with an existing ApplicationId
Then the name of the application is displayed in an editable text field
And the application description is displayed in an editable text field
And the Application Owners listbox is displayed with all existing members
And the 'Add' Application Owners button is displayed
And the 'Add' Application Owners button is enabled
And the Switches listbox is displayed with any existing members
And the 'Add' Switches button is displayed
And the 'Add' Switches button is enabled
And the form 'Save' button is displayed
Scenario: Edit Existing Application with an invalid ApplicationId
Given the application Admin Screen is opened with an existing ApplicationId
And the application ID is not found in the database
Then the user is shown an error message "Switchit could not find the application with ID '<application ID>'."
Scenario: The user acknowledges a 'Not Found' message
Given the user has been presented with an application not found message
And the message had been acknowledged
Then the user is redirected to the application list page
Scenario: Application is saved in Edit Mode with minimum information
Given the 'Save' button is clicked
And only Application Name is populated
Then the application is updated in the data store
And the application name is set to the name in the application name field
And the screen is refreshed to display the user in the list of administrators
Scenario: The form is initially opened for Edit
Given The user has opened the form to edit an application and has not typed in any information
Then The Save button is disabled
And the Reset button is disabled
Scenario: Failed update of a new application to Switchit Due to Connectivity Issue
Given A user has elected to edit an existing application
And the application cannot connect to the backing data store
Then the user is shown an error message "Switchit could not talk to the database. The application '<application name>' was not saved."
Scenario: The Administrators List has more than 1 member
Given the Administrators list has more than 1 member
Then the 'Remove' button is enabled
Scenario: The Administrators List is Not Empty
Given the Administrators list has 1 member
Then the 'Remove' button is not displayed
Scenario: The Switches List is Empty
Given the Switches list has 0 members
Then the 'Remove' button is not displayed
Scenario: The Switches List is Not Empty
Given the Switches list has at least 1 member
Then the 'Remove' button is enabled
Scenario: The 'Reset' button has been clicked before the application has been saved
Given that the state of the form is 'DIRTY'
And the application has not been saved by clicking the 'Save' button
Then a Reset Confirmation message is displayed
Scenario: A Reset Confirmation Message is acknowledged for a new record
Given The user has clicked the message acknowledgement button on a messagebox
And the message was triggered by a 'Reset' button
And the record is in a state 'NEW'
Then All text boxes are cleared of information
And the messagebox is closed.
Scenario: A Reset Confirmation Message is acknowledged for an existing record
Given The user has clicked the message acknowledgement button on a messagebox
And the message was triggered by a 'Reset' button
And the record is in a state 'EDIT'
Then All text boxes are reset to their initial state
And the messagebox is closed.
Scenario: A Reset Confirmation Message is denied
Given The user has clicked the message Cancel button on a messagebox
And the message was triggered by a 'Reset' button
Then the messagebox is closed.
'''