Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
fix(cyclops-cs): collapse GitHub WIF settings (#6677)
r33drichards55563d05065f
diff --git a/libs/fleet/e2e/settings.spec.ts b/libs/fleet/e2e/settings.spec.tsindex 5d609ca279..8a42aaf6fc 100644--- a/libs/fleet/e2e/settings.spec.ts+++ b/libs/fleet/e2e/settings.spec.ts@@ -15,9 +15,11 @@ test.describe("Settings GitHub trust policies", () => {test("renders existing trust policies and workflow guidance", async ({ page }) => {await page.goto("/settings")- await expect(- page.getByRole("heading", { name: "GitHub Actions OIDC" }),- ).toBeVisible()+ const githubToggle = page.getByRole("button", {+ name: "GitHub Actions OIDC",+ })+ await expect(githubToggle).toBeVisible()+ await githubToggle.click()await expect(page.getByText("cloud-ci")).toBeVisible()await expect(page.getByText("trycua/cloud")).toBeVisible()await expect(page.getByText("https://token.actions.githubusercontent.com")).toBeVisible()@@ -44,8 +46,53 @@ test.describe("Settings GitHub trust policies", () => {await expect(workflowSnippet).not.toContainText("CYCLOPS_CS_TOKEN")})+ test("shows GitHub WIF below payment method in a collapsed section", async ({+ page,+ }) => {+ await page.route("**/api/config", route =>+ route.fulfill({+ contentType: "application/json",+ body: JSON.stringify({ admin: false, billing: true }),+ }),+ )+ await page.route("**/api/billing/summary", route =>+ route.fulfill({+ contentType: "application/json",+ body: JSON.stringify({ payment_method_present: false, card: null }),+ }),+ )++ await page.goto("/settings")++ const paymentHeading = page.getByRole("heading", { name: "Payment method" })+ const githubToggle = page.getByRole("button", {+ name: "GitHub Actions OIDC",+ })+ await expect(paymentHeading).toBeVisible()+ await expect(githubToggle).toBeVisible()+ const paymentBeforeGitHub = await page.evaluate(() => {+ const payment = [...document.querySelectorAll("h1, h2, h3, h4")].find(+ element => element.textContent?.trim() === "Payment method",+ )+ const github = [...document.querySelectorAll("button, [role=\"button\"]")].find(element =>+ element.textContent?.trim().startsWith("GitHub Actions OIDC"),+ )+ return Boolean(+ payment &&+ github &&+ payment.compareDocumentPosition(github) & Node.DOCUMENT_POSITION_FOLLOWING,+ )+ })+ expect(paymentBeforeGitHub).toBe(true)+ await expect(page.getByLabel("Display name")).toBeHidden()++ await githubToggle.click()+ await expect(page.getByLabel("Display name")).toBeVisible()+ })+test("can create, edit, disable, and delete a trust policy", async ({ page }) => {await page.goto("/settings")+ await page.getByRole("button", { name: "GitHub Actions OIDC" }).click()await page.getByLabel("Display name").fill("preview-ci")await page.getByLabel("Repository").fill("trycua/preview")diff --git a/libs/fleet/src/pages/Settings.tsx b/libs/fleet/src/pages/Settings.tsxindex 9d9532d23d..b40a6a987c 100644--- a/libs/fleet/src/pages/Settings.tsx+++ b/libs/fleet/src/pages/Settings.tsx@@ -7,6 +7,7 @@ import Box from "@cloudscape-design/components/box"import Button from "@cloudscape-design/components/button"import Container from "@cloudscape-design/components/container"import CopyToClipboard from "@cloudscape-design/components/copy-to-clipboard"+import ExpandableSection from "@cloudscape-design/components/expandable-section"import Form from "@cloudscape-design/components/form"import FormField from "@cloudscape-design/components/form-field"import Header from "@cloudscape-design/components/header"@@ -229,15 +230,12 @@ steps:</SpaceBetween></Container>- <Container- header={- <Header- variant="h2"- description="Trust GitHub repositories to call Fleets directly with GitHub Actions OIDC tokens."- >- GitHub Actions OIDC- </Header>- }+ {billing && <BillingSettings />}++ <ExpandableSection+ variant="container"+ headerText="GitHub Actions OIDC"+ headerDescription="Trust GitHub repositories to call Fleets directly with GitHub Actions OIDC tokens."><SpaceBetween size="l"><Form@@ -404,9 +402,7 @@ steps:</SpaceBetween></Container></SpaceBetween>- </Container>-- {billing && <BillingSettings />}+ </ExpandableSection>{confirmDelete && (<Modal