Contents

Create item

Scenario: Order of the fields when creating an item

@javascript @personas

  • Given I am Matti
  • And I create an item
  • And I select "Yes" from "item[retired]"
  • And I choose "Investment" as reference
  • Then I see form fields in the following order:
    field
    Inventory Code
    Model
    - Status -
    Retirement
    Reason for Retirement
    Working order
    Completeness
    Borrowable
    Status note
    - Inventory -
    Relevant for inventory
    Supply Category
    Owner
    Last Checked
    Responsible department
    Responsible person
    User/Typical usage
    - Move -
    Move
    Target area
    - Toni Ankunftskontrolle -
    Check-In Date
    Check-In State
    Check-In Note
    - General Information -
    Serial Number
    MAC-Address
    IMEI-Number
    Name
    Note
    Attachments
    - Location -
    Building
    Room
    Shelf
    - Invoice Information -
    Reference
    Project Number
    Invoice Number
    Invoice Date
    Initial Price
    Supplier
    Warranty expiration
    Contract expiration

Scenario: Forgetting to fill out the required fields when creating an item

@javascript @personas

  • Given I am Matti
  • And I create an item
  • And I choose "Investment" as reference
  • And these required fields are blank:
    Model
    Inventory Code
    Project Number
    Supply Category
  • Then the model cannot be created
  • And I see an error message

Scenario Outline: Forgetting to fill out just one required field when creating an item

@javascript @personas

  • Given I am Matti
  • And I create an item
  • And I choose "Investment" as reference
  • And these required fields are filled in:
    Model
    Inventory Code
    Project Number
    Supply Category
  • When I leave the field "<required_field>" empty
  • Then the model cannot be created
  • And I see an error message
  • And the other fields still contain their data

Examples:

required_field
Model
Inventory Code
Project Number
Supply Category

Scenario: Areas where you can create an item

@javascript @personas

  • Given I am Matti
  • And I open the inventory
  • Then I can create an item

Scenario: Creating a new supplier if it does not already exist

@javascript @personas

  • Given I am Mike
  • And I create an item
  • And I choose "Investment" as reference
  • And these required fields are filled in:
    Model
    Inventory Code
    Project Number
    Supply Category
  • When I enter a supplier that does not exist
  • And I save
  • Then a new supplier is created
  • And the created item has the new supplier

Scenario: Creating an item with all its information

@javascript @personas

  • Given I am Matti
  • And I create an item
  • And I enter the following item information
    fieldtypevalue
    Inventory CodeTest Inventory Code
    ModelautocompleteSharp Beamer 456
    Relevant for inventoryselectYes
    Supply CategoryselectWorkshop Technology
    Moveselectsofort entsorgen
    Target areaTest room
    Check-In Date01/01/2013
    Check-In Stateselecttransportschaden
    Check-In NoteTest note
    Serial NumberTest serial number
    MAC-AddressTest MAC address
    IMEI-NumberTest IMEI number
    NameTest name
    NoteTest note
    BuildingautocompleteNone
    RoomTest room
    ShelfTest shelf
    Referenceradio mustInvestment
    Project NumberTest number
    Invoice NumberTest number
    Invoice Date01/01/2013
    Initial Price50.00
    Warranty expiration01/01/2013
    Contract expiration01/01/2013
    Last Checked01/01/2013
    Responsible departmentautocompleteA-Ausleihe
    Responsible personMatus Kmit
    User/Typical usageTest use
  • And I save
  • Then I am redirected to the inventory list
  • And the item is saved with all the entered information

Scenario: Fields that are already filled in

@javascript @personas

  • Given I am Matti
  • And I create an item
  • Then the barcode is already filled in
  • And The date this item was last checked is today's date
  • And the following fields have their default values
    fieldtypevalue
    BorrowableradioUnborrowable
    Relevant for inventoryselectYes
    Working orderradioOK
    CompletenessradioOK
    Supply Categoryselect

Scenario: Specifying values for supply category

@javascript @personas

  • Given I am Matti
  • And I create an item
  • Then the field 'Supply Category' offers the following choices
    Workshop Technology
    Production Technology
    AV Technology
    Musical Instrument
    Facility Management
    IT/Software
    Durch Kunde beschafft

Scenario: Add and remove attachments (attachments field is writable)

@javascript @personas @browser

  • Given I am Matti
  • When I create an item
  • And these required fields are filled in:
    Model
    Inventory Code
    Project Number
    Supply Category
  • And I add 2 attachments
  • And I remove one attachment
  • And I save
  • Then I am redirected to the inventory list
  • And 1 attachment is saved

Source: features/manage/inventory/create_item.feature at commit eb240d9e, Leihs (GPL license).