-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e33a9e
commit 9bcedf6
Showing
15 changed files
with
290 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { http } from "msw"; | ||
import { HttpResponse } from "msw"; | ||
import { render } from "@/tests"; | ||
import server from "@/tests/mocks/node"; | ||
import MoviesHistoryView from "."; | ||
|
||
describe("History Movies", () => { | ||
it("should render with movies", async () => { | ||
server.use( | ||
http.get("/api/movies/history", () => { | ||
return HttpResponse.json({ | ||
data: [], | ||
}); | ||
}), | ||
); | ||
server.use( | ||
http.get("/api/providers", () => { | ||
return HttpResponse.json({ | ||
data: [], | ||
}); | ||
}), | ||
); | ||
server.use( | ||
http.get("/api/system/languages", () => { | ||
return HttpResponse.json({}); | ||
}), | ||
); | ||
|
||
render(<MoviesHistoryView />); | ||
|
||
// TODO: Assert | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { http } from "msw"; | ||
import { HttpResponse } from "msw"; | ||
import { render } from "@/tests"; | ||
import server from "@/tests/mocks/node"; | ||
import SeriesHistoryView from "."; | ||
|
||
describe("History Series", () => { | ||
it("should render with series", async () => { | ||
server.use( | ||
http.get("/api/episodes/history", () => { | ||
return HttpResponse.json({ | ||
data: [], | ||
}); | ||
}), | ||
); | ||
|
||
render(<SeriesHistoryView />); | ||
|
||
// TODO: Assert | ||
}); | ||
}); |
39 changes: 39 additions & 0 deletions
39
frontend/src/pages/History/Statistics/HistoryStats.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { http } from "msw"; | ||
import { HttpResponse } from "msw"; | ||
import { render } from "@/tests"; | ||
import server from "@/tests/mocks/node"; | ||
import HistoryStats from "./HistoryStats"; | ||
|
||
describe("History Stats", () => { | ||
it("should render with stats", async () => { | ||
server.use( | ||
http.get("/api/providers", () => { | ||
return HttpResponse.json({ | ||
data: [], | ||
}); | ||
}), | ||
); | ||
server.use( | ||
http.get("/api/system/languages", () => { | ||
return HttpResponse.json({}); | ||
}), | ||
); | ||
server.use( | ||
http.get("/api/history/stats", () => { | ||
return HttpResponse.json({ | ||
data: [], | ||
}); | ||
}), | ||
); | ||
|
||
server.use( | ||
http.get("/api/system/providers", () => { | ||
return HttpResponse.json({}); | ||
}), | ||
); | ||
|
||
render(<HistoryStats />); | ||
|
||
// TODO: Assert | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { http } from "msw"; | ||
import { HttpResponse } from "msw"; | ||
import { render } from "@/tests"; | ||
import server from "@/tests/mocks/node"; | ||
import SystemAnnouncementsView from "."; | ||
|
||
describe("System Announcements", () => { | ||
it("should render with announcements", async () => { | ||
server.use( | ||
http.get("/api/system/announcements", () => { | ||
return HttpResponse.json({ | ||
data: [], | ||
}); | ||
}), | ||
); | ||
|
||
render(<SystemAnnouncementsView />); | ||
|
||
// TODO: Assert | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { http } from "msw"; | ||
import { HttpResponse } from "msw"; | ||
import { render } from "@/tests"; | ||
import server from "@/tests/mocks/node"; | ||
import SystemBackupsView from "."; | ||
|
||
describe("System Backups", () => { | ||
it("should render with backups", async () => { | ||
server.use( | ||
http.get("/api/system/backups", () => { | ||
return HttpResponse.json({ | ||
data: [], | ||
}); | ||
}), | ||
); | ||
|
||
render(<SystemBackupsView />); | ||
|
||
// TODO: Assert | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { http } from "msw"; | ||
import { HttpResponse } from "msw"; | ||
import { render } from "@/tests"; | ||
import server from "@/tests/mocks/node"; | ||
import SystemLogsView from "."; | ||
|
||
describe("System Logs", () => { | ||
it("should render with logs", async () => { | ||
server.use( | ||
http.get("/api/system/logs", () => { | ||
return HttpResponse.json({ | ||
data: [], | ||
}); | ||
}), | ||
); | ||
|
||
render(<SystemLogsView />); | ||
|
||
// TODO: Assert | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { http } from "msw"; | ||
import { HttpResponse } from "msw"; | ||
import { render } from "@/tests"; | ||
import server from "@/tests/mocks/node"; | ||
import SystemProvidersView from "."; | ||
|
||
describe("System Providers", () => { | ||
it("should render with providers", async () => { | ||
server.use( | ||
http.get("/api/providers", () => { | ||
return HttpResponse.json({ | ||
data: [], | ||
}); | ||
}), | ||
); | ||
|
||
render(<SystemProvidersView />); | ||
|
||
// TODO: Assert | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { http } from "msw"; | ||
import { HttpResponse } from "msw"; | ||
import { render } from "@/tests"; | ||
import server from "@/tests/mocks/node"; | ||
import SystemReleasesView from "."; | ||
|
||
describe("System Releases", () => { | ||
it("should render with releases", async () => { | ||
server.use( | ||
http.get("/api/system/releases", () => { | ||
return HttpResponse.json({ | ||
data: [], | ||
}); | ||
}), | ||
); | ||
|
||
render(<SystemReleasesView />); | ||
|
||
// TODO: Assert | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { http } from "msw"; | ||
import { HttpResponse } from "msw"; | ||
import { render } from "@/tests"; | ||
import server from "@/tests/mocks/node"; | ||
import SystemStatusView from "."; | ||
|
||
describe("System Status", () => { | ||
it("should render with status", async () => { | ||
server.use( | ||
http.get("/api/system/status", () => { | ||
return HttpResponse.json({ | ||
data: [], | ||
}); | ||
}), | ||
); | ||
|
||
server.use( | ||
http.get("/api/system/health", () => { | ||
return HttpResponse.json({ | ||
data: [], | ||
}); | ||
}), | ||
); | ||
|
||
render(<SystemStatusView />); | ||
|
||
// TODO: Assert | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { http } from "msw"; | ||
import { HttpResponse } from "msw"; | ||
import { render } from "@/tests"; | ||
import server from "@/tests/mocks/node"; | ||
import SystemTasksView from "."; | ||
|
||
describe("System Tasks", () => { | ||
it("should render with tasks", async () => { | ||
server.use( | ||
http.get("/api/system/tasks", () => { | ||
return HttpResponse.json({ | ||
data: [], | ||
}); | ||
}), | ||
); | ||
|
||
render(<SystemTasksView />); | ||
|
||
// TODO: Assert | ||
}); | ||
}); |
Oops, something went wrong.