-
Notifications
You must be signed in to change notification settings - Fork 583
/
Copy pathArticleBody.tests.tsx
28 lines (25 loc) · 1.03 KB
/
ArticleBody.tests.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { screen } from "@testing-library/react-native"
import { ArticleBody } from "app/Scenes/Article/Components/ArticleBody"
import { ArticleHero } from "app/Scenes/Article/Components/ArticleHero"
import { ArticleSection } from "app/Scenes/Article/Components/ArticleSection"
import { ArticleSectionImageCollection } from "app/Scenes/Article/Components/Sections/ArticleSectionImageCollection/ArticleSectionImageCollection"
import { setupTestWrapper } from "app/utils/tests/setupTestWrapper"
import { graphql } from "react-relay"
describe("ArticleBody", () => {
const { renderWithRelay } = setupTestWrapper({
Component: ArticleBody,
query: graphql`
query ArticleBodyTestQuery {
article(id: "foo") {
...ArticleBody_article
}
}
`,
})
it("renders", () => {
renderWithRelay()
expect(screen.UNSAFE_getByType(ArticleHero)).toBeTruthy()
expect(screen.UNSAFE_getByType(ArticleSection)).toBeTruthy()
expect(screen.UNSAFE_getByType(ArticleSectionImageCollection)).toBeTruthy()
})
})