@@ -1,6 +1,6 @@
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { App } from "../../src/App";
|
||||
|
||||
class StreamingTestBlob {
|
||||
@@ -25,6 +25,10 @@ class StreamingTestBlob {
|
||||
}
|
||||
}
|
||||
|
||||
afterEach(() => {
|
||||
vi.unstubAllGlobals();
|
||||
});
|
||||
|
||||
describe("Log Tools", () => {
|
||||
it("streams the sample and exposes correlation and redaction views", async () => {
|
||||
vi.stubGlobal("Blob", StreamingTestBlob as unknown as typeof Blob);
|
||||
@@ -52,7 +56,7 @@ describe("Log Tools", () => {
|
||||
expect(
|
||||
screen.getByText("JSON Lines", { selector: ".metrics strong" }),
|
||||
).toBeVisible();
|
||||
await userEvent.click(screen.getByRole("tab", { name: "Redaction" }));
|
||||
await userEvent.click(screen.getByRole("button", { name: "Redaction" }));
|
||||
expect(screen.getByText("Deterministic recipes")).toBeVisible();
|
||||
expect(screen.getByLabelText("Redacted preview")).not.toHaveTextContent(
|
||||
"ada@example.test",
|
||||
|
||||
Reference in New Issue
Block a user