Rename BlogPostCell -> ArticleCell

This commit is contained in:
Rob Cameron
2022-02-08 14:59:00 -08:00
parent eea72ec710
commit bcd217e1d9
4 changed files with 10 additions and 10 deletions

View File

@@ -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} />
}

View File

@@ -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' }

View File

@@ -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 />)