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(e2e): add unarchive / unpublish tests to releases #8979

Merged
merged 11 commits into from
Mar 21, 2025

Conversation

RitaDias
Copy link
Contributor

@RitaDias RitaDias commented Mar 19, 2025

Description

Add e2e tests for archiving and publishing releases + reverting. Making sure that the types are as expected

ARCHIVED:

  • Scheduled: Archive -> Unarchive -> Scheduled release
  • Undecided: Schedule -> UnSchedule -> Archive -> Unarchive -> Scheduled release
  • Undecided: Archive -> Unarchive -> Undecided release
  • ASAP: Schedule -> Unscheduled -> Archive -> Unarchive -> Scheduled release
  • ASAP: Archive -> Unarchive -> ASAP release

PUBLISHED:

  • ASAP: Publish -> Revert -> ASAP release
  • ASAP: Schedule -> Wait -> Revert -> ASAP release
  • ASAP: Schedule -> Unsechdule -> Publish -> Revert -> ASAP release
  • Scheduled: Schedule -> Wait -> Revert -> ASAP release
  • Scheduled: Publish -> Revert -> ASAP release
  • Undecided: Schedule -> Wait -> Revert -> ASAP release
  • Undecided: Publish -> Revert -> ASAP release

What to review

This is all tests with utils for e2e test for releases

Testing

This is all tests 🥲

Notes for release

N/A

Sorry, something went wrong.

Copy link

vercel bot commented Mar 19, 2025

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 Mar 20, 2025 11:18am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 20, 2025 11:18am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 20, 2025 11:18am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Mar 20, 2025 11:18am
test-next-studio ⬜️ Ignored (Inspect) Mar 20, 2025 11:18am

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Mar 19, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 42.98% 55546 / 129223
🔵 Statements 42.98% 55546 / 129223
🔵 Functions 47.43% 2783 / 5867
🔵 Branches 79.55% 10417 / 13094
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/sanity/src/core/releases/tool/components/releaseCTAButtons/ReleaseRevertButton/ReleaseRevertButton.tsx 18.45% 55.55% 50% 18.45% 34-229, 246-248, 268-277, 285-295
Generated in workflow #32568 for commit ab299d0 by the Vitest Coverage Report Action

Copy link
Contributor

github-actions bot commented Mar 19, 2025

⚡️ Editor Performance Report

Updated Thu, 20 Mar 2025 11:19:08 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 25.6 efps (39ms) 23.8 efps (42ms) +3ms (+7.7%)
article (body) 72.5 efps (14ms) 81.3 efps (12ms) -1ms (-/-%)
article (string inside object) 27.0 efps (37ms) 23.8 efps (42ms) +5ms (+13.5%)
article (string inside array) 24.1 efps (42ms) 22.2 efps (45ms) +4ms (+8.4%)
recipe (name) 47.6 efps (21ms) 47.6 efps (21ms) +0ms (-/-%)
recipe (description) 50.0 efps (20ms) 52.6 efps (19ms) -1ms (-5.0%)
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (5ms) +0ms (-/-%)
synthetic (title) 18.5 efps (54ms) 18.9 efps (53ms) -1ms (-1.9%)
synthetic (string inside object) 19.8 efps (51ms) 19.2 efps (52ms) +2ms (+3.0%)

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) 39ms 44ms 49ms 57ms 258ms 11.0s
article (body) 14ms 15ms 16ms 138ms 174ms 5.1s
article (string inside object) 37ms 39ms 42ms 182ms 200ms 7.0s
article (string inside array) 42ms 43ms 47ms 58ms 201ms 6.8s
recipe (name) 21ms 22ms 26ms 43ms 2ms 7.9s
recipe (description) 20ms 21ms 22ms 23ms 0ms 5.0s
recipe (instructions) 5ms 7ms 8ms 40ms 0ms 3.2s
synthetic (title) 54ms 58ms 65ms 242ms 1066ms 13.4s
synthetic (string inside object) 51ms 53ms 57ms 212ms 640ms 8.0s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 42ms 46ms 66ms 526ms 660ms 11.4s
article (body) 12ms 14ms 19ms 39ms 56ms 4.9s
article (string inside object) 42ms 43ms 48ms 52ms 25ms 6.9s
article (string inside array) 45ms 48ms 52ms 150ms 369ms 7.7s
recipe (name) 21ms 22ms 24ms 44ms 0ms 7.4s
recipe (description) 19ms 20ms 21ms 25ms 0ms 4.6s
recipe (instructions) 5ms 6ms 7ms 8ms 0ms 3.0s
synthetic (title) 53ms 55ms 59ms 215ms 928ms 13.3s
synthetic (string inside object) 52ms 53ms 60ms 530ms 1521ms 8.4s

📚 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.

test(e2e): update add more tests

test(e2e): update file location
refactor(e2e): add params

refactor(e2e): add params

test(e2e): add revert tests
Copy link
Contributor

@juice49 juice49 left a comment

Choose a reason for hiding this comment

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

This is great test coverage to land. Thanks so much, Rita! ✨

@RitaDias RitaDias merged commit d59b008 into next Mar 21, 2025
61 checks passed
@RitaDias RitaDias deleted the add-e2e-to-archive-unarchive branch March 21, 2025 07:48
bjoerge added a commit that referenced this pull request Mar 21, 2025
* next: (81 commits)
  fix(presentation): use `perspectiveStack` when resolving main document (#9005)
  fix(core): hide discard changes action when published (#9009)
  fix(sanity): treat releases as inactive if releases tool not present (#9001)
  test(e2e): add unarchive / unpublish tests to releases (#8979)
  test: adding videos to CI report artifact (#8990)
  fix(cli): use outpath as package name for apps (#9003)
  fix(core): drop explicit `withCredentials` on requests (#8996)
  chore: add presentation to regular workspace (#8997)
  fix(core): use publishedId for search intent links (#8980)
  chore: fix vitest snapshot client error (#8993)
  chore: add vitest typecheck support (#8994)
  fix(core): stickyParams for `__unsafe_disableScopedSearchParams` (#8987)
  fix: no releases screen shows the create release dialog (#8988)
  fix(presentation): previewUrl is required (#8995)
  fix(deps): update dependency @portabletext/editor to ^1.40.3 (#8992)
  fix(deps): update dependency @portabletext/block-tools to ^1.1.14 (#8991)
  feat(core): add version to documents when creating with a release pinned (#8974)
  fix(test): update flaky navbar test (#8984)
  chore: add simple e2e presentation test (#8982)
  chore(deps): update dev-non-major (#8983)
  ...
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.

None yet

2 participants