Skip to content

Next js tests#271

Merged
danielmarv merged 3 commits intonext-js-migrationfrom
next-js-tests
Feb 5, 2026
Merged

Next js tests#271
danielmarv merged 3 commits intonext-js-migrationfrom
next-js-tests

Conversation

@danielmarv
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 5, 2026 15:56
Signed-off-by: Daniel Ntege <danientege785@gmail.com>
Signed-off-by: Daniel Ntege <danientege785@gmail.com>
…ript loading

Signed-off-by: Daniel Ntege <danientege785@gmail.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs code cleanup and configuration improvements for the Next.js application, primarily focusing on test file formatting, tooling configuration updates, and documentation enhancements.

Changes:

  • Removed explanatory comments from test files (home, contact, about, accessibility) while maintaining functionality
  • Updated Next.js layout to use the Script component with proper strategy for external script loading
  • Fixed React useEffect dependency array bug in maven-prs component
  • Corrected ESLint configuration paths and updated pre-commit hook for better reliability

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/e2e/home.spec.ts Removed redundant comments while keeping test logic intact
tests/e2e/contact.spec.ts Removed redundant comments while keeping test logic intact
tests/e2e/accessibility.spec.ts Removed comments including one useful alt text explanation
tests/e2e/about.spec.ts Removed redundant comments while keeping test logic intact
src/app/[locale]/layout.tsx Improved external script loading using Next.js Script component with afterInteractive strategy
react-src/maven-prs.tsx Fixed useEffect missing dependency (status prop)
package.json Changed lint command from "next lint" to "eslint ." for direct ESLint usage
eslint.config.js Corrected path from "src/react-src/" to "react-src/" and added "public/**" to ignored paths
README.md Updated architecture documentation for 2026, added development setup instructions
.husky/pre-commit Modernized for Husky v9+, added pnpm availability check with fallback

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

cd "$REPO_ROOT"
pnpm run lint
else
echo "pnpm not found. Skipping lint." >&2
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pre-commit hook now allows commits to proceed when pnpm is not found, only printing a warning. This means linting can be bypassed in environments without pnpm installed. Consider whether this is the desired behavior, or if the hook should fail with exit 1 when pnpm is unavailable to ensure consistent code quality checks across all environments.

Suggested change
echo "pnpm not found. Skipping lint." >&2
echo "Error: pnpm not found. Cannot run lint. Please install pnpm to proceed." >&2
exit 1

Copilot uses AI. Check for mistakes.
const img = images.nth(i);
const alt = await img.getAttribute('alt');
// Alt can be empty string for decorative images, but must exist

Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A useful explanatory comment was removed here. The previous comment "Alt can be empty string for decorative images, but must exist" provided important context about why the test checks for not.toBeNull() rather than checking for a non-empty string. This distinction between decorative images (empty alt) and content images (descriptive alt) is an important accessibility concept. Consider restoring this comment to maintain the test's documentation.

Suggested change
// Alt can be an empty string for decorative images, but the alt attribute must exist.

Copilot uses AI. Check for mistakes.
@danielmarv danielmarv self-assigned this Feb 5, 2026
@danielmarv danielmarv merged commit 8a50803 into next-js-migration Feb 5, 2026
2 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in Migration to NextJS Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant