Skip to content

fix(e2e): update rpc-go v3 CLI flags#3407

Merged
shaoboon merged 1 commit into
mainfrom
sb_fix_console_activate
Jul 6, 2026
Merged

fix(e2e): update rpc-go v3 CLI flags#3407
shaoboon merged 1 commit into
mainfrom
sb_fix_console_activate

Conversation

@shaoboon

@shaoboon shaoboon commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

  • Unit Tests have been added for new changes
  • API tests have been updated if applicable
  • All commented code has been removed
  • If you've added a dependency, you've ensured license is compatible with Apache 2.0 and clearly outlined the added dependency.

What are you changing?

  • Update rpc.exe/docker invocations to rpc-go v3 Kong CLI syntax (--json, --skip-amt-cert-check, --password, -configv2 -> --profile), fixing the JSON.parse failures caused by the old single-dash flags.
  • Extract getAmtInfo/getAmtVersion and buildInfoCommand/ buildActivateCommand/buildDeactivateCommand into activation.spec.ts so cloud and console specs share one implementation instead of duplicating command-string building and amtinfo parsing.
  • Replace the per-file updateCommandsForVersion closures with a single root-level before() hook that builds the activate command once per spec file using the detected AMT version.

Anything the reviewer should know when reviewing this PR?

If the there are associated PRs in other repositories, please link them here (i.e. device-management-toolkit/repo#365 )

tested using workflow dispatch: https://github.com/device-management-toolkit/e2e-testing/pull/110

@shaoboon shaoboon force-pushed the sb_fix_console_activate branch from f77d5ab to aaa85c1 Compare July 2, 2026 11:30
@shaoboon shaoboon changed the title fix(cypress): update rpc-go v3 CLI flags fix(e2e): update rpc-go v3 CLI flags Jul 2, 2026
@shaoboon shaoboon force-pushed the sb_fix_console_activate branch 5 times, most recently from 753f1c5 to c4caa8f Compare July 3, 2026 05:44
@shaoboon shaoboon marked this pull request as ready for review July 3, 2026 07:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates Cypress RPC activation e2e specs to use shared helpers and rpc-go v3 (Kong) CLI flag syntax, reducing command-construction duplication between cloud and console activation paths.

Changes:

  • Centralized rpc-go command building and AMT info parsing into activation.spec.ts for reuse.
  • Updated cloud/console activation specs to use shared helpers (getAmtInfo, version detection, and command builders).
  • Standardized “not activated” control-mode checks across specs via a shared allowed list.

Reviewed changes

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

File Description
cypress/e2e/integration/rpc/activation.spec.ts Adds shared AMT parsing helpers and rpc-go v3 command builders for cloud/console activation flows.
cypress/e2e/integration/rpc/cloud.activation.spec.ts Refactors cloud activation spec to use shared AMT parsing + command builders and simplifies per-test setup.
cypress/e2e/integration/rpc/console.activation.spec.ts Refactors console activation spec to use shared AMT parsing + command builders and standardizes activation-state checks.
Comments suppressed due to low confidence (1)

cypress/e2e/integration/rpc/console.activation.spec.ts:138

  • This assertion uses [data-cy="biosReleaseDate"], but the UI and other e2e specs use [data-cy="biosReleaseData"]. When amtVersion < 11, this selector mismatch will cause the console activation e2e to fail even if the page is correct.
              cy.get('[data-cy="biosManufacturer"]').should('not.be.empty')
              cy.get('[data-cy="biosVersion"]').should('not.be.empty')
              cy.get('[data-cy="biosReleaseDate"]').should('not.be.empty')
              cy.get('[data-cy="biosTargetOS"]').should('not.be.empty')

Comment thread cypress/e2e/integration/rpc/activation.spec.ts
Comment thread cypress/e2e/integration/rpc/activation.spec.ts
@shaoboon shaoboon force-pushed the sb_fix_console_activate branch from c4caa8f to 4cf6c8a Compare July 3, 2026 08:13
- Update rpc.exe/docker invocations to rpc-go v3 Kong CLI syntax
  (--json, --skip-amt-cert-check, --password, -configv2 -> --profile),
  fixing the JSON.parse failures caused by the old single-dash flags.
- Extract getAmtInfo/getAmtVersion and buildInfoCommand/
  buildActivateCommand/buildDeactivateCommand into activation.spec.ts
  so cloud and console specs share one implementation instead of
  duplicating command-string building and amtinfo parsing.
- Replace the per-file updateCommandsForVersion closures with a single
  root-level before() hook that builds the activate command once per
  spec file using the detected AMT version.
@shaoboon shaoboon force-pushed the sb_fix_console_activate branch from 4cf6c8a to 483a1ca Compare July 3, 2026 08:44
@shaoboon shaoboon merged commit 9ccec21 into main Jul 6, 2026
8 of 9 checks passed
@shaoboon shaoboon deleted the sb_fix_console_activate branch July 6, 2026 02:42
RosieAMT pushed a commit that referenced this pull request Jul 6, 2026
## [3.58.2](v3.58.1...v3.58.2) (2026-07-06)

### Bug Fixes

* **e2e:** update rpc-go v3 CLI flags ([#3407](#3407)) ([9ccec21](9ccec21))
@RosieAMT

RosieAMT commented Jul 6, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 3.58.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants