From 970b06bd656339223601deee42cba71f33c2728c Mon Sep 17 00:00:00 2001 From: Kobe Attias Date: Thu, 3 Sep 2026 10:31:36 -0400 Subject: [PATCH 1/2] RFP specs, comment specs --- .env.example | 8 +- .github/workflows/smoke.yml | 9 + components/Comment/CollapsedCommentEditor.tsx | 1 + components/Comment/CommentEditor.tsx | 5 +- components/Comment/CommentEmptyState.tsx | 5 +- components/Comment/CommentItem.tsx | 4 +- components/Comment/CommentList.tsx | 2 +- components/Comment/CommentSortAndFilters.tsx | 8 +- .../Comment/components/EditorFooter.tsx | 7 +- components/Feed/FeedItemActions.tsx | 10 + .../components/GrantDescriptionSection.tsx | 1 + .../components/GrantFundingAmountSection.tsx | 1 + playwright.config.ts | 18 +- smoke/comments.spec.ts | 302 ++++++++++++++++++ smoke/helpers/fixtures.ts | 24 +- smoke/helpers/notebook.ts | 36 +++ smoke/proposal.spec.ts | 101 +++++- smoke/rfp.spec.ts | 183 +++++++++++ 18 files changed, 698 insertions(+), 27 deletions(-) create mode 100644 smoke/comments.spec.ts create mode 100644 smoke/helpers/notebook.ts create mode 100644 smoke/rfp.spec.ts diff --git a/.env.example b/.env.example index 2346067bd..84628a6e3 100755 --- a/.env.example +++ b/.env.example @@ -55,6 +55,8 @@ SMOKE_BASE_URL=http://localhost:3000 SMOKE_USER_EMAIL= SMOKE_USER_PASSWORD= -# Content the specs navigate to. Ids only - /grant/ and /proposal/ -SMOKE_GRANT_ID=33 -SMOKE_PROPOSAL_ID=5 +# Content the specs navigate to. Post ids only - /grant/ and /proposal/. +# Both must be owned by the smoke account: the title specs edit them, and +# editing is gated on authorship. +SMOKE_GRANT_POST_ID=662 +SMOKE_PROPOSAL_POST_ID=663 diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 669360924..257ca34aa 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -65,6 +65,15 @@ jobs: SMOKE_BASE_URL: ${{ inputs.base_url || vars.SMOKE_BASE_URL }} SMOKE_USER_EMAIL: ${{ secrets.SMOKE_USER_EMAIL }} SMOKE_USER_PASSWORD: ${{ secrets.SMOKE_USER_PASSWORD }} + # Ids of the fixture content, which is public and so kept in + # variables rather than secrets. They are read through requiredEnv, + # which throws rather than defaults: unset here, every spec that + # navigates to a grant or a proposal fails before its first + # assertion. Note they have to be listed even though they exist as + # repository variables, since only what is named in this block + # reaches the process. + SMOKE_GRANT_POST_ID: ${{ vars.SMOKE_GRANT_POST_ID }} + SMOKE_PROPOSAL_POST_ID: ${{ vars.SMOKE_PROPOSAL_POST_ID }} run: npm run test:smoke - name: Upload report diff --git a/components/Comment/CollapsedCommentEditor.tsx b/components/Comment/CollapsedCommentEditor.tsx index af8bff3f1..5c0c09147 100644 --- a/components/Comment/CollapsedCommentEditor.tsx +++ b/components/Comment/CollapsedCommentEditor.tsx @@ -26,6 +26,7 @@ export const CollapsedCommentEditor = ({ commentType, onExpand }: CollapsedComme type="button" onClick={onExpand} className="group w-full flex items-center gap-3 rounded-lg border border-blue-200 bg-blue-50/40 px-4 py-3 text-left transition-colors hover:border-blue-400 hover:bg-blue-50" + data-testid="comment-editor-collapsed" > ( -
+
{/* User info header */} {showHeader && ( +
{icon}

{message}

{description}

diff --git a/components/Comment/CommentItem.tsx b/components/Comment/CommentItem.tsx index 887640550..98e29a038 100644 --- a/components/Comment/CommentItem.tsx +++ b/components/Comment/CommentItem.tsx @@ -312,7 +312,7 @@ export const CommentItem = ({ {/* If we're replying, show the reply editor */} {isReplying && !readOnly && ( -
+

Your reply:

+
{/* Debug information for comment ID */} {showDebugInfo && (
diff --git a/components/Comment/CommentList.tsx b/components/Comment/CommentList.tsx index 2f1ce8500..b4f20a5de 100644 --- a/components/Comment/CommentList.tsx +++ b/components/Comment/CommentList.tsx @@ -21,7 +21,7 @@ const CommentList: React.FC = ({ readOnly = false, }) => { return ( -
+
{comments.map((comment) => ( = ({ + ) : ( @@ -664,6 +673,7 @@ export const FeedItemActions: FC = ({ showLabel={Boolean(actionLabels?.comment)} showTooltip={showTooltips} flat={isFlat} + testId="feed-item-comment-action" /> )} {(onTip || totalAwarded > 0) && diff --git a/components/Notebook/PublishingForm/components/GrantDescriptionSection.tsx b/components/Notebook/PublishingForm/components/GrantDescriptionSection.tsx index 5db002a88..fed8fe58d 100644 --- a/components/Notebook/PublishingForm/components/GrantDescriptionSection.tsx +++ b/components/Notebook/PublishingForm/components/GrantDescriptionSection.tsx @@ -14,6 +14,7 @@ export function GrantDescriptionSection() { Short Description