Skip to content

Commit

Permalink
Make the release notes test flexible to repo changes (#3075)
Browse files Browse the repository at this point in the history
  • Loading branch information
philrz authored May 24, 2024
1 parent 6dce604 commit 54f5b29
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions apps/zui/src/app/release-notes/test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ import {rest} from "msw"
import {SystemTest} from "src/test/system"
import ReleaseNotes from "./release-notes"
import {screen} from "@testing-library/react"
import pkg from "../../../package.json"

const system = new SystemTest("release-notes")
const url =
pkg.repository.replace("github.com", "api.github.com/repos") +
"/releases/tags/v0.0.0"

system.network.use(
rest.get(
"https://api.github.com/repos/brimdata/zui/releases/tags/v0.0.0",
(req, res, ctx) => {
return res(ctx.status(200), ctx.json({body: "Testing Release Notes"}))
}
)
rest.get(url, (req, res, ctx) => {
return res(ctx.status(200), ctx.json({body: "Testing Release Notes"}))
})
)

test("fetches the release notes", async () => {
Expand Down

0 comments on commit 54f5b29

Please sign in to comment.