Conversation
linux08
commented
Jun 18, 2025
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Pull Request Overview
This PR enforces test failures in the build pipeline, temporarily disables broken unit tests, and adjusts test IDs and runner configuration.
- Adds
data-testIdattributes toVerifyFollowButtonfor testing. - Inserts a debug
console.loginConnectXButton. - Skips or comments out many existing tests and narrows the Jest runner scope.
Reviewed Changes
Copilot reviewed 7 out of 28 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/xauth/VerifyFollowButton.tsx | Added data-testId attributes to follow and relink buttons. |
| src/components/xauth/ConnectXButton.tsx | Inserted a debug console.log call before setting loading state. |
| src/components/myAir/tests/MyAirPanel.test.tsx | Marked core tests with test.skip and replaced many with placeholders. |
| src/components/tests/VerifyFollowButton.test.tsx | Swapped to getByTestId, added dummy test, and commented out original suite. |
| src/components/tests/CrossmintLoginButton.test.tsx | Commented out entire test suite and added a placeholder test. |
| src/components/tests/ConnectXButton.test.tsx | Removed redirectTo assertion in favor of checking loading UI. |
| package.json | Changed Jest invocation to only run __tests__ and added new dependency. |
Comments suppressed due to low confidence (3)
package.json:12
- This restricts Jest to
__tests__directories, potentially excluding tests elsewhere. Consider using a broader glob (e.g.,jest --runInBand) or updating the pattern to include all test files.
"test": "cross-env NODE_ENV=test jest __tests__ --runInBand --detectOpenHandles",
src/components/myAir/tests/MyAirPanel.test.tsx:48
- Skipping core tests reduces coverage and hides regressions. Re-enable or remove
test.skipfor essential behaviors to ensure they are validated.
test.skip('renders loading session state initially if session status is loading', () => {
src/components/tests/VerifyFollowButton.test.tsx:21
- This placeholder test does not verify component behavior. Remove or replace with a meaningful test for
VerifyFollowButton.
it('one plus one equals two', () => {
| return ( | ||
| <div className="space-y-2"> | ||
| <button | ||
| data-testId="follow-btn" |
There was a problem hiding this comment.
Replace data-testId with data-testid to match the Testing Library convention and ensure the attribute is rendered correctly.
| data-testId="follow-btn" | |
| data-testid="follow-btn" |
| Having issues? Try <button | ||
| onClick={() => window.location.href = '/profile'} | ||
| Having issues? Try <button | ||
| data-testId="relink-btn" |
There was a problem hiding this comment.
Use data-testid="relink-btn" instead of data-testId so Testing Library can locate this element as intended.
| data-testId="relink-btn" | |
| data-testid="relink-btn" |
| const [isLoading, setIsLoading] = useState(false); | ||
|
|
||
| const handleConnectX = async () => { | ||
| console.log("Connecting X account..."); |
There was a problem hiding this comment.
[nitpick] Remove or replace this debug console.log in production code to avoid cluttering the console; consider using a logger with configurable levels.
|
|
||
| await act(async () => { | ||
| await user.click(mintButton); | ||
| await fireEvent.click(mintButton); |
There was a problem hiding this comment.
fireEvent.click is synchronous and doesn’t return a promise. Remove the await or switch back to userEvent for async interactions.