Contents

Create model with packages

Background:

  • Given I am Mike
  • And I open the inventory

Scenario: Create model with package assignments

@javascript @browser @personas

  • When I add a new Model
  • And I fill in at least the required fields
  • And I add one or more packages
  • And I add one or more items to this package
  • And I save both package and model
  • Then the model is created and the packages and their assigned items are saved
  • And the packages have their own inventory codes

Scenario: A model that already has items cannot be turned into a package

@javascript @browser @personas

  • When I edit a model that already has items
  • Then I cannot assign packages to that model

Scenario: Can't create package without items

@javascript @browser @personas

  • When I add a package to a model
  • Then I can only save this package if I also assign items

Scenario: Remove single item from a package

@javascript @browser @personas @problematic

  • When I edit a package
  • Then I can remove items from the package
  • And those items are no longer assigned to the package

Scenario: Entering package information for an existing model

@javascript @browser @personas

  • When I edit a model that already has packages
  • And I edit an existing Package
  • And I enter the following item information
    fieldtypevalue
    Working orderradioOK
    CompletenessradioOK
    BorrowableradioOK
    Relevant for inventoryselectYes
    Responsible departmentautocompleteA-Ausleihe
    Responsible personMatus Kmit
    User/Typical usageTest Verwendung
    NameTest Name
    NoteTest Notiz
    BuildingautocompleteNone
    RoomTest Raum
    ShelfTest Gestell
    Initial Price50.00
    Last Checked01/01/2013
  • And I save both package and model
  • Then the package has all the entered information

Scenario: Creating a model with package assignment and then editing it

@javascript @browser @personas

  • When I add a new Model
  • And I fill in at least the required fields
  • And I add a package
  • And I enter the package properties
  • And I add one or more items to this package
  • And I save this package
  • And I edit an existing Package
  • Then I enter the package properties
  • And I add one or more items to this package

Scenario: Entering package properties for newly created models

@javascript @browser @personas @problematic

  • When I add a package to a model
  • And I add one or more items to this package
  • And I enter the following item information
    fieldtypevalue
    Working orderradioOK
    CompletenessradioOK
    BorrowableradioOK
    Relevant for inventoryselectYes
    Responsible departmentautocompleteA-Ausleihe
    Responsible personMatus Kmit
    User/Typical usageTest Verwendung
    NameTest Name
    NoteTest Notiz
    BuildingautocompleteNone
    RoomTest Raum
    ShelfTest Gestell
    Initial Price50.00
    Last Checked01/01/2013
  • And I save both package and model
  • Then I see the notice "Model saved / Packages created"
  • And the package has all the entered information
  • And all the packaged items receive these same values store to this package
    field
    Responsible department
    Responsible person
    Building
    Room
    Shelf
    Check-in Date
    Last Checked

Scenario: Delete an item package that was never handed over

@javascript @personas @browser @problematic

  • Given a never handed over item package is currently in stock
  • When edit the related model package
  • When I delete that item package
  • Then the item package has been deleted
  • And the packaged items are not part of that item package anymore
  • When edit the related model package
  • Then that item package is not listed

Scenario: Delete an item package related to a closed contract

@javascript @personas @problematic

  • Given a once handed over item package is currently in stock
  • When edit the related model package
  • When I delete that item package
  • Then the item package has been retired
  • And the packaged items are not part of that item package anymore
  • When edit the related model package
  • Then that item package is not listed

Scenario: Can't delete a package if it's currently not in stock

@personas

  • When the package is currently not in stock
  • Then I can't delete the package

Scenario: A model shows only packages owned by me

@personas @javascript @browser

  • When I edit a model that already has packages in mine and other inventory pools
  • Then I only see packages which I am responsible for

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