Skip to content

Commit

Permalink
Manually open up the GitHub auth URL
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpgreen2 committed Jan 2, 2025
1 parent d205b49 commit 47f0e89
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions web-admin/tests/projects.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,32 @@ import { expect } from "@playwright/test";
import { exec } from "child_process";
import { promisify } from "util";
import { test } from "./setup/base";
import { spawnAndMatch } from "./utils/spawn";

const execAsync = promisify(exec);

test.describe("Projects", () => {
test("should deploy a project", async ({ page, organization: _ }) => {
// Execute the deploy command
const { stdout: deployStdout } = await execAsync(
"rill deploy --path tests/setup/git/repos/rill-examples --subpath rill-openrtb-prog-ads --project openrtb --github true",
// Execute the deploy command and capture the auth URL
const { match } = await spawnAndMatch(
"rill",
[
"deploy",
"--path",
"tests/setup/git/repos/rill-examples",
"--subpath",
"rill-openrtb-prog-ads",
"--project",
"openrtb",
"--github",
"true",
],
/https?:\/\/[^\s]+/,
);

// Confirm the CLI output
expect(deployStdout).toContain(`Created project "e2e/openrtb"`);
expect(deployStdout).toContain(`Opening project in browser...`);
// Manually navigate to the auth URL
const url = match[0];
await page.goto(url);

// Expect to see the successful deployment
await page.goto("/e2e/openrtb");
Expand Down

0 comments on commit 47f0e89

Please sign in to comment.