Contents

Copy item

Background:

  • Given I am Mike

Scenario: Create and copy items

@javascript @personas

  • Given I create an item
  • And I choose "Investment"
  • And I make a note of the original inventory code
  • And I enter the following item information
    fieldtypevalue
    BorrowableradioOK
    BuildingautocompleteNone
    Check-In Date01/01/2013
    Check-In NoteTest note
    Check-In Stateselecttransportschaden
    CompletenessradioOK
    Contract expiration01/01/2013
    IMEI-NumberTest IMEI number
    Initial Price50.00
    Invoice Date01/01/2013
    Invoice NumberTest number
    Last Checked01/01/2013
    MAC-AddressTest MAC address
    ModelautocompleteSharp Beamer 456
    Moveselectsofort entsorgen
    NameTest name
    NoteTest note
    Project NumberTest number
    Relevant for inventoryselectYes
    Responsible departmentautocompleteA-Ausleihe
    Responsible personMatus Kmit
    Retirementcheckboxunchecked
    RoomTest room
    Serial NumberTest serial number
    ShelfTest shelf
    Supply CategoryselectWorkshop Technology
    Target areaTest room
    User/Typical usageTest use
    Warranty expiration01/01/2013
    Working orderradioOK
  • When I save and copy
  • Then the item is saved
  • And I can create a new item
  • And I can cancel
  • And all fields except the following were copied:
    Inventory Code
    Name
    Serial Number
  • And the inventory code is already filled in
  • When I save
  • Then the copied item is saved
  • And I am redirected to the inventory list

Scenario: Copying an item selected from a list

@javascript @personas

  • Given I open the inventory
  • When I copy an item
  • Then an item copy screen is shown
  • And all fields except inventory code, serial number and name are copied

Scenario: Copying an item from the edit view

@javascript @personas

  • When I am editing an item
  • And I save and copy
  • Then an item copy screen is shown
  • And all fields except inventory code, serial number and name are copied

Scenario: Copying an item from another inventory pool

@javascript @personas

  • Given I go to logout
  • And I am Matti
  • And I edit an item belonging to a different inventory pool
  • And I save and copy
  • Then an item copy screen is shown
  • And all fields are editable, because the current inventory pool owns this new item

Scenario: Creating a new supplier while copying an item

@javascript @browser @personas @problematic

  • Given I copy an item
  • Then an item copy screen is shown
  • When I enter a supplier that does not exist
  • And I make a note of the inventory code for further steps
  • And I save
  • Then a new supplier is created
  • And the copied item has the new supplier

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