| ... | @@ -1360,6 +1360,50 @@ describe("SourceControlSettingsPanel discovery states", () => { | ... | @@ -1360,6 +1360,50 @@ describe("SourceControlSettingsPanel discovery states", () => { |
| 1360 | await expect.element(page.getByText("Nothing detected yet")).not.toBeInTheDocument(); | 1360 | await expect.element(page.getByText("Nothing detected yet")).not.toBeInTheDocument(); |
| 1361 | }); | 1361 | }); |
| 1362 | | 1362 | |
| | 1363 | it("shows unauthenticated API providers as available but not enabled", async () => { |
| | 1364 | setSourceControlDiscoveryStub(async () => ({ |
| | 1365 | versionControlSystems: [], |
| | 1366 | sourceControlProviders: [ |
| | 1367 | { |
| | 1368 | kind: "bitbucket", |
| | 1369 | label: "Bitbucket", |
| | 1370 | status: "available", |
| | 1371 | version: Option.none(), |
| | 1372 | installHint: |
| | 1373 | "Set T3CODE_BITBUCKET_EMAIL and T3CODE_BITBUCKET_API_TOKEN, or T3CODE_BITBUCKET_ACCESS_TOKEN.", |
| | 1374 | detail: Option.none(), |
| | 1375 | auth: { |
| | 1376 | status: "unauthenticated", |
| | 1377 | account: Option.none(), |
| | 1378 | host: Option.some("bitbucket.org"), |
| | 1379 | detail: Option.some( |
| | 1380 | "Set T3CODE_BITBUCKET_EMAIL and T3CODE_BITBUCKET_API_TOKEN, or T3CODE_BITBUCKET_ACCESS_TOKEN.", |
| | 1381 | ), |
| | 1382 | }, |
| | 1383 | }, |
| | 1384 | ], |
| | 1385 | })); |
| | 1386 | |
| | 1387 | mounted = await render( |
| | 1388 | <AppAtomRegistryProvider> |
| | 1389 | <SourceControlSettingsPanel /> |
| | 1390 | </AppAtomRegistryProvider>, |
| | 1391 | ); |
| | 1392 | |
| | 1393 | const bitbucketSwitch = page.getByRole("switch", { name: "Bitbucket availability" }); |
| | 1394 | |
| | 1395 | await expect.element(page.getByText("Not authenticated")).toBeInTheDocument(); |
| | 1396 | await expect |
| | 1397 | .element( |
| | 1398 | page.getByText( |
| | 1399 | "Available. Set T3CODE_BITBUCKET_EMAIL and T3CODE_BITBUCKET_API_TOKEN, or T3CODE_BITBUCKET_ACCESS_TOKEN.", |
| | 1400 | ), |
| | 1401 | ) |
| | 1402 | .toBeInTheDocument(); |
| | 1403 | await expect.element(bitbucketSwitch).toBeDisabled(); |
| | 1404 | await expect.element(bitbucketSwitch).not.toBeChecked(); |
| | 1405 | }); |
| | 1406 | |
| 1363 | it("shows Git fetch interval settings inside the Git details dropdown", async () => { | 1407 | it("shows Git fetch interval settings inside the Git details dropdown", async () => { |
| 1364 | setSourceControlDiscoveryStub(async () => ({ | 1408 | setSourceControlDiscoveryStub(async () => ({ |
| 1365 | versionControlSystems: [ | 1409 | versionControlSystems: [ |