Update tests

pull/460/head
Rick Carlino 2017-09-19 08:34:20 -05:00
parent a0872e879a
commit 46c2c1c02d
4 changed files with 43 additions and 4 deletions

View File

View File

@ -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>
);
}
}

View File

View File

@ -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", () => {