Closed prtandrup closed 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.
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.
For the tester.. Please reach out to me for details on how to test this, e.g. frontend URL, creating a frontend user, etc.
Currently blocked, as an issue stops us from linking a charge to a metering point. U-001
Blocked tag removed; its now possible to link a charge to a newly created consumption mp
Test runbook (and demo agenda) Part 1 of 2
Opret bruger (spørg teamet for link) Frontend url (spørg teamet for link)
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)
40000 41000 45013 EA-001
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.
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:
Storied tested succesfully:
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 CQRSYes it does unless we want more future refactoring work.Acceptance criteria
[ ] Given a new Consumption metering point is created and default charges have been linked to it When looking at the metering point in the front end Then the "Priser" tab shows displays the default charge links.
[ ] Given a consumption metering point exist When the System Operator creates a new charge link to one of its' charges Then afterwards the new charge link will be visible in the front end.
- [ ] Charge Links are also delivered for Child MPsNot possible to test until Special MPs are persisted in Charges database. Not intended to be blocking this story.Task list
[x] Deliver actual charge link data from storage via new query stack [PR]
[x] Add ChargeLinksController integration tests
- [ ] Update EF Core to 6.0 in the Charges Web API project- [ ] Add ChargeLinksController unit tests[x] Wire Charges Web API up with Application Insights [PR]
[x] Consider using
--no-onconfiguring
in scaffold script to avoid creating OnConfiguring in QueryDbContext, link[x] Remember to remove useNodaTime
[x] Handle enddates set to max. Last three bullets are located in this [PR].