This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/horenso/758-conflict-on-new-map-wi…
…th-taken-name
- Loading branch information
Showing
12 changed files
with
238 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Meeting 15.04.2024 | ||
|
||
## Attendees | ||
|
||
- Markus | ||
- Yvonne | ||
- Christoph | ||
- Moritz | ||
- Lukas | ||
- Daniel | ||
- Jannis | ||
|
||
Not here: | ||
|
||
- Filip | ||
|
||
Sick: | ||
|
||
- Andrei (Scrum Master) | ||
|
||
## Buddies | ||
|
||
- Daniel & Andrei | ||
- Moritz & Christoph | ||
- Jannis & Lukas | ||
|
||
## Agenda | ||
|
||
- 09:00 start | ||
- protocol: Daniel | ||
- release v0.4.0 done | ||
- GitLab Tuwien migration | ||
- https://github.com/supabase/index_advisor | ||
- scrum with Andrei: | ||
- issues | ||
- reviews -> later | ||
- (manual) e2e tests -> later Christoph+Filip | ||
- create issues: | ||
- rework notification system (Jannis+Andrei) | ||
- Jannis: raw SQL | ||
- [sprint plan](https://project.permaplant.net) | ||
|
||
## Tasks for Everyone | ||
|
||
To be done until **Friday 19.04.2024**: | ||
|
||
- create or update TISS.txt in submissions repo | ||
- buddy talk: scoping with mistakes | ||
- approve [meeting PR](https://pull.permaplant.net/1284/files) | ||
- request and approve for requested reviews [requested reviews](https://pulls.permaplant.net/?q=is%3Aopen+user-review-requested%3A%40me) | ||
- do/update [sprint plan](https://project.permaplant.net) | ||
|
||
## Individual Tasks | ||
|
||
To be done until **Friday 19.04.2024**: | ||
|
||
- Daniel: finish timeline, drawing | ||
- Filip: GitLab migration | ||
- Jannis: creation times, create issues: (1) tutorial for layer creation (creation/update metadata + (2) what interface should any layer have), (3) notification profilen (4) drawing layer db design, (5) unify layer design | ||
- Christoph: SQL heatmap benchmark, hierarchy PR | ||
- Lukas: documenting how to create+test layers, create issues: investigate performance (profile) | ||
- Moritz: heatmap rebase, meeting refactoring, issues restructure, write if all stale branches can be removed | ||
- Andrei: create issues | ||
|
||
## Meeting Notes | ||
|
||
- great job with release, please rebase your PRs | ||
- christoph asked if properties should be able to get overwritten in child ranks of plants -> will be discussed in separate meeting. Christoph and Lukas should attend. | ||
- automatic hierarchy based on unique name | ||
- usually no new properties or plants (apart from adding to CSV) | ||
- drawing layer PR will be created so that handling can be tested | ||
- groupfolder for nextcloud images has to be implemented, so that images on one map can be shared between different users | ||
- we shouldn't have to many different tasks in progress but always enough issues created to always have enough for next sprints |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
frontend/src/features/map_planning/layers/plant/hooks/relationsHookApi.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { renderHook, screen, waitFor } from '@testing-library/react'; | ||
import { expect } from 'vitest'; | ||
import { mockServerErrorOnce } from '@/__test_utils__/msw'; | ||
import '@/__test_utils__/setup'; | ||
import '@/__test_utils__/setupSessionStorageAuth'; | ||
import { createQueryHookWrapper } from '@/__test_utils__/utils'; | ||
import { RelationType } from '@/api_types/definitions'; | ||
import { useRelations } from '@/features/map_planning/layers/plant/hooks/relationsHookApi'; | ||
|
||
describe('useRelations', () => { | ||
const renderUseRelations = () => | ||
renderHook( | ||
() => | ||
useRelations({ | ||
mapId: 1, | ||
plantId: 1, | ||
enabled: true, | ||
}), | ||
{ | ||
wrapper: createQueryHookWrapper(), | ||
}, | ||
); | ||
|
||
it('should return the two relations for the plant', async () => { | ||
const { result } = renderUseRelations(); | ||
|
||
await waitFor(() => expect(result.current.isSuccess).toBe(true)); | ||
expect(result.current.data).toBeDefined(); | ||
expect(result.current.data?.has(1)); | ||
expect(result.current.data?.has(2)); | ||
expect(result.current.data?.get(1)?.id == 1); | ||
expect(result.current.data?.get(1)?.relation == RelationType.Neutral); | ||
expect(result.current.data?.get(2)?.relation == RelationType.Antagonist); | ||
}); | ||
|
||
it('should cause a toast to appear on failing hook', async () => { | ||
mockServerErrorOnce(); | ||
const { result } = renderUseRelations(); | ||
|
||
await waitFor(() => expect(result.current.isError).toBe(true)); | ||
expect(result.current.error).toBeDefined(); | ||
await screen.findByRole('alert'); | ||
}); | ||
}); |
Oops, something went wrong.