Fix flaky vote tooltip tests for posts past payout
Summary
Fix flaky e2e tests that fail when @gtg's first reply is past its 7-day payout window.
Problem
The tests profileRepliesPage.spec.ts:232,264 and mainTimeline.spec.ts:760,807,861,908 assert exact tooltip text:
expect(tooltip.textContent()).toBe('DownvoteDownvote');
But posts past payout show a warning message instead:
"DownvoteVoting on Content after their payout does not generate any new rewards..."
Since tests use live mainnet data (@gtg's actual replies), they fail whenever @gtg's most recent reply is older than 7 days.
Solution
Use toContain() instead of exact match:
expect(tooltip.textContent()).toContain('Downvote');
This validates the tooltip type while accepting either the normal or payout-warning variant.
Files changed
-
apps/blog/playwright/tests/e2e/profileRepliesPage.spec.ts(2 assertions) -
apps/blog/playwright/tests/e2e/mainTimeline.spec.ts(4 assertions)
Test plan
- Pipeline passes with fixed tooltip assertions
- Tests still catch wrong tooltip type (e.g., showing "Upvote" on downvote button)