Skip to content

Conversation

@na66im
Copy link
Contributor

@na66im na66im commented Oct 27, 2025

No description provided.

@na66im na66im force-pushed the chore/setup-e2e-tests branch from 2c9617b to b5b12a8 Compare October 27, 2025 16:04
@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

❌ Patch coverage is 97.05882% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/cli/src/cli.ts 90.47% 2 Missing ⚠️

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #33   +/-   ##
=======================================
  Coverage        ?   95.34%           
=======================================
  Files           ?        9           
  Lines           ?     1096           
  Branches        ?      151           
=======================================
  Hits            ?     1045           
  Misses          ?       51           
  Partials        ?        0           
Flag Coverage Δ
unittests 95.34% <97.05%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/cli/src/cli-functions.ts 100.00% <100.00%> (ø)
packages/cli/src/utils/auth.ts 95.52% <100.00%> (ø)
packages/cli/src/utils/environment.ts 100.00% <100.00%> (ø)
packages/cli/src/cli.ts 94.70% <90.47%> (ø)

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@na66im na66im force-pushed the chore/setup-e2e-tests branch 16 times, most recently from 79e8931 to e82be5c Compare November 3, 2025 15:13
@na66im na66im force-pushed the chore/setup-e2e-tests branch 2 times, most recently from 00f66e5 to 943a248 Compare November 4, 2025 08:59
@na66im na66im self-assigned this Nov 4, 2025
@na66im na66im requested review from Copilot and santi698 November 4, 2025 09:00
Copy link

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 adds end-to-end (E2E) testing infrastructure for the CLI package and implements a new refresh token login feature.

Key Changes:

  • Refresh token authentication: Adds loginWithRefreshToken method to AuthService enabling login via refresh token
  • E2E test infrastructure: Creates new E2E test framework with Vitest configuration, test utilities, and smoke tests
  • CI/CD integration: Adds GitHub Actions workflow for automated E2E testing on schedule and PR events
  • Dependency updates: Updates @nx/vite to v21.6.6 and adds execa and fs-extra packages

Reviewed Changes

Copilot reviewed 19 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/cli/src/utils/auth.ts Adds loginWithRefreshToken method and exports token schemas
packages/cli/src/utils/auth.spec.ts Comprehensive unit tests for refresh token login functionality
packages/cli/src/cli.ts Extends login command to accept optional --refreshToken flag
packages/cli/src/cli-functions.ts Adds handleLoginWithRefreshToken wrapper function
packages/cli/src/cli-functions.spec.ts Unit tests for refresh token login handler
packages/cli/src/cli.test.ts Integration test for refresh token login command
packages/cli/e2e/vite.config.e2e.ts Vitest configuration for E2E tests with extended timeouts
packages/cli/e2e/vitest.setup.ts Setup file that authenticates before E2E tests run
packages/cli/e2e/utils/command.ts Utility for executing CLI commands in E2E tests
packages/cli/e2e/specs/base.e2e.test.ts Basic smoke tests for CLI commands
.github/workflows/e2e-cli.yml GitHub Actions workflow for scheduled and on-demand E2E testing
packages/cli/project.json Adds test:e2e target for Nx
packages/cli/package.json Adds E2E test script
package.json Adds workspace-level E2E test script and new dependencies
packages/cli/tsconfig.json Includes E2E directory in TypeScript compilation
packages/cli/tsconfig.app.json Excludes E2E tests from production build
tsconfig.eslint.json Includes E2E directory for linting
packages/cli/src/utils/environment.ts Updates develop environment endpoint domain
.gitignore Adds test-results directory to ignore list

@na66im na66im force-pushed the chore/setup-e2e-tests branch from 943a248 to 2a833f3 Compare November 4, 2025 09:06
Copy link
Collaborator

@santi698 santi698 left a comment

Choose a reason for hiding this comment

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

👏 Great job Nassim, looks very nice.

Just a few small change requests

"eslint": "^9.31.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.3",
"execa": "^9.6.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

@santi698 do we need approvals for new libraries?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not if they don't have any license that requires approval

@muhabalwan-aginx muhabalwan-aginx force-pushed the chore/setup-e2e-tests branch 6 times, most recently from 0ba41e7 to d45b59c Compare November 7, 2025 12:51
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 7, 2025

@muhabalwan-aginx muhabalwan-aginx merged commit a39756f into main Nov 7, 2025
14 checks passed
@muhabalwan-aginx muhabalwan-aginx deleted the chore/setup-e2e-tests branch November 7, 2025 13:05
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.

4 participants