Skip to content

chore: add e2e test against an external auth provider during workspace creation #12985

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
merged 4 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Review feedback
Signed-off-by: Danny Kopping <danny@coder.com>
  • Loading branch information
dannykopping committed Apr 18, 2024
commit 5a9ddaf081ecd0c7aff44d0706b506716f9b8648
7 changes: 3 additions & 4 deletions site/e2e/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import axios from "axios";
import { type ChildProcess, exec, spawn } from "child_process";
import { randomUUID } from "crypto";
import express from "express";
import type http from "http";
import capitalize from "lodash/capitalize";
import path from "path";
import * as ssh from "ssh2";
Expand Down Expand Up @@ -68,9 +67,9 @@ export const createWorkspace = async (
const popupPromise = page.waitForEvent("popup");

// Find the "Login with <Provider>" button
const externalAuthLoginButton = page.locator(
"#external-auth-" + useExternalAuthProvider,
);
const externalAuthLoginButton = page
.getByRole("button")
.getByText("Login with GitHub");
await expect(externalAuthLoginButton).toBeVisible();

// Click it
Expand Down
1 change: 0 additions & 1 deletion site/src/pages/CreateWorkspacePage/ExternalAuthButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export const ExternalAuthButton: FC<ExternalAuthButtonProps> = ({
<>
<div css={{ display: "flex", alignItems: "center", gap: 8 }}>
<LoadingButton
id={"external-auth-" + auth.id}
fullWidth
loading={isLoading}
variant="contained"
Expand Down
Loading