-
Notifications
You must be signed in to change notification settings - Fork 145
Make spec-detected auth methods immutable in the add flow #1188
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
Merged
+2,021
−35
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,75 @@ | ||
| // The PACKAGED desktop app, on camera, inside a GUI guest — driven over CDP from | ||
| // the host. ONE scenario shared by every desktop-<os> project (desktop-macos, | ||
| // desktop-linux): the same bundle and CDP driver, proving it renders on a guest | ||
| // OS and filming the actual console. The desktop-<os> globalsetup boots the | ||
| // guest, launches the app, forwards its --remote-debugging-port (E2E_DESKTOP_CDP_PORT) | ||
| // and publishes the guest IP; this scenario connects, drives, and records. The | ||
| // run lands in runs/<target>/ (its own per-OS bucket). Without a guest it skips | ||
| // honestly, like desktop-packaged without a display. | ||
| import { writeFileSync } from "node:fs"; | ||
| import { join } from "node:path"; | ||
|
|
||
| import { expect, it } from "@effect/vitest"; | ||
| import { Effect } from "effect"; | ||
|
|
||
| import { scenario } from "../src/scenario"; | ||
| import { RunDir } from "../src/services"; | ||
| import { CdpPage, pageWsUrl, recordGuestScreen } from "../src/vm/desktop"; | ||
|
|
||
| const NAME = "Desktop (packaged, in a VM) · the bundle renders its console"; | ||
| const cdpPort = process.env.E2E_DESKTOP_CDP_PORT; | ||
| const guestIp = process.env.E2E_DESKTOP_VM_IP; | ||
| const recSeconds = Number(process.env.E2E_DESKTOP_REC_SECONDS ?? "12"); | ||
| const os: "macos" | "linux" | "windows" = | ||
| process.env.E2E_TARGET === "desktop-windows" | ||
| ? "windows" | ||
| : process.env.E2E_TARGET === "desktop-linux" | ||
| ? "linux" | ||
| : "macos"; | ||
|
|
||
| const run = async (runDir: string) => { | ||
| const cdp = await CdpPage.connect(await pageWsUrl(Number(cdpPort))); | ||
| try { | ||
| await cdp.command("Runtime.enable"); | ||
| await cdp.command("Page.enable"); | ||
|
|
||
| // Film the console while we drive it (OS-aware capture lands a playable mp4). | ||
| const recording = recordGuestScreen( | ||
| guestIp as string, | ||
| recSeconds, | ||
| join(runDir, "session.mp4"), | ||
| os, | ||
| ); | ||
|
|
||
| // Reaching the nav proves the packaged bundle booted and connected to its | ||
| // daemon on this OS. | ||
| await cdp.waitForText("Integrations", 60_000).catch(() => cdp.waitForText("Settings", 60_000)); | ||
| writeFileSync(join(runDir, "01-console-rendered.png"), await cdp.screenshot()); | ||
|
|
||
| const body = await cdp.command<{ result?: { value?: string } }>("Runtime.evaluate", { | ||
| expression: "document.body.innerText", | ||
| returnByValue: true, | ||
| }); | ||
| expect(body.result?.value ?? "", "the packaged console rendered its nav").toContain( | ||
| "Integrations", | ||
| ); | ||
|
|
||
| await recording; | ||
| } finally { | ||
| cdp.close(); | ||
| } | ||
| }; | ||
|
|
||
| if (!cdpPort || !guestIp) { | ||
| it.skip(`${NAME} (needs a desktop guest — set E2E_DESKTOP_VM_IP or run the desktop-<os> project)`, () => {}); | ||
| } else { | ||
| // Literal name (not NAME) so the run's test.ts review artifact captures it. | ||
| scenario( | ||
| "Desktop (packaged, in a VM) · the bundle renders its console", | ||
| { timeout: 180_000 }, | ||
| Effect.gen(function* () { | ||
| const runDir = yield* RunDir; | ||
| yield* Effect.promise(() => run(runDir)); | ||
| }), | ||
| ); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
AGENTS.mdprohibits em-dashes (—) in all contexts: "prose, docs, code comments, commit messages, or PRs. Use commas, colons, parentheses, or separate sentences instead." Line 48 uses one (// Restore the unix executable bit — keyed on the TARGET), as do comments ine2e/AGENTS.md("the real test, not a transcript of one — develop the flow"),e2e/setup/desktop-linux.globalsetup.ts("no launchctl — just background processes"),e2e/scripts/cli.ts, and several other new files throughout this PR.Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!