Skip to content

chore(site): upgrade msw to 2.0 #12597

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 16 commits into from
Mar 19, 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
Next Next commit
Merge branch 'main' of https://github.com/coder/coder into bq/upgrade…
…-msw
  • Loading branch information
BrunoQuaresma committed Mar 14, 2024
commit b64169172fe7d0eac4d13bfbc3563d5efb4492a4
10 changes: 8 additions & 2 deletions site/src/contexts/auth/RequireAuth.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { screen } from "@testing-library/react";
import { screen, renderHook } from "@testing-library/react";
import { http, HttpResponse } from "msw";
import { renderWithAuth } from "testHelpers/renderHelpers";
import type { FC, PropsWithChildren } from "react";
import { QueryClientProvider } from "react-query";
import { MockPermissions, MockUser } from "testHelpers/entities";
import {
renderWithAuth,
createTestQueryClient,
} from "testHelpers/renderHelpers";
import { server } from "testHelpers/server";
import { AuthContext, type AuthContextValue } from "./AuthProvider";
import { useAuthenticated } from "./RequireAuth";
Expand Down
4 changes: 1 addition & 3 deletions site/src/modules/resources/PortForwardButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,7 @@ export const PortForwardPopoverView: FC<PortForwardPopoverViewProps> = ({
const canSharePortsPublic =
canSharePorts && template.max_port_share_level === "public";

const publicMenuItem = canSharePortsPublic ? (
<MenuItem value="public">Public</MenuItem>
) : (
const disabledPublicMenuItem = (
<Tooltip title="This workspace template does not allow sharing ports with unauthenticated users.">
{/* Tooltips don't work directly on disabled MenuItem components so you must wrap in div. */}
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jest.mock("components/SyntaxHighlighter/SyntaxHighlighter", () => ({
test("displays the template files even when there is no previous version", async () => {
server.use(
http.get(
"/api/v2/organizations/:orgId/templates/:template/versions/:version/previous",
"/api/v2/organizations/:organizationId/templates/:template/versions/:version/previous",
() => {
new HttpResponse(null, { status: 404 });
},
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.