Skip to content

Test the moved-to-v2 notice - #2270

Merged
RhysSullivan merged 1 commit into
v1-moved-to-v2-modalfrom
v1-moved-to-v2-modal-tests
Oct 12, 2026
Merged

RhysSullivan merged 1 commit into
v1-moved-to-v2-modalfrom
v1-moved-to-v2-modal-tests

Conversation

@RhysSullivan

@RhysSullivan RhysSullivan commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Tests for #2269.

  • apps/cloud/src/auth/v2-moved.test.ts covers the metadata parsing: a moved org, unrelated keys, offset normalization, missing keys, malformed slugs and timestamps. It covers the live WorkOS read: moved, not moved, and a WorkOS failure. It also covers the v2-import answer: a moved org is not offered the import and its eligibility is not read; an unmoved org gets the import link; malformed or unreadable metadata counts as not moved; and with no v2 host nothing is read.
  • apps/cloud/src/web/v2-moved-snooze.test.ts covers the 7-day and 30-day snooze, that each org is snoozed separately, unreadable stored values, and storage that is missing or throws.
  • e2e cloud/v2-moved-notice.test.ts seeds WorkOS organization metadata through the emulator's Update Organization route and covers three cases:
    • The notice shows the v2 link, and the sidebar reads "Open in Executor v2". ✕ hides the notice, and it stays hidden after a reload.
    • "Keep using v1" opens the feedback step. Send stays disabled for blank text, Back works, and sending hides the notice for good.
    • Malformed metadata shows no notice and keeps the import link.

The WorkOS emulator does not store organization metadata, so the existing local emulate patch gains Create and Update Organization metadata support. Updates are partial, null deletes a key, and {} clears all keys, as WorkOS documents. The same support is being added upstream in emulate. This patch can be dropped once that is published.

The analytics events are not asserted in e2e because the e2e stack mounts no PostHog client.

Verification

  • cloud bun run test (867 passed)
  • e2e cloud/v2-moved-notice.test.ts (3 passed) and cloud/v2-import-link.test.ts (4 passed)

Patches the WorkOS emulator to store organization metadata, as the
real Create and Update Organization endpoints do.
@RhysSullivan
RhysSullivan added this pull request to stack #2268 October 12, 2026 00:45
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 6443ec2 Oct 12 2026, 12:49 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 6443ec2 Commit Preview URL

Branch Preview URL
Oct 12 2026, 12:48 AM

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@pkg-pr-new

pkg-pr-new Bot commented Oct 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@2270

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@2270

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@2270

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@2270

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@2270

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@2270

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@2270

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@2270

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@2270

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@2270

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@2270

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@2270

executor

npm i https://pkg.pr.new/executor@2270

commit: 6443ec2

@RhysSullivan
RhysSullivan marked this pull request as ready for review October 12, 2026 02:40
@RhysSullivan
RhysSullivan merged commit 6682324 into main Oct 12, 2026
77 of 80 checks passed
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.

1 participant