Integrate actual translations into integration tests

This commit is contained in:
Chi Vinh Le
2018-08-29 22:55:13 +02:00
parent 0b3a67601c
commit a99fe3c0ff
24 changed files with 972 additions and 78 deletions
@@ -57,6 +57,7 @@ exports[`loads more comments 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Bold"
type="button"
>
<span
@@ -70,6 +71,7 @@ exports[`loads more comments 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Italic"
type="button"
>
<span
@@ -83,6 +85,7 @@ exports[`loads more comments 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Blockquote"
type="button"
>
<span
@@ -312,6 +315,7 @@ exports[`renders comment stream 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Bold"
type="button"
>
<span
@@ -325,6 +329,7 @@ exports[`renders comment stream 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Italic"
type="button"
>
<span
@@ -338,6 +343,7 @@ exports[`renders comment stream 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Blockquote"
type="button"
>
<span
@@ -483,7 +489,7 @@ exports[`renders comment stream 1`] = `
onTouchEnd={[Function]}
type="button"
>
Load More
Load more
</button>
</div>
</div>
@@ -21,7 +21,7 @@ exports[`renders permalink view 1`] = `
target="_parent"
type="button"
>
Show all Comments
Show all comments
</a>
<div
className="Comment-root"
@@ -116,6 +116,7 @@ exports[`show all comments 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Bold"
type="button"
>
<span
@@ -129,6 +130,7 @@ exports[`show all comments 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Italic"
type="button"
>
<span
@@ -142,6 +144,7 @@ exports[`show all comments 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Blockquote"
type="button"
>
<span
@@ -21,7 +21,7 @@ exports[`renders permalink view with unknown asset 1`] = `
target="_parent"
type="button"
>
Show all Comments
Show all comments
</a>
<p
className="Typography-root Typography-bodyCopy Typography-colorTextPrimary"
@@ -21,7 +21,7 @@ exports[`renders permalink view with unknown comment 1`] = `
target="_parent"
type="button"
>
Show all Comments
Show all comments
</a>
<p
className="Typography-root Typography-bodyCopy Typography-colorTextPrimary"
@@ -89,6 +89,7 @@ exports[`show all comments 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Bold"
type="button"
>
<span
@@ -102,6 +103,7 @@ exports[`show all comments 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Italic"
type="button"
>
<span
@@ -115,6 +117,7 @@ exports[`show all comments 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Blockquote"
type="button"
>
<span
@@ -57,6 +57,7 @@ exports[`renders comment stream 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Bold"
type="button"
>
<span
@@ -70,6 +71,7 @@ exports[`renders comment stream 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Italic"
type="button"
>
<span
@@ -83,6 +85,7 @@ exports[`renders comment stream 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Blockquote"
type="button"
>
<span
@@ -57,6 +57,7 @@ exports[`renders comment stream 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Bold"
type="button"
>
<span
@@ -70,6 +71,7 @@ exports[`renders comment stream 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Italic"
type="button"
>
<span
@@ -83,6 +85,7 @@ exports[`renders comment stream 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Blockquote"
type="button"
>
<span
@@ -57,6 +57,7 @@ exports[`renders comment stream 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Bold"
type="button"
>
<span
@@ -70,6 +71,7 @@ exports[`renders comment stream 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Italic"
type="button"
>
<span
@@ -83,6 +85,7 @@ exports[`renders comment stream 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Blockquote"
type="button"
>
<span
@@ -231,7 +234,7 @@ exports[`renders comment stream 1`] = `
onTouchEnd={[Function]}
type="button"
>
Show All Replies
Show all
</button>
</div>
</div>
@@ -298,6 +301,7 @@ exports[`show all replies 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Bold"
type="button"
>
<span
@@ -311,6 +315,7 @@ exports[`show all replies 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Italic"
type="button"
>
<span
@@ -324,6 +329,7 @@ exports[`show all replies 1`] = `
className="Button-button"
disabled={false}
onClick={[Function]}
title="Blockquote"
type="button"
>
<span
@@ -0,0 +1,10 @@
import path from "path";
import { createFluentBundle } from "talk-framework/testHelpers";
export default function create() {
return createFluentBundle(
"stream",
path.resolve(__dirname, "../../../../locales/en-US")
);
}
@@ -10,6 +10,7 @@ import { createInMemoryStorage } from "talk-framework/lib/storage";
import AppContainer from "talk-stream/containers/AppContainer";
import createEnvironment from "./createEnvironment";
import createFluentBundle from "./createFluentBundle";
import createNodeMock from "./createNodeMock";
import { assets, comments } from "./fixtures";
@@ -78,7 +79,7 @@ beforeEach(() => {
const context: TalkContext = {
relayEnvironment: environment,
localeBundles: [],
localeBundles: [createFluentBundle()],
localStorage: createInMemoryStorage(),
sessionStorage: createInMemoryStorage(),
rest: new RestClient("http://localhost/api"),
@@ -11,6 +11,7 @@ import { createInMemoryStorage } from "talk-framework/lib/storage";
import AppContainer from "talk-stream/containers/AppContainer";
import createEnvironment from "./createEnvironment";
import createFluentBundle from "./createFluentBundle";
import createNodeMock from "./createNodeMock";
import { assets, comments } from "./fixtures";
@@ -63,7 +64,7 @@ beforeEach(() => {
const context: TalkContext = {
relayEnvironment: environment,
localeBundles: [],
localeBundles: [createFluentBundle()],
localStorage: createInMemoryStorage(),
sessionStorage: createInMemoryStorage(),
rest: new RestClient("http://localhost/api"),
@@ -10,6 +10,7 @@ import { createInMemoryStorage } from "talk-framework/lib/storage";
import AppContainer from "talk-stream/containers/AppContainer";
import createEnvironment from "./createEnvironment";
import createFluentBundle from "./createFluentBundle";
import createNodeMock from "./createNodeMock";
let testRenderer: ReactTestRenderer;
@@ -34,7 +35,7 @@ beforeEach(() => {
const context: TalkContext = {
relayEnvironment: environment,
localeBundles: [],
localeBundles: [createFluentBundle()],
localStorage: createInMemoryStorage(),
sessionStorage: createInMemoryStorage(),
rest: new RestClient("http://localhost/api"),
@@ -11,6 +11,7 @@ import { createInMemoryStorage } from "talk-framework/lib/storage";
import AppContainer from "talk-stream/containers/AppContainer";
import createEnvironment from "./createEnvironment";
import createFluentBundle from "./createFluentBundle";
import createNodeMock from "./createNodeMock";
import { assets, comments } from "./fixtures";
@@ -59,7 +60,7 @@ beforeEach(() => {
const context: TalkContext = {
relayEnvironment: environment,
localeBundles: [],
localeBundles: [createFluentBundle()],
localStorage: createInMemoryStorage(),
sessionStorage: createInMemoryStorage(),
rest: new RestClient("http://localhost/api"),
@@ -11,6 +11,7 @@ import { createInMemoryStorage } from "talk-framework/lib/storage";
import AppContainer from "talk-stream/containers/AppContainer";
import createEnvironment from "./createEnvironment";
import createFluentBundle from "./createFluentBundle";
import createNodeMock from "./createNodeMock";
import { assetWithReplies } from "./fixtures";
@@ -38,7 +39,7 @@ beforeEach(() => {
const context: TalkContext = {
relayEnvironment: environment,
localeBundles: [],
localeBundles: [createFluentBundle()],
localStorage: createInMemoryStorage(),
sessionStorage: createInMemoryStorage(),
rest: new RestClient("http://localhost/api"),
@@ -11,6 +11,7 @@ import { createInMemoryStorage } from "talk-framework/lib/storage";
import AppContainer from "talk-stream/containers/AppContainer";
import createEnvironment from "./createEnvironment";
import createFluentBundle from "./createFluentBundle";
import createNodeMock from "./createNodeMock";
import { assets } from "./fixtures";
@@ -38,7 +39,7 @@ beforeEach(() => {
const context: TalkContext = {
relayEnvironment: environment,
localeBundles: [],
localeBundles: [createFluentBundle()],
localStorage: createInMemoryStorage(),
sessionStorage: createInMemoryStorage(),
rest: new RestClient("http://localhost/api"),
@@ -11,6 +11,7 @@ import { createInMemoryStorage } from "talk-framework/lib/storage";
import AppContainer from "talk-stream/containers/AppContainer";
import createEnvironment from "./createEnvironment";
import createFluentBundle from "./createFluentBundle";
import createNodeMock from "./createNodeMock";
import { assets, comments } from "./fixtures";
@@ -95,7 +96,7 @@ beforeEach(() => {
const context: TalkContext = {
relayEnvironment: environment,
localeBundles: [],
localeBundles: [createFluentBundle()],
localStorage: createInMemoryStorage(),
sessionStorage: createInMemoryStorage(),
rest: new RestClient("http://localhost/api"),