Skip to content

Commit

Permalink
update manual story data
Browse files Browse the repository at this point in the history
  • Loading branch information
abeddow91 committed Jan 24, 2024
1 parent f39daf4 commit b6dd805
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions dotcom-rendering/src/components/Discussion/Comments.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { css } from '@emotion/react';
import { ArticleDesign, ArticleDisplay, Pillar } from '@guardian/libs';
import { legacyDiscussionWithoutThreading } from 'fixtures/manual/legacyDiscussionWithoutThreading';
import { splitTheme } from '../../../.storybook/decorators/splitThemeDecorator';
import { lightDecorator } from '../../../.storybook/decorators/themeDecorator';
import { discussion as discussionMock } from '../../../fixtures/manual/discussion';
Expand All @@ -9,8 +10,6 @@ import { Comments } from './Comments';

export default { component: Comments, title: 'Discussion/App' };

const { discussion, pages } = discussionMock;

const aUser: SignedInUser = {
profile: {
userId: 'abc123',
Expand Down Expand Up @@ -49,7 +48,7 @@ export const LoggedOutHiddenPicks = () => (
`}
>
<Comments
shortUrl={discussion.key}
shortUrl={discussionMock.discussion.key}
baseUrl="https://discussion.theguardian.com/discussion-api"
isClosedForComments={false}
additionalHeaders={{
Expand All @@ -65,10 +64,10 @@ export const LoggedOutHiddenPicks = () => (
setPage={() => {}}
filters={filters}
setFilters={() => {}}
commentCount={discussion.commentCount}
commentCount={discussionMock.discussion.commentCount}
loading={false}
totalPages={pages}
comments={discussion.comments}
totalPages={discussionMock.pages}
comments={discussionMock.discussion.comments}
setComments={() => {}}
/>
</div>
Expand All @@ -91,7 +90,7 @@ export const InitialPage = () => (
`}
>
<Comments
shortUrl={discussion.key}
shortUrl={discussionMock.discussion.key}
baseUrl="https://discussion.theguardian.com/discussion-api"
isClosedForComments={false}
additionalHeaders={{
Expand All @@ -107,10 +106,10 @@ export const InitialPage = () => (
setPage={() => {}}
filters={filters}
setFilters={() => {}}
commentCount={discussion.commentCount}
commentCount={discussionMock.discussion.commentCount}
loading={false}
totalPages={pages}
comments={discussion.comments}
totalPages={discussionMock.pages}
comments={discussionMock.discussion.comments}
setComments={() => {}}
/>
</div>
Expand Down Expand Up @@ -150,10 +149,10 @@ export const LoggedInHiddenNoPicks = () => (
setPage={() => {}}
filters={filters}
setFilters={() => {}}
commentCount={discussion.commentCount}
commentCount={discussionMock.discussion.commentCount}
loading={false}
totalPages={pages}
comments={discussion.comments}
totalPages={discussionMock.pages}
comments={discussionMock.discussion.comments}
setComments={() => {}}
/>
</div>
Expand Down Expand Up @@ -187,10 +186,10 @@ export const LoggedIn = () => (
setPage={() => {}}
filters={filters}
setFilters={() => {}}
commentCount={discussion.commentCount}
commentCount={discussionMock.discussion.commentCount}
loading={false}
totalPages={pages}
comments={discussion.comments}
totalPages={discussionMock.pages}
comments={discussionMock.discussion.comments}
setComments={() => {}}
/>
</div>
Expand Down Expand Up @@ -258,10 +257,10 @@ export const LoggedOutHiddenNoPicks = () => (
setPage={() => {}}
filters={filters}
setFilters={() => {}}
commentCount={0}
commentCount={discussionMock.discussion.commentCount}
loading={false}
totalPages={0}
comments={[]}
comments={discussionMock.discussion.comments}
setComments={() => {}}
/>
</div>
Expand All @@ -285,7 +284,7 @@ export const Closed = () => (
`}
>
<Comments
shortUrl={discussion.key}
shortUrl={discussionMock.discussion.key}
baseUrl="https://discussion.theguardian.com/discussion-api"
isClosedForComments={true}
user={aUser}
Expand All @@ -302,10 +301,10 @@ export const Closed = () => (
setPage={() => {}}
filters={filters}
setFilters={() => {}}
commentCount={discussion.commentCount}
commentCount={discussionMock.discussion.commentCount}
loading={false}
totalPages={pages}
comments={discussion.comments}
totalPages={discussionMock.pages}
comments={discussionMock.discussion.comments}
setComments={() => {}}
/>
</div>
Expand Down Expand Up @@ -370,7 +369,7 @@ export const LegacyDiscussion = () => (
`}
>
<Comments
shortUrl="p/32255" // A 'legacy' discussion that doesn't allow threading
shortUrl={legacyDiscussionWithoutThreading.discussion.key} // A 'legacy' discussion that doesn't allow threading
baseUrl="https://discussion.theguardian.com/discussion-api"
isClosedForComments={false}
additionalHeaders={{
Expand All @@ -386,10 +385,12 @@ export const LegacyDiscussion = () => (
setPage={() => {}}
filters={filters}
setFilters={() => {}}
commentCount={discussion.commentCount}
commentCount={
legacyDiscussionWithoutThreading.discussion.commentCount
}
loading={false}
totalPages={pages}
comments={discussion.comments}
totalPages={legacyDiscussionWithoutThreading.pages}
comments={legacyDiscussionWithoutThreading.discussion.comments}
setComments={() => {}}
/>
</div>
Expand Down

0 comments on commit b6dd805

Please sign in to comment.