Skip to content
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

test: fix missing await on assertions for resolveInitialValue() #8080

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

rexxars
Copy link
Member

@rexxars rexxars commented Dec 16, 2024

Description

Promise-based tests should be awaited - vitest complained about some tests not doing this. This PR fixes that

What to review

Tests pass

Testing

Tests are already in place, just needed to be async/awaited

Notes for release

None

@rexxars rexxars requested a review from a team as a code owner December 16, 2024 21:37
@rexxars rexxars requested review from ryanbonial and removed request for a team December 16, 2024 21:37
Copy link

vercel bot commented Dec 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 10:08pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 10:08pm
test-next-studio 🛑 Canceled (Inspect) Dec 16, 2024 10:08pm
test-studio 🛑 Canceled (Inspect) Dec 16, 2024 10:08pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Dec 16, 2024 10:08pm

@rexxars rexxars force-pushed the test/await-resolve-tests branch from 44f7827 to 6c1a06c Compare December 16, 2024 21:39
@rexxars rexxars force-pushed the test/await-resolve-tests branch from 6c1a06c to 1a2f4ed Compare December 16, 2024 21:40
@rexxars rexxars requested review from a team and bjoerge December 16, 2024 21:41
Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Dec 16, 2024

⚡️ Editor Performance Report

Updated Mon, 16 Dec 2024 22:08:36 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 24.4 efps (41ms) 22.2 efps (45ms) +4ms (+9.8%)
article (body) 67.6 efps (15ms) 63.3 efps (16ms) +1ms (-/-%)
article (string inside object) 25.6 efps (39ms) 23.3 efps (43ms) +4ms (+10.3%)
article (string inside array) 23.8 efps (42ms) 21.1 efps (48ms) +6ms (+13.1%)
recipe (name) 47.6 efps (21ms) 48.8 efps (21ms) -1ms (-2.4%)
recipe (description) 55.6 efps (18ms) 55.6 efps (18ms) +0ms (-/-%)
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (6ms) +0ms (-/-%)
synthetic (title) 19.4 efps (52ms) 19.2 efps (52ms) +1ms (+1.0%)
synthetic (string inside object) 18.9 efps (53ms) 20.0 efps (50ms) -3ms (-5.7%)

efps — editor "frames per second". The number of updates assumed to be possible within a second.

Derived from input latency. efps = 1000 / input_latency

Detailed information

🏠 Reference result

The performance result of sanity@latest

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 41ms 59ms 79ms 399ms 850ms 10.8s
article (body) 15ms 17ms 21ms 79ms 39ms 5.3s
article (string inside object) 39ms 42ms 49ms 164ms 401ms 7.3s
article (string inside array) 42ms 43ms 45ms 51ms 8ms 6.5s
recipe (name) 21ms 23ms 24ms 36ms 0ms 8.3s
recipe (description) 18ms 20ms 21ms 23ms 0ms 4.5s
recipe (instructions) 6ms 8ms 8ms 26ms 0ms 3.1s
synthetic (title) 52ms 53ms 56ms 290ms 469ms 12.6s
synthetic (string inside object) 53ms 54ms 57ms 154ms 228ms 7.5s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 45ms 48ms 57ms 121ms 55ms 12.6s
article (body) 16ms 18ms 22ms 39ms 73ms 5.2s
article (string inside object) 43ms 48ms 51ms 161ms 135ms 6.9s
article (string inside array) 48ms 48ms 51ms 62ms 5ms 7.1s
recipe (name) 21ms 22ms 23ms 33ms 0ms 7.8s
recipe (description) 18ms 20ms 21ms 23ms 0ms 4.6s
recipe (instructions) 6ms 8ms 8ms 9ms 0ms 3.2s
synthetic (title) 52ms 53ms 56ms 313ms 540ms 13.2s
synthetic (string inside object) 50ms 55ms 56ms 415ms 775ms 7.9s

📚 Glossary

column definitions

  • benchmark — the name of the test, e.g. "article", followed by the label of the field being measured, e.g. "(title)".
  • latency — the time between when a key was pressed and when it was rendered. derived from a set of samples. the median (p50) is shown to show the most common latency.
  • p75 — the 75th percentile of the input latency in the test run. 75% of the sampled inputs in this benchmark were processed faster than this value. this provides insight into the upper range of typical performance.
  • p90 — the 90th percentile of the input latency in the test run. 90% of the sampled inputs were faster than this. this metric helps identify slower interactions that occurred less frequently during the benchmark.
  • p99 — the 99th percentile of the input latency in the test run. only 1% of sampled inputs were slower than this. this represents the worst-case scenarios encountered during the benchmark, useful for identifying potential performance outliers.
  • blocking time — the total time during which the main thread was blocked, preventing user input and UI updates. this metric helps identify performance bottlenecks that may cause the interface to feel unresponsive.
  • test duration — how long the test run took to complete.

Copy link
Contributor

github-actions bot commented Dec 16, 2024

Component Testing Report Updated Dec 16, 2024 10:11 PM (UTC)

❌ Failed Tests (2) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 12s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 14s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 41s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 57s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 29s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 16s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ❌ Failed (Inspect) 1m 9s 5 0 1
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 14s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 2m 54s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 49s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 14s 3 9 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 29s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ❌ Failed (Inspect) 2m 33s 20 0 1
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

Copy link
Member

@bjoerge bjoerge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

@rexxars rexxars added this pull request to the merge queue Dec 17, 2024
Merged via the queue into next with commit f56c61f Dec 17, 2024
58 checks passed
@rexxars rexxars deleted the test/await-resolve-tests branch December 17, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants