mirror of
https://github.com/wassname/talk.git
synced 2026-08-17 11:27:52 +08:00
[CORL-349] Show banned user info (#2319)
* feat: stream banned state ui * fix: button color * fix: banned permissions * test: add tests and hide edit * fix: show reaction button and adapt snapshots * fix: snapshot
This commit is contained in:
@@ -52,13 +52,13 @@ export function denormalizeStory(story: Fixture<GQLStory>) {
|
||||
endCursor: null,
|
||||
hasNextPage: false,
|
||||
};
|
||||
return {
|
||||
return createFixture<GQLStory>({
|
||||
...story,
|
||||
comments: { edges: commentNodes, pageInfo: commentsPageInfo },
|
||||
commentCounts: {
|
||||
totalVisible: commentNodes.length,
|
||||
},
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
export function denormalizeStories(storyList: Array<Fixture<GQLStory>>) {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import React, { FunctionComponent } from "react";
|
||||
|
||||
import { CallOut, HorizontalGutter, Typography } from "coral-ui/components";
|
||||
|
||||
const BannedInfo: FunctionComponent = props => {
|
||||
return (
|
||||
<CallOut fullWidth>
|
||||
<HorizontalGutter>
|
||||
<Typography variant="heading3">
|
||||
Your account has been banned from commenting.
|
||||
</Typography>
|
||||
<Typography variant="bodyCopy">
|
||||
Someone with access to your account has violated our community
|
||||
guidelines. As a result, your account has been banned. You will no
|
||||
longer be able to comment, respect or report comments. if you think
|
||||
this has been done in error, please contact our community team.
|
||||
</Typography>
|
||||
</HorizontalGutter>
|
||||
</CallOut>
|
||||
);
|
||||
};
|
||||
|
||||
export default BannedInfo;
|
||||
@@ -0,0 +1,5 @@
|
||||
.readOnly {
|
||||
cursor: not-allowed !important;
|
||||
color: var(--palette-text-primary) !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
import cn from "classnames";
|
||||
import React from "react";
|
||||
|
||||
import { Button, ButtonIcon, MatchMedia } from "coral-ui/components";
|
||||
|
||||
import styles from "./ReactionButton.css";
|
||||
|
||||
interface ReactionButtonProps {
|
||||
onClick: () => void;
|
||||
totalReactions: number;
|
||||
@@ -10,14 +13,21 @@ interface ReactionButtonProps {
|
||||
labelActive: string;
|
||||
icon: string;
|
||||
iconActive: string | null;
|
||||
readOnly?: boolean;
|
||||
// color: string;
|
||||
}
|
||||
|
||||
class ReactionButton extends React.Component<ReactionButtonProps> {
|
||||
public render() {
|
||||
const { totalReactions, reacted } = this.props;
|
||||
const { totalReactions, reacted, readOnly } = this.props;
|
||||
return (
|
||||
<Button variant="ghost" size="small" onClick={this.props.onClick}>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="small"
|
||||
onClick={this.props.onClick}
|
||||
disabled={readOnly}
|
||||
className={cn({ [styles.readOnly]: readOnly })}
|
||||
>
|
||||
<MatchMedia gtWidth="xs">
|
||||
<ButtonIcon>
|
||||
{reacted
|
||||
|
||||
@@ -12,6 +12,7 @@ import PostCommentFormContainer from "../containers/PostCommentFormContainer";
|
||||
import ReplyListContainer from "../containers/ReplyListContainer";
|
||||
import SortMenu from "./SortMenu";
|
||||
|
||||
import BannedInfo from "./BannedInfo";
|
||||
import styles from "./Stream.css";
|
||||
|
||||
export interface StreamProps {
|
||||
@@ -45,6 +46,7 @@ export interface StreamProps {
|
||||
orderBy: PropTypesOf<typeof SortMenu>["orderBy"];
|
||||
onChangeOrderBy: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
||||
refetching?: boolean;
|
||||
banned?: boolean;
|
||||
}
|
||||
|
||||
const Stream: FunctionComponent<StreamProps> = props => {
|
||||
@@ -52,7 +54,13 @@ const Stream: FunctionComponent<StreamProps> = props => {
|
||||
<HorizontalGutter className={styles.root} size="double">
|
||||
<UserBoxContainer viewer={props.viewer} settings={props.settings} />
|
||||
<CommunityGuidelinesContainer settings={props.settings} />
|
||||
<PostCommentFormContainer settings={props.settings} story={props.story} />
|
||||
{!props.banned && (
|
||||
<PostCommentFormContainer
|
||||
settings={props.settings}
|
||||
story={props.story}
|
||||
/>
|
||||
)}
|
||||
{props.banned && <BannedInfo />}
|
||||
{props.comments.length > 0 && (
|
||||
<SortMenu
|
||||
orderBy={props.orderBy}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { graphql } from "react-relay";
|
||||
import { isBeforeDate } from "coral-common/utils";
|
||||
import { getURLWithCommentID } from "coral-framework/helpers";
|
||||
import withFragmentContainer from "coral-framework/lib/relay/withFragmentContainer";
|
||||
import { GQLUSER_STATUS } from "coral-framework/schema";
|
||||
import { PropTypesOf } from "coral-framework/types";
|
||||
import { CommentContainer_comment as CommentData } from "coral-stream/__generated__/CommentContainer_comment.graphql";
|
||||
import { CommentContainer_settings as SettingsData } from "coral-stream/__generated__/CommentContainer_settings.graphql";
|
||||
@@ -16,8 +17,8 @@ import {
|
||||
withSetCommentIDMutation,
|
||||
withShowAuthPopupMutation,
|
||||
} from "coral-stream/mutations";
|
||||
|
||||
import { Button, Flex, HorizontalGutter } from "coral-ui/components";
|
||||
|
||||
import ReactionButtonContainer from "./ReactionButtonContainer";
|
||||
|
||||
import Comment, {
|
||||
@@ -83,8 +84,14 @@ export class CommentContainer extends Component<Props, State> {
|
||||
this.props.comment.author &&
|
||||
this.props.viewer.id === this.props.comment.author.id
|
||||
);
|
||||
const banned = Boolean(
|
||||
this.props.viewer &&
|
||||
this.props.viewer.status.current.includes(GQLUSER_STATUS.BANNED)
|
||||
);
|
||||
return (
|
||||
isMyComment && isBeforeDate(this.props.comment.editing.editableUntil)
|
||||
!banned &&
|
||||
isMyComment &&
|
||||
isBeforeDate(this.props.comment.editing.editableUntil)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -148,6 +155,10 @@ export class CommentContainer extends Component<Props, State> {
|
||||
viewer,
|
||||
} = this.props;
|
||||
const { showReplyDialog, showEditDialog, editable } = this.state;
|
||||
const banned = Boolean(
|
||||
this.props.viewer &&
|
||||
this.props.viewer.status.current.includes(GQLUSER_STATUS.BANNED)
|
||||
);
|
||||
if (showEditDialog) {
|
||||
return (
|
||||
<div data-testid={`comment-${comment.id}`}>
|
||||
@@ -201,7 +212,13 @@ export class CommentContainer extends Component<Props, State> {
|
||||
<>
|
||||
<Flex justifyContent="space-between">
|
||||
<ButtonsBar>
|
||||
{!disableReplies && (
|
||||
<ReactionButtonContainer
|
||||
comment={comment}
|
||||
settings={settings}
|
||||
viewer={viewer}
|
||||
readOnly={banned}
|
||||
/>
|
||||
{!disableReplies && !banned && (
|
||||
<ReplyButton
|
||||
id={`comments-commentContainer-replyButton-${
|
||||
comment.id
|
||||
@@ -217,14 +234,14 @@ export class CommentContainer extends Component<Props, State> {
|
||||
story={story}
|
||||
commentID={comment.id}
|
||||
/>
|
||||
<ReactionButtonContainer
|
||||
comment={comment}
|
||||
settings={settings}
|
||||
viewer={viewer}
|
||||
/>
|
||||
</ButtonsBar>
|
||||
<ButtonsBar>
|
||||
<ReportButtonContainer comment={comment} viewer={viewer} />
|
||||
{!banned && (
|
||||
<ReportButtonContainer
|
||||
comment={comment}
|
||||
viewer={viewer}
|
||||
/>
|
||||
)}
|
||||
</ButtonsBar>
|
||||
</Flex>
|
||||
{showConversationLink && (
|
||||
@@ -263,6 +280,9 @@ const enhanced = withSetCommentIDMutation(
|
||||
viewer: graphql`
|
||||
fragment CommentContainer_viewer on User {
|
||||
id
|
||||
status {
|
||||
current
|
||||
}
|
||||
...ReactionButtonContainer_viewer
|
||||
...ReportButtonContainer_viewer
|
||||
}
|
||||
|
||||
@@ -18,18 +18,17 @@ import {
|
||||
withShowAuthPopupMutation,
|
||||
} from "coral-stream/mutations";
|
||||
|
||||
interface ReactionButtonContainerProps {
|
||||
interface Props {
|
||||
createCommentReaction: CreateCommentReactionMutation;
|
||||
removeCommentReaction: RemoveCommentReactionMutation;
|
||||
comment: CommentData;
|
||||
settings: SettingsData;
|
||||
viewer: ViewerData | null;
|
||||
showAuthPopup: ShowAuthPopupMutation;
|
||||
readOnly?: boolean;
|
||||
}
|
||||
|
||||
class ReactionButtonContainer extends React.Component<
|
||||
ReactionButtonContainerProps
|
||||
> {
|
||||
class ReactionButtonContainer extends React.Component<Props> {
|
||||
private handleSignIn = () => this.props.showAuthPopup({ view: "SIGN_IN" });
|
||||
|
||||
private handleClick = () => {
|
||||
@@ -53,6 +52,7 @@ class ReactionButtonContainer extends React.Component<
|
||||
};
|
||||
|
||||
public render() {
|
||||
const { readOnly } = this.props;
|
||||
const {
|
||||
actionCounts: {
|
||||
reaction: { total: totalReactions },
|
||||
@@ -66,7 +66,7 @@ class ReactionButtonContainer extends React.Component<
|
||||
this.props.comment.viewerActionPresence &&
|
||||
this.props.comment.viewerActionPresence.reaction;
|
||||
|
||||
return (
|
||||
return !readOnly || totalReactions > 0 ? (
|
||||
<ReactionButton
|
||||
onClick={this.handleClick}
|
||||
totalReactions={totalReactions}
|
||||
@@ -75,15 +75,16 @@ class ReactionButtonContainer extends React.Component<
|
||||
labelActive={labelActive}
|
||||
icon={icon}
|
||||
iconActive={iconActive}
|
||||
readOnly={readOnly}
|
||||
/>
|
||||
);
|
||||
) : null;
|
||||
}
|
||||
}
|
||||
|
||||
export default withShowAuthPopupMutation(
|
||||
withRemoveCommentReactionMutation(
|
||||
withCreateCommentReactionMutation(
|
||||
withFragmentContainer<ReactionButtonContainerProps>({
|
||||
withFragmentContainer<Props>({
|
||||
viewer: graphql`
|
||||
fragment ReactionButtonContainer_viewer on User {
|
||||
id
|
||||
|
||||
@@ -2,6 +2,7 @@ import React, { ChangeEvent } from "react";
|
||||
import { graphql, RelayPaginationProp } from "react-relay";
|
||||
|
||||
import { withPaginationContainer } from "coral-framework/lib/relay";
|
||||
import { GQLUSER_STATUS } from "coral-framework/schema";
|
||||
import { Omit, PropTypesOf } from "coral-framework/types";
|
||||
import { StreamContainer_settings as SettingsData } from "coral-stream/__generated__/StreamContainer_settings.graphql";
|
||||
import { StreamContainer_story as StoryData } from "coral-stream/__generated__/StreamContainer_story.graphql";
|
||||
@@ -73,6 +74,10 @@ export class StreamContainer extends React.Component<Props> {
|
||||
orderBy={this.orderBy}
|
||||
onChangeOrderBy={this.handleOnChangeOrderBy}
|
||||
refetching={this.state.refetching}
|
||||
banned={Boolean(
|
||||
this.props.viewer &&
|
||||
this.props.viewer.status.current.includes(GQLUSER_STATUS.BANNED)
|
||||
)}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
@@ -140,6 +145,9 @@ const enhanced = withPaginationContainer<
|
||||
...UserBoxContainer_viewer
|
||||
...CreateCommentReplyMutation_viewer
|
||||
...CreateCommentMutation_viewer
|
||||
status {
|
||||
current
|
||||
}
|
||||
}
|
||||
`,
|
||||
settings: graphql`
|
||||
|
||||
+122
-114
@@ -15,15 +15,6 @@ exports[`hide reply button 1`] = `
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<ButtonsBar>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<withContext(createMutationContainer(withContext(createMutationContainer(withContext(createMutationContainer(Relay(ReactionButtonContainer)))))))
|
||||
comment={
|
||||
Object {
|
||||
@@ -44,6 +35,7 @@ exports[`hide reply button 1`] = `
|
||||
"tags": Array [],
|
||||
}
|
||||
}
|
||||
readOnly={false}
|
||||
settings={
|
||||
Object {
|
||||
"disableCommenting": Object {
|
||||
@@ -53,6 +45,15 @@ exports[`hide reply button 1`] = `
|
||||
}
|
||||
viewer={null}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
</ButtonsBar>
|
||||
<ButtonsBar>
|
||||
<withContext(createMutationContainer(Relay(ReportButtonContainer)))
|
||||
@@ -106,21 +107,6 @@ exports[`renders body only 1`] = `
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<ButtonsBar>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={false}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<withContext(createMutationContainer(withContext(createMutationContainer(withContext(createMutationContainer(Relay(ReactionButtonContainer)))))))
|
||||
comment={
|
||||
Object {
|
||||
@@ -141,6 +127,7 @@ exports[`renders body only 1`] = `
|
||||
"tags": Array [],
|
||||
}
|
||||
}
|
||||
readOnly={false}
|
||||
settings={
|
||||
Object {
|
||||
"disableCommenting": Object {
|
||||
@@ -150,6 +137,21 @@ exports[`renders body only 1`] = `
|
||||
}
|
||||
viewer={null}
|
||||
/>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={false}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
</ButtonsBar>
|
||||
<ButtonsBar>
|
||||
<withContext(createMutationContainer(Relay(ReportButtonContainer)))
|
||||
@@ -203,21 +205,6 @@ exports[`renders disabled reply when commenting has been disabled 1`] = `
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<ButtonsBar>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={true}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<withContext(createMutationContainer(withContext(createMutationContainer(withContext(createMutationContainer(Relay(ReactionButtonContainer)))))))
|
||||
comment={
|
||||
Object {
|
||||
@@ -238,6 +225,7 @@ exports[`renders disabled reply when commenting has been disabled 1`] = `
|
||||
"tags": Array [],
|
||||
}
|
||||
}
|
||||
readOnly={false}
|
||||
settings={
|
||||
Object {
|
||||
"disableCommenting": Object {
|
||||
@@ -247,6 +235,21 @@ exports[`renders disabled reply when commenting has been disabled 1`] = `
|
||||
}
|
||||
viewer={null}
|
||||
/>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={true}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
</ButtonsBar>
|
||||
<ButtonsBar>
|
||||
<withContext(createMutationContainer(Relay(ReportButtonContainer)))
|
||||
@@ -300,21 +303,6 @@ exports[`renders disabled reply when story is closed 1`] = `
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<ButtonsBar>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={true}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": true,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<withContext(createMutationContainer(withContext(createMutationContainer(withContext(createMutationContainer(Relay(ReactionButtonContainer)))))))
|
||||
comment={
|
||||
Object {
|
||||
@@ -335,6 +323,7 @@ exports[`renders disabled reply when story is closed 1`] = `
|
||||
"tags": Array [],
|
||||
}
|
||||
}
|
||||
readOnly={false}
|
||||
settings={
|
||||
Object {
|
||||
"disableCommenting": Object {
|
||||
@@ -344,6 +333,21 @@ exports[`renders disabled reply when story is closed 1`] = `
|
||||
}
|
||||
viewer={null}
|
||||
/>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={true}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": true,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
</ButtonsBar>
|
||||
<ButtonsBar>
|
||||
<withContext(createMutationContainer(Relay(ReportButtonContainer)))
|
||||
@@ -397,21 +401,6 @@ exports[`renders in reply to 1`] = `
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<ButtonsBar>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={false}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<withContext(createMutationContainer(withContext(createMutationContainer(withContext(createMutationContainer(Relay(ReactionButtonContainer)))))))
|
||||
comment={
|
||||
Object {
|
||||
@@ -436,6 +425,7 @@ exports[`renders in reply to 1`] = `
|
||||
"tags": Array [],
|
||||
}
|
||||
}
|
||||
readOnly={false}
|
||||
settings={
|
||||
Object {
|
||||
"disableCommenting": Object {
|
||||
@@ -445,6 +435,21 @@ exports[`renders in reply to 1`] = `
|
||||
}
|
||||
viewer={null}
|
||||
/>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={false}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
</ButtonsBar>
|
||||
<ButtonsBar>
|
||||
<withContext(createMutationContainer(Relay(ReportButtonContainer)))
|
||||
@@ -502,21 +507,6 @@ exports[`renders staff badge 1`] = `
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<ButtonsBar>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={false}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<withContext(createMutationContainer(withContext(createMutationContainer(withContext(createMutationContainer(Relay(ReactionButtonContainer)))))))
|
||||
comment={
|
||||
Object {
|
||||
@@ -541,6 +531,7 @@ exports[`renders staff badge 1`] = `
|
||||
],
|
||||
}
|
||||
}
|
||||
readOnly={false}
|
||||
settings={
|
||||
Object {
|
||||
"disableCommenting": Object {
|
||||
@@ -550,6 +541,21 @@ exports[`renders staff badge 1`] = `
|
||||
}
|
||||
viewer={null}
|
||||
/>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={false}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
</ButtonsBar>
|
||||
<ButtonsBar>
|
||||
<withContext(createMutationContainer(Relay(ReportButtonContainer)))
|
||||
@@ -611,21 +617,6 @@ exports[`renders username and body 1`] = `
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<ButtonsBar>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={false}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<withContext(createMutationContainer(withContext(createMutationContainer(withContext(createMutationContainer(Relay(ReactionButtonContainer)))))))
|
||||
comment={
|
||||
Object {
|
||||
@@ -646,6 +637,7 @@ exports[`renders username and body 1`] = `
|
||||
"tags": Array [],
|
||||
}
|
||||
}
|
||||
readOnly={false}
|
||||
settings={
|
||||
Object {
|
||||
"disableCommenting": Object {
|
||||
@@ -655,6 +647,21 @@ exports[`renders username and body 1`] = `
|
||||
}
|
||||
viewer={null}
|
||||
/>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={false}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
</ButtonsBar>
|
||||
<ButtonsBar>
|
||||
<withContext(createMutationContainer(Relay(ReportButtonContainer)))
|
||||
@@ -708,21 +715,6 @@ exports[`shows conversation link 1`] = `
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<ButtonsBar>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={false}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<withContext(createMutationContainer(withContext(createMutationContainer(withContext(createMutationContainer(Relay(ReactionButtonContainer)))))))
|
||||
comment={
|
||||
Object {
|
||||
@@ -743,6 +735,7 @@ exports[`shows conversation link 1`] = `
|
||||
"tags": Array [],
|
||||
}
|
||||
}
|
||||
readOnly={false}
|
||||
settings={
|
||||
Object {
|
||||
"disableCommenting": Object {
|
||||
@@ -752,6 +745,21 @@ exports[`shows conversation link 1`] = `
|
||||
}
|
||||
viewer={null}
|
||||
/>
|
||||
<ReplyButton
|
||||
active={false}
|
||||
disabled={false}
|
||||
id="comments-commentContainer-replyButton-comment-id"
|
||||
onClick={[Function]}
|
||||
/>
|
||||
<Relay(PermalinkButtonContainer)
|
||||
commentID="comment-id"
|
||||
story={
|
||||
Object {
|
||||
"isClosed": false,
|
||||
"url": "http://localhost/story",
|
||||
}
|
||||
}
|
||||
/>
|
||||
</ButtonsBar>
|
||||
<ButtonsBar>
|
||||
<withContext(createMutationContainer(Relay(ReportButtonContainer)))
|
||||
|
||||
+4
@@ -25,6 +25,7 @@ exports[`renders correctly 1`] = `
|
||||
}
|
||||
/>
|
||||
<Stream
|
||||
banned={false}
|
||||
comments={
|
||||
Array [
|
||||
Object {
|
||||
@@ -97,6 +98,7 @@ exports[`when has more comments renders hasMore 1`] = `
|
||||
}
|
||||
/>
|
||||
<Stream
|
||||
banned={false}
|
||||
comments={
|
||||
Array [
|
||||
Object {
|
||||
@@ -170,6 +172,7 @@ exports[`when has more comments when loading more disables load more button 1`]
|
||||
}
|
||||
/>
|
||||
<Stream
|
||||
banned={false}
|
||||
comments={
|
||||
Array [
|
||||
Object {
|
||||
@@ -243,6 +246,7 @@ exports[`when has more comments when loading more enable load more button after
|
||||
}
|
||||
/>
|
||||
<Stream
|
||||
banned={false}
|
||||
comments={
|
||||
Array [
|
||||
Object {
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from "coral-framework/lib/relay";
|
||||
import { ProfileQuery as QueryTypes } from "coral-stream/__generated__/ProfileQuery.graphql";
|
||||
import { ProfileQueryLocal as Local } from "coral-stream/__generated__/ProfileQueryLocal.graphql";
|
||||
import { Delay, Spinner } from "coral-ui/components";
|
||||
import { CallOut, Delay, Spinner } from "coral-ui/components";
|
||||
|
||||
const loadProfileContainer = () =>
|
||||
import("../containers/ProfileContainer" /* webpackChunkName: "profile" */);
|
||||
@@ -28,7 +28,11 @@ export const render = ({
|
||||
props,
|
||||
}: ReadyState<QueryTypes["response"]>) => {
|
||||
if (error) {
|
||||
return <div>{error.message}</div>;
|
||||
return (
|
||||
<CallOut color="error" fullWidth>
|
||||
{error.message}
|
||||
</CallOut>
|
||||
);
|
||||
}
|
||||
|
||||
// TODO: use official React API once it has one :-)
|
||||
@@ -38,14 +42,16 @@ export const render = ({
|
||||
if (!props.viewer) {
|
||||
return (
|
||||
<Localized id="profile-profileQuery-errorLoadingProfile">
|
||||
<div>Error loading profile</div>
|
||||
<CallOut color="error" fullWidth>
|
||||
Error loading profile
|
||||
</CallOut>
|
||||
</Localized>
|
||||
);
|
||||
}
|
||||
if (!props.story) {
|
||||
return (
|
||||
<Localized id="profile-profileQuery-storyNotFound">
|
||||
<div>Story not found</div>
|
||||
<CallOut>Story not found</CallOut>
|
||||
</Localized>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -76,6 +76,21 @@ exports[`cancel edit 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -124,20 +139,6 @@ exports[`cancel edit 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -771,6 +772,21 @@ exports[`edit a comment: render comment with edit button 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -819,20 +835,6 @@ exports[`edit a comment: render comment with edit button 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -965,6 +967,21 @@ exports[`edit a comment: server response 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -1013,20 +1030,6 @@ exports[`edit a comment: server response 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -1150,6 +1153,21 @@ exports[`shows expiry message: edit form closed 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -1198,20 +1216,6 @@ exports[`shows expiry message: edit form closed 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
|
||||
@@ -72,6 +72,21 @@ exports[`renders comment stream with load more button 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -120,20 +135,6 @@ exports[`renders comment stream with load more button 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -226,6 +227,21 @@ exports[`renders comment stream with load more button 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -274,20 +290,6 @@ exports[`renders comment stream with load more button 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
|
||||
@@ -159,6 +159,21 @@ exports[`renders permalink view 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -207,20 +222,6 @@ exports[`renders permalink view 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -330,6 +331,21 @@ exports[`renders permalink view 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -378,20 +394,6 @@ exports[`renders permalink view 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -499,6 +501,21 @@ exports[`renders permalink view 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -547,20 +564,6 @@ exports[`renders permalink view 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -664,6 +667,21 @@ exports[`renders permalink view 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -712,20 +730,6 @@ exports[`renders permalink view 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -818,6 +822,21 @@ exports[`renders permalink view 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -866,20 +885,6 @@ exports[`renders permalink view 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
|
||||
+60
-56
@@ -191,6 +191,21 @@ exports[`renders conversation thread 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -239,20 +254,6 @@ exports[`renders conversation thread 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -375,6 +376,21 @@ exports[`shows more of this conversation 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -423,20 +439,6 @@ exports[`shows more of this conversation 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -551,6 +553,21 @@ exports[`shows more of this conversation 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -599,20 +616,6 @@ exports[`shows more of this conversation 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -720,6 +723,21 @@ exports[`shows more of this conversation 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -768,20 +786,6 @@ exports[`shows more of this conversation 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
|
||||
@@ -76,6 +76,21 @@ exports[`post a comment: optimistic response 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -124,20 +139,6 @@ exports[`post a comment: optimistic response 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
|
||||
@@ -62,6 +62,21 @@ exports[`post a reply: open reply form 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost Button-active"
|
||||
disabled={false}
|
||||
@@ -110,20 +125,6 @@ exports[`post a reply: open reply form 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -427,6 +428,21 @@ exports[`post a reply: optimistic response 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<div
|
||||
className="Popover-root"
|
||||
>
|
||||
@@ -459,20 +475,6 @@ exports[`post a reply: optimistic response 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -594,6 +596,21 @@ exports[`renders comment stream 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -642,20 +659,6 @@ exports[`renders comment stream 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -771,6 +774,21 @@ exports[`renders comment stream 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -819,20 +837,6 @@ exports[`renders comment stream 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -948,6 +952,21 @@ exports[`renders comment stream 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -996,20 +1015,6 @@ exports[`renders comment stream 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -1125,6 +1130,21 @@ exports[`renders comment stream 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -1173,20 +1193,6 @@ exports[`renders comment stream 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -1302,6 +1308,21 @@ exports[`renders comment stream 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -1350,20 +1371,6 @@ exports[`renders comment stream 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -1479,6 +1486,21 @@ exports[`renders comment stream 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -1527,20 +1549,6 @@ exports[`renders comment stream 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
|
||||
@@ -62,6 +62,21 @@ exports[`post a reply: open reply form 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost Button-active"
|
||||
disabled={false}
|
||||
@@ -110,20 +125,6 @@ exports[`post a reply: open reply form 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -412,6 +413,21 @@ exports[`post a reply: optimistic response 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -460,20 +476,6 @@ exports[`post a reply: optimistic response 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
exports[`create and remove reaction: Respected 1`] = `
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -23,6 +24,7 @@ exports[`create and remove reaction: Respected 1`] = `
|
||||
exports[`create and remove reaction: Unrespected 1`] = `
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
|
||||
+30
-28
@@ -284,6 +284,21 @@ exports[`renders comment stream with community guidelines 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -332,20 +347,6 @@ exports[`renders comment stream with community guidelines 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -438,6 +439,21 @@ exports[`renders comment stream with community guidelines 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -486,20 +502,6 @@ exports[`renders comment stream with community guidelines 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
|
||||
@@ -71,6 +71,21 @@ exports[`renders reply list 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -119,20 +134,6 @@ exports[`renders reply list 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -230,6 +231,21 @@ exports[`renders reply list 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -278,20 +294,6 @@ exports[`renders reply list 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -384,6 +386,21 @@ exports[`renders reply list 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -432,20 +449,6 @@ exports[`renders reply list 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -540,6 +543,21 @@ exports[`renders reply list 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -588,20 +606,6 @@ exports[`renders reply list 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
|
||||
@@ -302,6 +302,21 @@ exports[`renders comment stream 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -350,20 +365,6 @@ exports[`renders comment stream 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -461,6 +462,21 @@ exports[`renders comment stream 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -509,20 +525,6 @@ exports[`renders comment stream 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
|
||||
@@ -71,6 +71,21 @@ exports[`renders comment stream 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -119,20 +134,6 @@ exports[`renders comment stream 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
|
||||
@@ -62,6 +62,21 @@ exports[`renders deepest comment with link 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -110,20 +125,6 @@ exports[`renders deepest comment with link 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
|
||||
@@ -72,6 +72,21 @@ exports[`renders app with comment stream 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -120,20 +135,6 @@ exports[`renders app with comment stream 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
@@ -226,6 +227,21 @@ exports[`renders app with comment stream 1`] = `
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
disabled={false}
|
||||
@@ -274,20 +290,6 @@ exports[`renders app with comment stream 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorRegular Button-variantGhost"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Respect
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-directionRow"
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
import timekeeper from "timekeeper";
|
||||
|
||||
import { pureMerge } from "coral-common/utils";
|
||||
import { GQLResolver, GQLUSER_STATUS } from "coral-framework/schema";
|
||||
import {
|
||||
createResolversStub,
|
||||
CreateTestRendererParams,
|
||||
waitForElement,
|
||||
within,
|
||||
} from "coral-framework/testHelpers";
|
||||
|
||||
import { comments, settings, stories } from "../fixtures";
|
||||
import create from "./create";
|
||||
|
||||
const story = stories[0];
|
||||
const firstComment = story.comments.edges[0].node;
|
||||
const viewer = firstComment.author!;
|
||||
|
||||
async function createTestRenderer(
|
||||
params: CreateTestRendererParams<GQLResolver> = {}
|
||||
) {
|
||||
const { testRenderer, context } = create({
|
||||
...params,
|
||||
resolvers: pureMerge(
|
||||
createResolversStub<GQLResolver>({
|
||||
Query: {
|
||||
settings: () => settings,
|
||||
viewer: () =>
|
||||
pureMerge<typeof viewer>(viewer, {
|
||||
status: {
|
||||
current: [GQLUSER_STATUS.BANNED],
|
||||
},
|
||||
}),
|
||||
story: () =>
|
||||
pureMerge<typeof story>(story, {
|
||||
comments: {
|
||||
edges: [
|
||||
...story.comments.edges,
|
||||
{
|
||||
node: pureMerge<typeof comments[2]>(comments[2], {
|
||||
actionCounts: { reaction: { total: 1 } },
|
||||
}),
|
||||
cursor: comments[2].createdAt,
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
},
|
||||
}),
|
||||
params.resolvers
|
||||
),
|
||||
initLocalState: (localRecord, source, environment) => {
|
||||
localRecord.setValue(story.id, "storyID");
|
||||
localRecord.setValue(true, "loggedIn");
|
||||
if (params.initLocalState) {
|
||||
params.initLocalState(localRecord, source, environment);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
const tabPane = await waitForElement(() =>
|
||||
within(testRenderer.root).getByTestID("current-tab-pane")
|
||||
);
|
||||
|
||||
return {
|
||||
testRenderer,
|
||||
context,
|
||||
tabPane,
|
||||
};
|
||||
}
|
||||
|
||||
afterAll(() => {
|
||||
timekeeper.reset();
|
||||
});
|
||||
|
||||
it("disables comment stream", async () => {
|
||||
timekeeper.freeze(firstComment.createdAt);
|
||||
const { testRenderer, tabPane } = await createTestRenderer();
|
||||
await waitForElement(() =>
|
||||
within(testRenderer.root).getByTestID("comments-stream-log")
|
||||
);
|
||||
within(tabPane).getAllByText("Your account has been banned", {
|
||||
exact: false,
|
||||
});
|
||||
expect(
|
||||
within(tabPane).queryByText("Reply", { selector: "button" })
|
||||
).toBeNull();
|
||||
expect(
|
||||
within(tabPane).queryByText("Report", { selector: "button" })
|
||||
).toBeNull();
|
||||
expect(
|
||||
within(tabPane).queryByText("Edit", { selector: "button" })
|
||||
).toBeNull();
|
||||
expect(
|
||||
within(tabPane).getByText("Respect", { selector: "button" }).props.disabled
|
||||
).toBe(true);
|
||||
});
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
GQLStory,
|
||||
GQLUser,
|
||||
GQLUSER_ROLE,
|
||||
GQLUSER_STATUS,
|
||||
} from "coral-framework/schema";
|
||||
import {
|
||||
createFixture,
|
||||
@@ -83,28 +84,37 @@ export const settings = createFixture<GQLSettings>({
|
||||
},
|
||||
});
|
||||
|
||||
export const commenters = createFixtures<GQLUser>([
|
||||
{
|
||||
id: "user-0",
|
||||
username: "Markus",
|
||||
role: GQLUSER_ROLE.COMMENTER,
|
||||
export const baseUser = createFixture<GQLUser>({
|
||||
status: {
|
||||
current: [GQLUSER_STATUS.ACTIVE],
|
||||
},
|
||||
{
|
||||
id: "user-1",
|
||||
username: "Lukas",
|
||||
role: GQLUSER_ROLE.COMMENTER,
|
||||
},
|
||||
{
|
||||
id: "user-2",
|
||||
username: "Isabelle",
|
||||
role: GQLUSER_ROLE.COMMENTER,
|
||||
},
|
||||
{
|
||||
id: "user-3",
|
||||
username: "Markus",
|
||||
role: GQLUSER_ROLE.COMMENTER,
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
export const commenters = createFixtures<GQLUser>(
|
||||
[
|
||||
{
|
||||
id: "user-0",
|
||||
username: "Markus",
|
||||
role: GQLUSER_ROLE.COMMENTER,
|
||||
},
|
||||
{
|
||||
id: "user-1",
|
||||
username: "Lukas",
|
||||
role: GQLUSER_ROLE.COMMENTER,
|
||||
},
|
||||
{
|
||||
id: "user-2",
|
||||
username: "Isabelle",
|
||||
role: GQLUSER_ROLE.COMMENTER,
|
||||
},
|
||||
{
|
||||
id: "user-3",
|
||||
username: "Markus",
|
||||
role: GQLUSER_ROLE.COMMENTER,
|
||||
},
|
||||
],
|
||||
baseUser
|
||||
);
|
||||
|
||||
export const baseComment = createFixture<GQLComment>({
|
||||
author: commenters[0],
|
||||
@@ -330,13 +340,16 @@ export const baseStory = createFixture<GQLStory>({
|
||||
},
|
||||
});
|
||||
|
||||
export const moderators = createFixtures<GQLUser>([
|
||||
{
|
||||
id: "me-as-moderator",
|
||||
username: "Moderator",
|
||||
role: GQLUSER_ROLE.MODERATOR,
|
||||
},
|
||||
]);
|
||||
export const moderators = createFixtures<GQLUser>(
|
||||
[
|
||||
{
|
||||
id: "me-as-moderator",
|
||||
username: "Moderator",
|
||||
role: GQLUSER_ROLE.MODERATOR,
|
||||
},
|
||||
],
|
||||
baseUser
|
||||
);
|
||||
|
||||
export const commentsFromStaff = denormalizeComments(
|
||||
createFixtures<GQLComment>(
|
||||
@@ -480,23 +493,26 @@ export const storyWithDeepestReplies = denormalizeStory(
|
||||
)
|
||||
);
|
||||
|
||||
export const viewerWithComments = createFixture<GQLUser>({
|
||||
id: "me-with-comments",
|
||||
username: "Markus",
|
||||
role: GQLUSER_ROLE.COMMENTER,
|
||||
comments: {
|
||||
edges: [
|
||||
{
|
||||
node: { ...stories[0].comments.edges[0].node, story: stories[0] },
|
||||
cursor: comments[0].createdAt,
|
||||
export const viewerWithComments = createFixture<GQLUser>(
|
||||
{
|
||||
id: "me-with-comments",
|
||||
username: "Markus",
|
||||
role: GQLUSER_ROLE.COMMENTER,
|
||||
comments: {
|
||||
edges: [
|
||||
{
|
||||
node: { ...stories[0].comments.edges[0].node, story: stories[0] },
|
||||
cursor: comments[0].createdAt,
|
||||
},
|
||||
{
|
||||
node: { ...stories[1].comments.edges[0].node, story: stories[1] },
|
||||
cursor: comments[1].createdAt,
|
||||
},
|
||||
],
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
},
|
||||
{
|
||||
node: { ...stories[1].comments.edges[0].node, story: stories[1] },
|
||||
cursor: comments[1].createdAt,
|
||||
},
|
||||
],
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
},
|
||||
},
|
||||
});
|
||||
baseUser
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: var(--mini-unit);
|
||||
padding: calc(1.5 * var(--mini-unit));
|
||||
box-sizing: border-box;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
|
||||
@@ -1390,7 +1390,12 @@ type User {
|
||||
emailVerified when true indicates that the given email address has been
|
||||
verified.
|
||||
"""
|
||||
emailVerified: Boolean @auth(roles: [ADMIN, MODERATOR], userIDField: "id")
|
||||
emailVerified: Boolean
|
||||
@auth(
|
||||
roles: [ADMIN, MODERATOR]
|
||||
userIDField: "id"
|
||||
permit: [SUSPENDED, BANNED]
|
||||
)
|
||||
|
||||
"""
|
||||
profiles is the array of profiles assigned to the user.
|
||||
@@ -1419,7 +1424,12 @@ type User {
|
||||
first: Int = 10
|
||||
orderBy: COMMENT_SORT = CREATED_AT_DESC
|
||||
after: Cursor
|
||||
): CommentsConnection! @auth(roles: [ADMIN, MODERATOR], userIDField: "id")
|
||||
): CommentsConnection!
|
||||
@auth(
|
||||
roles: [ADMIN, MODERATOR]
|
||||
userIDField: "id"
|
||||
permit: [SUSPENDED, BANNED]
|
||||
)
|
||||
|
||||
"""
|
||||
commentModerationActionHistory returns a CommentModerationActionConnection
|
||||
@@ -1438,7 +1448,8 @@ type User {
|
||||
"""
|
||||
tokens lists the access tokens associated with the account.
|
||||
"""
|
||||
tokens: [Token!]! @auth(roles: [ADMIN], userIDField: "id")
|
||||
tokens: [Token!]!
|
||||
@auth(roles: [ADMIN], userIDField: "id", permit: [SUSPENDED, BANNED])
|
||||
|
||||
"""
|
||||
createdAt is the time that the User was created at.
|
||||
@@ -1658,7 +1669,11 @@ type Comment {
|
||||
edit last.
|
||||
"""
|
||||
revisionHistory: [CommentRevision!]!
|
||||
@auth(roles: [MODERATOR, ADMIN], userIDField: "author_id")
|
||||
@auth(
|
||||
roles: [MODERATOR, ADMIN]
|
||||
userIDField: "author_id"
|
||||
permit: [SUSPENDED, BANNED]
|
||||
)
|
||||
|
||||
"""
|
||||
createdAt is the date in which the Comment was created.
|
||||
|
||||
Reference in New Issue
Block a user