Update tests
parent
a0872e879a
commit
46c2c1c02d
|
@ -0,0 +1,40 @@
|
|||
import * as React from "react";
|
||||
import { t } from "i18next";
|
||||
import { Widget, WidgetHeader } from "../../ui/index";
|
||||
import { ToolTips } from "../../constants";
|
||||
|
||||
type S = {};
|
||||
type P = {};
|
||||
const noop = () => alert("TODO");
|
||||
export class WebcamPanel extends React.Component<P, S> {
|
||||
|
||||
state: S = {};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Widget>
|
||||
<WidgetHeader title="Webcam" helpText={ToolTips.WEBCAM}>
|
||||
<button
|
||||
className="fb-button green"
|
||||
onClick={noop}>
|
||||
{t("Save")}*
|
||||
</button>
|
||||
<button
|
||||
className="fb-button gray"
|
||||
onClick={noop}>
|
||||
{t("Edit")}
|
||||
</button>
|
||||
</WidgetHeader>
|
||||
<div className="widget-body">
|
||||
<label>{t("Set Webcam URL:")}</label>
|
||||
<input
|
||||
type="text"
|
||||
onChange={noop}
|
||||
placeholder="https://"
|
||||
value={undefined}
|
||||
className="webcam-url-input" />
|
||||
</div>
|
||||
</Widget>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -53,10 +53,9 @@ describe("findSlotByToolId", () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe("getFeed", () => {
|
||||
it("throws when no WebcamFeeds are found", () => {
|
||||
expect(() => getFeeds(emptyState().index))
|
||||
.toThrow("Problem loading webcam feed");
|
||||
describe("getFeeds", () => {
|
||||
it("returns empty array", () => {
|
||||
expect(getFeeds(emptyState().index).length).toBe(0);
|
||||
});
|
||||
|
||||
it("finds the only WebcamFeed", () => {
|
||||
|
|
Loading…
Reference in New Issue