mirror of
https://github.com/wassname/talk.git
synced 2026-08-12 12:30:39 +08:00
Fix tests
This commit is contained in:
@@ -5,7 +5,9 @@ exports[`renders username and body 1`] = `
|
||||
className="Comment-root"
|
||||
role="article"
|
||||
>
|
||||
<TopBar>
|
||||
<TopBar
|
||||
className="Comment-topBar"
|
||||
>
|
||||
<Username>
|
||||
Marvin
|
||||
</Username>
|
||||
@@ -16,12 +18,10 @@ exports[`renders username and body 1`] = `
|
||||
<HTMLContent>
|
||||
Woof
|
||||
</HTMLContent>
|
||||
<div
|
||||
<withPropsOnChange(Flex)
|
||||
className="Comment-footer"
|
||||
>
|
||||
<withContext(withLocalStateContainer(PermalinkContainer))
|
||||
commentID="comment-id"
|
||||
/>
|
||||
</div>
|
||||
direction="row"
|
||||
itemGutter="half"
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`renders correctly on big screens 1`] = `
|
||||
<div
|
||||
className="Flex-root TopBar-root Flex-flex Flex-itemGutter Flex-alignBaseline Flex-directionRow"
|
||||
className="Flex-root Flex-flex Flex-itemGutter Flex-alignBaseline Flex-directionRow"
|
||||
>
|
||||
<div>
|
||||
Hello World
|
||||
@@ -12,7 +12,7 @@ exports[`renders correctly on big screens 1`] = `
|
||||
|
||||
exports[`renders correctly on small screens 1`] = `
|
||||
<div
|
||||
className="Flex-root TopBar-root Flex-flex Flex-halfItemGutter Flex-alignBaseline Flex-directionColumn"
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-alignBaseline Flex-directionColumn"
|
||||
>
|
||||
<div>
|
||||
Hello World
|
||||
|
||||
@@ -53,12 +53,12 @@ export interface RTEProps {
|
||||
const features = [
|
||||
<Localized key="bold" id="comments-rte-bold" attrs={{ title: true }}>
|
||||
<Bold>
|
||||
<Icon>format_bold</Icon>
|
||||
<Icon size="md">format_bold</Icon>
|
||||
</Bold>
|
||||
</Localized>,
|
||||
<Localized key="italic" id="comments-rte-italic" attrs={{ title: true }}>
|
||||
<Italic>
|
||||
<Icon>format_italic</Icon>
|
||||
<Icon size="md">format_italic</Icon>
|
||||
</Italic>
|
||||
</Localized>,
|
||||
<Localized
|
||||
@@ -67,7 +67,7 @@ const features = [
|
||||
attrs={{ title: true }}
|
||||
>
|
||||
<Blockquote key="blockquote">
|
||||
<Icon>format_quote</Icon>
|
||||
<Icon size="md">format_quote</Icon>
|
||||
</Blockquote>
|
||||
</Localized>,
|
||||
];
|
||||
|
||||
@@ -12,7 +12,8 @@ const ReplyListN = removeFragmentRefs(ReplyList);
|
||||
|
||||
it("renders correctly", () => {
|
||||
const props: PropTypesOf<typeof ReplyListN> = {
|
||||
commentID: "comment-id",
|
||||
asset: { id: "asset-id" },
|
||||
comment: { id: "comment-id" },
|
||||
comments: [{ id: "comment-1" }, { id: "comment-2" }],
|
||||
onShowAll: noop,
|
||||
hasMore: false,
|
||||
@@ -24,7 +25,8 @@ it("renders correctly", () => {
|
||||
|
||||
describe("when there is more", () => {
|
||||
const props: PropTypesOf<typeof ReplyListN> = {
|
||||
commentID: "comment-id",
|
||||
asset: { id: "asset-id" },
|
||||
comment: { id: "comment-id" },
|
||||
comments: [{ id: "comment-1" }, { id: "comment-2" }],
|
||||
onShowAll: sinon.spy(),
|
||||
hasMore: true,
|
||||
|
||||
@@ -12,8 +12,10 @@ const StreamN = removeFragmentRefs(Stream);
|
||||
|
||||
it("renders correctly", () => {
|
||||
const props: PropTypesOf<typeof StreamN> = {
|
||||
assetID: "asset-id",
|
||||
isClosed: false,
|
||||
asset: {
|
||||
id: "asset-id",
|
||||
isClosed: false,
|
||||
},
|
||||
comments: [{ id: "comment-1" }, { id: "comment-2" }],
|
||||
onLoadMore: noop,
|
||||
disableLoadMore: false,
|
||||
@@ -27,8 +29,10 @@ it("renders correctly", () => {
|
||||
describe("when use is logged in", () => {
|
||||
it("renders correctly", () => {
|
||||
const props: PropTypesOf<typeof StreamN> = {
|
||||
assetID: "asset-id",
|
||||
isClosed: false,
|
||||
asset: {
|
||||
id: "asset-id",
|
||||
isClosed: false,
|
||||
},
|
||||
comments: [{ id: "comment-1" }, { id: "comment-2" }],
|
||||
onLoadMore: noop,
|
||||
disableLoadMore: false,
|
||||
@@ -42,8 +46,10 @@ describe("when use is logged in", () => {
|
||||
|
||||
describe("when there is more", () => {
|
||||
const props: PropTypesOf<typeof StreamN> = {
|
||||
assetID: "asset-id",
|
||||
isClosed: false,
|
||||
asset: {
|
||||
id: "asset-id",
|
||||
isClosed: false,
|
||||
},
|
||||
comments: [{ id: "comment-1" }, { id: "comment-2" }],
|
||||
onLoadMore: sinon.spy(),
|
||||
disableLoadMore: false,
|
||||
|
||||
@@ -18,7 +18,9 @@ exports[`renders correctly 1`] = `
|
||||
id="comments-rte-bold"
|
||||
>
|
||||
<Toggle>
|
||||
<withPropsOnChange(Icon)>
|
||||
<withPropsOnChange(Icon)
|
||||
size="md"
|
||||
>
|
||||
format_bold
|
||||
</withPropsOnChange(Icon)>
|
||||
</Toggle>
|
||||
@@ -32,7 +34,9 @@ exports[`renders correctly 1`] = `
|
||||
id="comments-rte-italic"
|
||||
>
|
||||
<Toggle>
|
||||
<withPropsOnChange(Icon)>
|
||||
<withPropsOnChange(Icon)
|
||||
size="md"
|
||||
>
|
||||
format_italic
|
||||
</withPropsOnChange(Icon)>
|
||||
</Toggle>
|
||||
@@ -46,7 +50,9 @@ exports[`renders correctly 1`] = `
|
||||
id="comments-rte-blockquote"
|
||||
>
|
||||
<Toggle>
|
||||
<withPropsOnChange(Icon)>
|
||||
<withPropsOnChange(Icon)
|
||||
size="md"
|
||||
>
|
||||
format_quote
|
||||
</withPropsOnChange(Icon)>
|
||||
</Toggle>
|
||||
|
||||
@@ -7,7 +7,12 @@ exports[`renders correctly 1`] = `
|
||||
role="log"
|
||||
>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-1",
|
||||
}
|
||||
@@ -15,7 +20,12 @@ exports[`renders correctly 1`] = `
|
||||
key="comment-1"
|
||||
/>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-2",
|
||||
}
|
||||
@@ -33,7 +43,12 @@ exports[`when there is more disables load more button 1`] = `
|
||||
role="log"
|
||||
>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-1",
|
||||
}
|
||||
@@ -41,7 +56,12 @@ exports[`when there is more disables load more button 1`] = `
|
||||
key="comment-1"
|
||||
/>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-2",
|
||||
}
|
||||
@@ -73,7 +93,12 @@ exports[`when there is more renders a load more button 1`] = `
|
||||
role="log"
|
||||
>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-1",
|
||||
}
|
||||
@@ -81,7 +106,12 @@ exports[`when there is more renders a load more button 1`] = `
|
||||
key="comment-1"
|
||||
/>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-2",
|
||||
}
|
||||
|
||||
@@ -22,13 +22,25 @@ exports[`renders correctly 1`] = `
|
||||
key="comment-1"
|
||||
>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-1",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<Relay(ReplyListContainer)
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-1",
|
||||
@@ -40,13 +52,25 @@ exports[`renders correctly 1`] = `
|
||||
key="comment-2"
|
||||
>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-2",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<Relay(ReplyListContainer)
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-2",
|
||||
@@ -80,13 +104,25 @@ exports[`when there is more disables load more button 1`] = `
|
||||
key="comment-1"
|
||||
>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-1",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<Relay(ReplyListContainer)
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-1",
|
||||
@@ -98,13 +134,25 @@ exports[`when there is more disables load more button 1`] = `
|
||||
key="comment-2"
|
||||
>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-2",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<Relay(ReplyListContainer)
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-2",
|
||||
@@ -152,13 +200,25 @@ exports[`when there is more renders a load more button 1`] = `
|
||||
key="comment-1"
|
||||
>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-1",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<Relay(ReplyListContainer)
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-1",
|
||||
@@ -170,13 +230,25 @@ exports[`when there is more renders a load more button 1`] = `
|
||||
key="comment-2"
|
||||
>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-2",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<Relay(ReplyListContainer)
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-2",
|
||||
@@ -226,13 +298,25 @@ exports[`when use is logged in renders correctly 1`] = `
|
||||
key="comment-1"
|
||||
>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-1",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<Relay(ReplyListContainer)
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-1",
|
||||
@@ -244,13 +328,25 @@ exports[`when use is logged in renders correctly 1`] = `
|
||||
key="comment-2"
|
||||
>
|
||||
<Relay(CommentContainer)
|
||||
data={
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-2",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<Relay(ReplyListContainer)
|
||||
asset={
|
||||
Object {
|
||||
"id": "asset-id",
|
||||
"isClosed": false,
|
||||
}
|
||||
}
|
||||
comment={
|
||||
Object {
|
||||
"id": "comment-2",
|
||||
|
||||
Reference in New Issue
Block a user