Skip to content

test: add AXI user journey tests for agent subcommand - #7114

Merged
robertolopezlopez merged 1 commit into
mainfrom
feat/CLI-1700
Aug 12, 2026
Merged

test: add AXI user journey tests for agent subcommand#7114
robertolopezlopez merged 1 commit into
mainfrom
feat/CLI-1700

Conversation

@robertolopezlopez

Copy link
Copy Markdown
Contributor

Summary

  • add private-binary user journeys for the agent home view and input errors
  • cover default, subset, and individual SCA, SAST, Secrets scanner selection
  • cover Container image validation and local image selection

Validation

  • private build passed against local AXI checkout
  • 2 Jest suites, 9 tests passed
  • Prettier, ESLint, git diff check, and make lint passed

Dependency

Draft pending publication of the AXI sast rename and subsequent cliv2-private Go module bump.

CLI-1700

@snyk-io

snyk-io Bot commented Aug 11, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@robertolopezlopez

Copy link
Copy Markdown
Contributor Author

clean private builds still pin AXI 734c2ae85a0a, which accepts code, so every new sast journey fails before scanner selection

@robertolopezlopez
robertolopezlopez force-pushed the feat/CLI-1700 branch 2 times, most recently from 0313aa0 to 9b85d85 Compare August 11, 2026 13:25
Comment thread test/jest/acceptance/snyk-agent/snyk-agent-home.spec.ts Outdated
Comment thread test/jest/acceptance/snyk-agent/snyk-agent-home.spec.ts Outdated
Comment thread test/jest/acceptance/snyk-agent/snyk-agent-scanners.spec.ts
Comment thread test/jest/acceptance/snyk-agent/snyk-agent-scanners.spec.ts
@robertolopezlopez
robertolopezlopez force-pushed the feat/CLI-1700 branch 2 times, most recently from 00cae38 to db8f608 Compare August 11, 2026 15:22
@robertolopezlopez
robertolopezlopez marked this pull request as ready for review August 11, 2026 15:23
@robertolopezlopez
robertolopezlopez requested a review from a team as a code owner August 11, 2026 15:23
@snyk-pr-review-bot

This comment has been minimized.

@robertolopezlopez

robertolopezlopez commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

External API Dependency 🟡 [minor]
The beforeAll hook defaults SNYK_API to https://api.snyk.io if TEST_SNYK_API is not provided. According to the CONTRIBUTING.md section on 'Acceptance tests', tests should never call remote endpoints and should instead use fake-server or other mocks. Hardcoding a production URL as a fallback risks unintended external calls during local development or misconfigured CI runs.

SNYK_API: process.env.TEST_SNYK_API ?? 'https://api.snyk.io',

📚 Repository Context Analyzed

This review considered 3 relevant code sections from 3 files (average relevance: 1.00)

🤖 Repository instructions applied (from AGENTS.md)

what do you think @PeterSchafer

(edit) I am ignoring this, as discussed yesterday I should make use of real server

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

Comment thread cliv2-private/go.mod Outdated
require (
github.com/snyk/ambient-canary v0.0.0-20260722064253-fba619a134a9
github.com/snyk/cli-extension-axi v0.0.0-20260807132828-734c2ae85a0a
github.com/snyk/cli-extension-axi v0.0.0-20260811175242-0677c6b7539b

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: The PR looks good! Let's update the commit and get this merged :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I believe this is done already

project = await createProjectFromFixture('npm/no-dependencies');
env = {
...process.env,
SNYK_API: process.env.TEST_SNYK_API ?? 'https://api.snyk.io',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: this is done globally in setup.

env = {
...process.env,
SNYK_API: process.env.TEST_SNYK_API ?? 'https://api.snyk.io',
SNYK_CFG_ORG: process.env.TEST_SNYK_ORG_SLUGNAME ?? 'team-cli-testing',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: this is done globally in setup.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected
📚 Repository Context Analyzed

This review considered 4 relevant code sections from 3 files (average relevance: 1.00)

🤖 Repository instructions applied (from AGENTS.md)

@robertolopezlopez
robertolopezlopez merged commit 020599b into main Aug 12, 2026
10 checks passed
@robertolopezlopez
robertolopezlopez deleted the feat/CLI-1700 branch August 12, 2026 15:27
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.

2 participants