Uploaded image for project: 'mod-circulation'
  1. mod-circulation
  2. CIRC-532

[SPIKE/FEATURE]: Refactor tests to be less dependent on the item effectiveLocationId logic

    XMLWordPrintable

Details

    • Story
    • Status: Closed (View Workflow)
    • TBD
    • Resolution: Won't Do
    • None
    • None
    • Prokopovych

    Description

      The purpose of the ticket is to make mod-circulation API tests to be less dependent on the item effectiveLocationId derived property.

      This property is calculated as the first not null value from the list:

      • item.temporaryLocationId
      • item.permanentLocationId
      • holdingsRecord.temporaryLocationId
      • holdingsRecord.temporaryLocationId

      There is a pre-processor api.support.fakes.FakeOkapi#setEffectiveLocationIdForItem that actually implements the logic. But we want to decrease coupling with the storage module and set effectiveLocationId = firstNotNull(item.temporaryLocationId, item.permanentLocationId) (i.e. in the same way how we do it in the mod-inventory) without fetching the holdingsRecord.

      The initial idea was to set permanentLocationId for all the item examples. But this seems challenging because ItemExamples uses statics but locationsFixture is a non-static class.

      We can proceed with this approach or develop a new one.

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                bohdan-suprun Bohdan Suprun
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases