mirror of
https://github.com/wassname/talk.git
synced 2026-08-04 13:23:35 +08:00
Added missing dependency and test updated
This commit is contained in:
@@ -15,5 +15,12 @@ exports[`renders username and body 1`] = `
|
||||
<withPropsOnChange(Typography)>
|
||||
Woof
|
||||
</withPropsOnChange(Typography)>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
>
|
||||
<withContext(LocalStateContainer)
|
||||
commentID="comment-id"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
@@ -1,14 +1,27 @@
|
||||
import { shallow } from "enzyme";
|
||||
import React from "react";
|
||||
|
||||
import { render } from "./AppQuery";
|
||||
import PermalinkViewContainer from "talk-stream/containers/PermalinkViewContainer";
|
||||
import AppContainer from "../containers/AppContainer";
|
||||
import { renderWrapper } from "./AppQuery";
|
||||
|
||||
it("renders permalink view", () => {
|
||||
const data = {
|
||||
props: {} as any,
|
||||
error: null,
|
||||
};
|
||||
const component = renderWrapper(PermalinkViewContainer);
|
||||
const wrapper = shallow(React.createElement(() => component(data)));
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("renders app", () => {
|
||||
const data = {
|
||||
props: {} as any,
|
||||
error: null,
|
||||
};
|
||||
const wrapper = shallow(React.createElement(() => render(data)));
|
||||
const component = renderWrapper(AppContainer);
|
||||
const wrapper = shallow(React.createElement(() => component(data)));
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
@@ -17,7 +30,8 @@ it("renders loading", () => {
|
||||
props: null,
|
||||
error: null,
|
||||
};
|
||||
const wrapper = shallow(React.createElement(() => render(data)));
|
||||
const component = renderWrapper(AppContainer);
|
||||
const wrapper = shallow(React.createElement(() => component(data)));
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
@@ -26,6 +40,7 @@ it("renders error", () => {
|
||||
props: null,
|
||||
error: new Error("error"),
|
||||
};
|
||||
const wrapper = shallow(React.createElement(() => render(data)));
|
||||
const component = renderWrapper(AppContainer);
|
||||
const wrapper = shallow(React.createElement(() => component(data)));
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
@@ -17,3 +17,9 @@ exports[`renders loading 1`] = `
|
||||
Loading
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`renders permalink view 1`] = `
|
||||
<Relay(PermalinkViewContainer)
|
||||
data={Object {}}
|
||||
/>
|
||||
`;
|
||||
|
||||
@@ -74,6 +74,9 @@ exports[`loads more comments 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -103,6 +106,9 @@ exports[`loads more comments 1`] = `
|
||||
>
|
||||
What's up?
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -132,6 +138,9 @@ exports[`loads more comments 1`] = `
|
||||
>
|
||||
Hey!
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -213,6 +222,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -242,6 +254,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
What's up?
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
|
||||
@@ -74,6 +74,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -103,6 +106,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
I like yoghurt
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="Indent-root Indent-level0"
|
||||
@@ -136,6 +142,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
role="article"
|
||||
@@ -161,6 +170,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
What's up?
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -74,6 +74,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -103,6 +106,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
What's up?
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -74,6 +74,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="Indent-root Indent-level0"
|
||||
@@ -107,6 +110,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
What's up?
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
<button
|
||||
aria-controls="talk-comments-replyList-log--comment-0"
|
||||
@@ -205,6 +211,9 @@ exports[`show all replies 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="Indent-root Indent-level0"
|
||||
@@ -238,6 +247,9 @@ exports[`show all replies 1`] = `
|
||||
>
|
||||
What's up?
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
role="article"
|
||||
@@ -263,6 +275,9 @@ exports[`show all replies 1`] = `
|
||||
>
|
||||
Hey!
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,6 @@ type Placement =
|
||||
|
||||
interface InnerProps {
|
||||
body: (props: RenderProps) => any | React.ReactElement<any>;
|
||||
// body: React.ReactElement<any> | null;
|
||||
children: (props: RenderProps) => any;
|
||||
description?: string;
|
||||
id?: string;
|
||||
|
||||
Reference in New Issue
Block a user