Rename BlogPostCell -> ArticleCell
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import BlogPost from 'src/components/BlogPost'
|
||||
|
||||
export const QUERY = gql`
|
||||
query BlogPostQuery($id: Int!) {
|
||||
post(id: $id) {
|
||||
query ArticleQuery($id: Int!) {
|
||||
article: post(id: $id) {
|
||||
id
|
||||
title
|
||||
body
|
||||
@@ -17,6 +17,6 @@ export const Empty = () => <div>Empty</div>
|
||||
|
||||
export const Failure = ({ error }) => <div>Error: {error.message}</div>
|
||||
|
||||
export const Success = ({ post }) => {
|
||||
return <BlogPost post={post} />
|
||||
export const Success = ({ article }) => {
|
||||
return <Article article={article} />
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Loading, Empty, Failure, Success } from './BlogPostCell'
|
||||
import { standard } from './BlogPostCell.mock'
|
||||
import { Loading, Empty, Failure, Success } from './ArticleCell'
|
||||
import { standard } from './ArticleCell.mock'
|
||||
|
||||
export const loading = () => {
|
||||
return Loading ? <Loading /> : null
|
||||
@@ -17,4 +17,4 @@ export const success = () => {
|
||||
return Success ? <Success {...standard()} /> : null
|
||||
}
|
||||
|
||||
export default { title: 'Cells/BlogPostCell' }
|
||||
export default { title: 'Cells/ArticleCell' }
|
||||
@@ -1,8 +1,8 @@
|
||||
import { render, screen } from '@redwoodjs/testing'
|
||||
import { Loading, Empty, Failure, Success } from './BlogPostCell'
|
||||
import { standard } from './BlogPostCell.mock'
|
||||
import { Loading, Empty, Failure, Success } from './ArticleCell'
|
||||
import { standard } from './ArticleCell.mock'
|
||||
|
||||
describe('BlogPostCell', () => {
|
||||
describe('ArticleCell', () => {
|
||||
test('Loading renders successfully', () => {
|
||||
expect(() => {
|
||||
render(<Loading />)
|
||||
Reference in New Issue
Block a user