-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate benchmark assignment modal from trpc #489
base: main
Are you sure you want to change the base?
Conversation
We refactored BenchmarkAssignmentModal to separate out the para selection step. This will allow for more modular frontend unit testing.
@@ -12,6 +12,7 @@ | |||
"type-css:check": "npx tcm src --listDifferent", | |||
"test": "next build --no-lint && ava", | |||
"test-storybook": "test-storybook --maxWorkers=2", | |||
"docker-reup": "docker compose -f supporting_services/docker-compose.yml up -d", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to add this script!
@@ -94,7 +94,7 @@ test("basic flow - add/get goals, benchmarks, tasks", async (t) => { | |||
const gotBenchmark = await trpc.iep.getBenchmark.query({ | |||
benchmark_id: benchmark2Id, | |||
}); | |||
t.is(gotBenchmark[0].description, "benchmark 2"); | |||
t.is(gotBenchmark.description, "benchmark 2"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
@@ -133,55 +69,26 @@ export const BenchmarkAssignmentModal = ( | |||
<DialogContent> | |||
<Box className={$benchmark.benchmarkDescriptionBox}> | |||
<p className={$benchmark.benchmarkTitle}>Benchmark</p> | |||
{benchmark?.map((thisBenchmark) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for separating this out!
Tease apart assignment modal UI from trpc request