Fix unit test warning
Remove unused route from test
This commit is contained in:
@@ -67,10 +67,6 @@ describe("App", () => {
|
|||||||
await check("/updates", "span.MuiButton-label", "Sign In");
|
await check("/updates", "span.MuiButton-label", "Sign In");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Route /update unauthenticated", async () => {
|
|
||||||
await check("/update/1", "span.MuiButton-label", "Sign In");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("Route /carupdate-deploy unauthenticated", async () => {
|
it("Route /carupdate-deploy unauthenticated", async () => {
|
||||||
await check("/carupdate-deploy/1", "span.MuiButton-label", "Sign In");
|
await check("/carupdate-deploy/1", "span.MuiButton-label", "Sign In");
|
||||||
});
|
});
|
||||||
@@ -120,11 +116,6 @@ describe("App", () => {
|
|||||||
await check("/updates", "h6", "Deploy Packages");
|
await check("/updates", "h6", "Deploy Packages");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Route /update authenticated", async () => {
|
|
||||||
setToken(TEST_AUTH_OBJECT);
|
|
||||||
await check("/update/1", "h6", "Edit Update Package 1");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("Route /carupdate-status authenticated", async () => {
|
it("Route /carupdate-status authenticated", async () => {
|
||||||
setToken(TEST_AUTH_OBJECT);
|
setToken(TEST_AUTH_OBJECT);
|
||||||
await check("/carupdate-status/1", "h6", "Package Package 1.0");
|
await check("/carupdate-status/1", "h6", "Package Package 1.0");
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,6 @@
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import {
|
import {
|
||||||
Button,
|
|
||||||
Table,
|
Table,
|
||||||
TableBody,
|
TableBody,
|
||||||
TableCell,
|
TableCell,
|
||||||
@@ -26,7 +25,6 @@ import { LocalDateTimeString } from "../../../utils/dates";
|
|||||||
import { Roles, hasRole } from "../../../utils/roles";
|
import { Roles, hasRole } from "../../../utils/roles";
|
||||||
import TableHeaderSortable from "../../Table/HeaderSortable";
|
import TableHeaderSortable from "../../Table/HeaderSortable";
|
||||||
import SearchField from "../../Controls/SearchField";
|
import SearchField from "../../Controls/SearchField";
|
||||||
import { MicNone, PrintOutlined } from "@material-ui/icons";
|
|
||||||
|
|
||||||
const tableColumns = [
|
const tableColumns = [
|
||||||
{
|
{
|
||||||
@@ -58,7 +56,8 @@ const UpdatePackagesList = () => {
|
|||||||
const [orderBy, setOrderBy] = useState("id");
|
const [orderBy, setOrderBy] = useState("id");
|
||||||
const [order, setOrder] = useState("desc");
|
const [order, setOrder] = useState("desc");
|
||||||
const [search, setSearch] = useState("");
|
const [search, setSearch] = useState("");
|
||||||
const { getPackages, deletePackage, packages, totalPackages } = useUpdatesContext();
|
const { getPackages, deletePackage, packages, totalPackages } =
|
||||||
|
useUpdatesContext();
|
||||||
const {
|
const {
|
||||||
token: {
|
token: {
|
||||||
idToken: { jwtToken: token },
|
idToken: { jwtToken: token },
|
||||||
@@ -164,7 +163,7 @@ const UpdatePackagesList = () => {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
< Tooltip key={action.link} title={action.tip} >
|
<Tooltip key={`delete-${action.id}`} title={action.tip}>
|
||||||
<Typography
|
<Typography
|
||||||
color="primary"
|
color="primary"
|
||||||
variant="inherit"
|
variant="inherit"
|
||||||
@@ -173,14 +172,7 @@ const UpdatePackagesList = () => {
|
|||||||
{action.icon}
|
{action.icon}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
/**
|
);
|
||||||
< Tooltip key={action.link} title={action.tip} >
|
|
||||||
<Link onClick={() => onDelete(action.id)} style={{ margin: 5 }}>
|
|
||||||
{action.icon}
|
|
||||||
</Link>
|
|
||||||
</Tooltip >
|
|
||||||
*/
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user