Skip to content

Test/e2e edit metadata - #883

Open
ajulaybeeb wants to merge 9 commits into
Iris-IV:mainfrom
ajulaybeeb:test/e2e-edit-metadata
Open

Test/e2e edit metadata#883
ajulaybeeb wants to merge 9 commits into
Iris-IV:mainfrom
ajulaybeeb:test/e2e-edit-metadata

Conversation

@ajulaybeeb

Copy link
Copy Markdown

This PR introduces full E2E flow testing for campaign metadata editing using Playwright, addressing issue #805. It also hardens the edit metadata component itself by enforcing image URL validation before accepting changes.

Problem: While creators could edit their campaign's title, description, and cover image after creation, the UI lacked validation for the image URL, and there was no end-to-end test verifying that this update flow remained fully functional.

Changes Included:

src/components/EditCampaignMetadata.tsx:
Added strict image URL validation using the existing validateImageDomain helper.
Implemented an inline error state that blocks submission and displays a visible error if the cover image URL domain is not allowed or not HTTPS.
Added id and htmlFor attributes to the form fields to improve accessibility and make locator targeting robust for Playwright.
tests/e2e/edit-metadata.spec.ts:
Added a new mock-mode E2E test that performs a full creator journey:
Connects the mock wallet.
Creates a new campaign to become the creator (as mock addresses are dynamically generated).
Navigates from the creation success page to the user dashboard.
Selects the campaign and opens the Edit Metadata form on the Cause Detail page.
Deliberately inputs a non-HTTPS, invalid domain URL to assert the error blocking state.
Submits valid data and asserts that the updated description persists accurately in the form on the Cause Detail page after saving.
Acceptance Criteria Verified:

Add an e2e test for dashboard to edit-metadata to confirmation, using mock mode.
Assert the updated description appears on the cause detail page after saving.
Assert an invalid image URL blocks submission with a visible error.

closes #805

@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@ajulaybeeb Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from 49107ef to 15d6d63 Compare July 30, 2026 10:19
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

- Adds image URL validation logic in EditCampaignMetadata.tsx
- Adds CSV export of contribution history for tax reporting
- Exposes extendCampaignDeadline and creates ExtendDeadlineModal
- Fixes unescaped entities and typescript null errors

Closes Iris-IV#576
Closes Iris-IV#591
Closes Iris-IV#486
Closes Iris-IV#805
@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from 8ebca49 to 713364c Compare July 30, 2026 10:26
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from c4b6423 to 713364c Compare July 30, 2026 10:47
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from 58b472b to b669fa8 Compare July 30, 2026 10:48
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from b6ced96 to b669fa8 Compare July 30, 2026 11:19
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from 6db2c03 to 494a89e Compare July 30, 2026 11:31
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from b4be247 to 6627389 Compare July 30, 2026 11:41
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from 133176b to 6627389 Compare July 30, 2026 11:51
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from 8070875 to 9f1c6ad Compare July 30, 2026 12:06
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from d856868 to dc000be Compare July 30, 2026 12:24
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from 2d1a3b6 to 549195e Compare July 30, 2026 12:51
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

- Prefix unused vars with _ to satisfy unused-imports/no-unused-vars:
  mockOnVerifyWithVotes (VotingComponent.test.tsx), walletPublicKey
  (CampaignUpdates.test.tsx), onTagClick (CauseCard.tsx), error
  (health/route.ts), onFinalize (CancelDonationBanner.tsx),
  isError (ToastProvider.tsx)
- Fix unused catch vars e -> _e in eventSubscriber.ts (3 occurrences)
- Replace any with Record<string, unknown> in eventSubscriber.ts
- Fix accessibility: move role=dialog to inner container and use
  role=presentation on backdrop in ExtendDeadlineModal and ReportModal
- Overwrite broken remote CauseDetailClient.tsx and WalletContext.tsx
  (had duplicate import parsing errors on GitHub branch)

Fixes: ESLint errors at CauseDetailClient.tsx:79 and WalletContext.tsx:69
@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from 728f8fa to a376e08 Compare July 30, 2026 13:02
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

…Client

The GitHub remote branch accumulated duplicate import blocks and
multiple default exports across CauseCard.tsx, WalletContext.tsx, and
CauseDetailClient.tsx through repeated non-force pushes.

Changes:
- CauseCard.tsx: full clean rewrite — single import block, single
  export default React.memo(CauseCard, causeCardPropsAreEqual)
- WalletContext.tsx: full clean rewrite — no duplicate declarations,
  WalletContextType fully populated in contextValue
- CauseDetailClient.tsx: full clean rewrite — resolves Expression
  expected parsing error at line 79 on the remote

All three files are byte-for-byte correct locally; this force-push
overwrites the corrupted remote copies completely.

Resolves: Turbopack SyntaxError 'Identifier has already been declared'
Resolves: Parsing error at CauseDetailClient.tsx:79
Resolves: Parsing error at WalletContext.tsx:68
@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from 35d339c to 1641dc3 Compare July 30, 2026 13:14
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from a250337 to 1641dc3 Compare July 30, 2026 13:32
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

1 similar comment
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@ajulaybeeb
ajulaybeeb force-pushed the test/e2e-edit-metadata branch from dce47a4 to 1641dc3 Compare July 30, 2026 13:53
@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Testing] Add E2E coverage for editing an existing campaign's metadata

2 participants