mirror of
https://github.com/wassname/talk.git
synced 2026-08-11 11:27:10 +08:00
Using fragment and updated fixtures
This commit is contained in:
@@ -27,7 +27,7 @@ exports[`cancel edit: edit canceled 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -436,7 +436,7 @@ exports[`edit a comment: edit form 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -920,7 +920,7 @@ exports[`edit a comment: optimistic response 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -1404,7 +1404,7 @@ exports[`edit a comment: render stream 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -1813,7 +1813,7 @@ exports[`edit a comment: server response 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -2231,7 +2231,7 @@ exports[`shows expiry message: edit form closed 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -2640,7 +2640,7 @@ exports[`shows expiry message: edit time expired 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
|
||||
@@ -433,7 +433,7 @@ exports[`renders comment stream 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -27,7 +27,7 @@ exports[`renders permalink view 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
+2
-40
@@ -1,45 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`renders permalink view with unknown asset 1`] = `
|
||||
<div
|
||||
className="HorizontalGutter-root App-root HorizontalGutter-full"
|
||||
>
|
||||
<ul
|
||||
className="TabBar-root TabBar-primary"
|
||||
role="tablist"
|
||||
>
|
||||
<li
|
||||
className="Tab-root"
|
||||
id="tab-COMMENTS"
|
||||
role="presentation"
|
||||
>
|
||||
<button
|
||||
aria-controls="tabPane-COMMENTS"
|
||||
aria-selected={true}
|
||||
className="BaseButton-root Tab-button Tab-primary Tab-active"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseDown={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<section
|
||||
aria-labelledby="tab-COMMENTS"
|
||||
className="App-tabContent"
|
||||
id="tabPane-COMMENTS"
|
||||
role="tabpanel"
|
||||
>
|
||||
<div>
|
||||
Asset not found
|
||||
</div>
|
||||
</section>
|
||||
<div>
|
||||
Asset not found
|
||||
</div>
|
||||
`;
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ exports[`renders permalink view with unknown comment 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -27,7 +27,7 @@ exports[`post a comment: optimistic response 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
3 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -504,7 +504,7 @@ exports[`post a comment: server response 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
3 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -971,7 +971,7 @@ exports[`renders comment stream 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
|
||||
@@ -27,7 +27,7 @@ exports[`post a reply: open reply form 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
1 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -889,7 +889,7 @@ exports[`post a reply: optimistic response 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
1 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -1824,7 +1824,7 @@ exports[`post a reply: server response 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
1 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -2622,7 +2622,7 @@ exports[`renders comment stream 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
1 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
|
||||
@@ -27,7 +27,7 @@ exports[`post a reply: open reply form 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -547,7 +547,7 @@ exports[`post a reply: optimistic response 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
3 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -1157,7 +1157,7 @@ exports[`post a reply: server response 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
3 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
@@ -1630,7 +1630,7 @@ exports[`renders comment stream 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
|
||||
@@ -27,7 +27,7 @@ exports[`renders comment stream 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
1 Comments
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -27,7 +27,7 @@ exports[`renders comment stream 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -27,7 +27,7 @@ exports[`renders comment stream 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
2 Comments
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -27,7 +27,7 @@ exports[`renders comment stream 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
1 Comments
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -701,7 +701,7 @@ exports[`shows conversation 1`] = `
|
||||
role="tab"
|
||||
type="button"
|
||||
>
|
||||
6 Comments
|
||||
1 Comments
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -10,12 +10,12 @@ import { PostMessageService } from "talk-framework/lib/postMessage";
|
||||
import { RestClient } from "talk-framework/lib/rest";
|
||||
import { createPromisifiedStorage } from "talk-framework/lib/storage";
|
||||
import { createUUIDGenerator } from "talk-framework/testHelpers";
|
||||
import AppContainer from "talk-stream/containers/AppContainer";
|
||||
|
||||
import createEnvironment from "./createEnvironment";
|
||||
import createFluentBundle from "./createFluentBundle";
|
||||
import createNodeMock from "./createNodeMock";
|
||||
import { comments } from "./fixtures";
|
||||
|
||||
import AppQuery from "../queries/AppQuery";
|
||||
|
||||
export interface CreateParams {
|
||||
logNetwork?: boolean;
|
||||
@@ -54,7 +54,7 @@ export default function create(params: CreateParams) {
|
||||
|
||||
const testRenderer = TestRenderer.create(
|
||||
<TalkContextProvider value={context}>
|
||||
<AppContainer commentCount={comments.length} />
|
||||
<AppQuery />
|
||||
</TalkContextProvider>,
|
||||
{ createNodeMock }
|
||||
);
|
||||
|
||||
@@ -93,6 +93,9 @@ export const assets = [
|
||||
id: "asset-1",
|
||||
url: "http://localhost/assets/asset-1",
|
||||
isClosed: false,
|
||||
commentCounts: {
|
||||
totalVisible: 2,
|
||||
},
|
||||
comments: {
|
||||
edges: [
|
||||
{ node: comments[0], cursor: comments[0].createdAt },
|
||||
@@ -160,6 +163,9 @@ export const assetWithReplies = {
|
||||
hasNextPage: false,
|
||||
},
|
||||
},
|
||||
commentCounts: {
|
||||
totalVisible: 1,
|
||||
},
|
||||
};
|
||||
|
||||
export const assetWithDeepReplies = {
|
||||
@@ -178,6 +184,9 @@ export const assetWithDeepReplies = {
|
||||
hasNextPage: false,
|
||||
},
|
||||
},
|
||||
commentCounts: {
|
||||
totalVisible: 1,
|
||||
},
|
||||
};
|
||||
|
||||
export const commentWithDeepestReplies = {
|
||||
@@ -292,4 +301,7 @@ export const assetWithDeepestReplies = {
|
||||
hasNextPage: false,
|
||||
},
|
||||
},
|
||||
commentCounts: {
|
||||
totalVisible: 1,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user