From 6673bf0b18b28a498c13fba08cd7a00faa767140 Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Mon, 20 Mar 2023 17:43:36 +0800 Subject: [PATCH 01/92] feat(test): update TEST_ID --- src/common/enums/test.ts | 4 ++++ src/components/Comment/Feed/index.tsx | 6 +++++- src/components/UserDigest/Mini/index.tsx | 14 ++++++++++++-- src/components/UserProfile/index.tsx | 7 ++++++- tests/helpers/poms/userProfile.ts | 2 ++ 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/common/enums/test.ts b/src/common/enums/test.ts index 3bdb5ab350..b840be1f91 100644 --- a/src/common/enums/test.ts +++ b/src/common/enums/test.ts @@ -8,6 +8,8 @@ export enum TEST_ID { DIGEST_ARTICLE_SIDEBAR = 'digest/article/sidebar', DIGEST_ARTICLE_TITLE = 'digest/article/title', DIGEST_USER_MINI = 'digest/user/mini', + DIGEST_USER_MINI_DISPLAY_NAME = 'digest/user/mini/display-name', + DIGEST_USER_MINI_USER_NAME = 'digest/user/mini/user-name', DIGEST_USER_PLAIN = 'digest/user/plain', DIGEST_USER_RICH = 'digest/user/rich', DIGEST_USER_RICH_DISPLAY_NAME = 'digest/user/rich/display-name', @@ -32,6 +34,7 @@ export enum TEST_ID { ARTICLE_APPRECIATION_TOTAL = 'article/appreciation/total', ARTICLE_TOOLBAR = 'article/toolbar', ARTICLE_BOOKMARK = 'article/bookmark', + ARTICLE_COMMENT_FEED = 'article/comment/feed', // payto PAY_TO_CURRENCY_CHOICE = 'payto/currency-choice', // comment @@ -77,6 +80,7 @@ export enum TEST_ID { // user profile USER_PROFILE = 'user-profile', USER_PROFILE_DISPLAY_NAME = 'user-profile/display-name', + USER_PROFILE_USER_NAME = 'user-profile/user-name', USER_PROFILE_FOLLOWERS_COUNT = 'user-profile/followers/count', USER_PROFILE_BIO = 'user-profile/bio', diff --git a/src/components/Comment/Feed/index.tsx b/src/components/Comment/Feed/index.tsx index d4ad41428d..dfaee93f62 100644 --- a/src/components/Comment/Feed/index.tsx +++ b/src/components/Comment/Feed/index.tsx @@ -1,6 +1,7 @@ import { useLazyQuery } from '@apollo/react-hooks' import React from 'react' +import { TEST_ID } from '@/src/common/enums' import { AvatarSize, CommentFormType, UserDigest } from '~/components' import { FeedCommentPrivateFragment, @@ -52,7 +53,10 @@ export const BaseCommentFeed = ({ } return ( -