Energinet-DataHub / ARCHIVED-geh-charges

Apache License 2.0
7 stars 3 forks source link

Deliver charge links data from data storage to Frontend (replacing mock data) #827

Closed prtandrup closed 2 years ago

prtandrup commented 3 years ago

Synopsis: In story #792 we enabled the backend to serve mocked charge links data for a single metering point to the frontend (through the BFF). With this story we'll replace the mocked data with actual charge links data from our data storage.

Tech notes: Actual charge links (minus historical/inactive) for a metering point is delivered to frontend Does not require CQRS Yes it does unless we want more future refactoring work.

Acceptance criteria

- [ ] Charge Links are also delivered for Child MPs Not possible to test until Special MPs are persisted in Charges database. Not intended to be blocking this story.

Task list

lasrinnil commented 2 years ago

After researching at what cost and the surrounding issues with being able to unittest our QueryDBContext / IQuerable. At the moment we have decided this is not the time, perhaps in the future if MS moves EFCore in a direction that makes more sense to unittest.

prtandrup commented 2 years ago

As we cannot test the AC regarding 'displaying charge links in front end for Child MPs (special MPs)' because it requires #936 to be completed, I've decided to remove it here and add it to #936.

prtandrup commented 2 years ago

For the tester.. Please reach out to me for details on how to test this, e.g. frontend URL, creating a frontend user, etc.

prtandrup commented 2 years ago

Currently blocked, as an issue stops us from linking a charge to a metering point. U-001

prtandrup commented 2 years ago

Blocked tag removed; its now possible to link a charge to a newly created consumption mp

PerTHenriksen commented 2 years ago

Test runbook (and demo agenda) Part 1 of 2

Opret bruger til U-001 frontenden:

Opret bruger (spørg teamet for link) Frontend url (spørg teamet for link)

Opret forbrugsmålepunkt

1) I Postman, skift til metering point workspaces 2) Kontroller at du sender til på "Dev-001" 3) I folderen 'CreateMP' brug requesten 'CreateSingleConsumptionMP' til at oprette et nyt forbrugsmålepunkt 4) Brug Peek og Dequeue i 'PeekDequeue' folderen indtil du får en Confirm på målepunktsoprettelse (hvilket trigger default charge links flowet (besked til målepunktsoprettelse i næste opslag)

AC1: Fremsøg målepunkt i frontenden og kontroller at du får følgende default charge links vist, under Priser tab'en:

40000 41000 45013 EA-001

AC2: Tilføj et ny charge link til det nyoprettede målepunkt

Brug charge id: EA-003, type: D03, dato: 2022-02-28T23:00:00Z, ejer: 5790000432752 Husk at tilføje dit nye målepunkt til beskeden (Peek/dequeue optional)

Og fremsøg målepunktet igen i frontenden, hvor du gerne skulle se det nye link.

PerTHenriksen commented 2 years ago

Test runbook (and demo agenda) part 2 of 2 Below is an adjusted message for creation of a new consumption metering point, as the template in postman is shared for editing:

253698245 E58 E02 23 8200000001409 DDM DHGLN DDZ 2021-06-17T09:30:47Z {{transactionId}} String 2021-09-25T22:00:00Z {{gsrn}} E17 E02 D02 D03 PT1H 6 --12-01 870 575774240560385464 6000 D02 D01 D12 false 230 32 8716867000030 0 KWH String 0a3f50b9-b942-32b8-e044-0003ba298018 0405 Vestergade 10 1 12 0625 Middelfart Strib DK 5500 true
PerTHenriksen commented 2 years ago

Storied tested succesfully: image.png