Skip to content

Conversation

ancheetah
Copy link
Collaborator

@ancheetah ancheetah commented Aug 11, 2025

JIRA Ticket

https://pingidentity.atlassian.net/browse/SDKS-4053

Description

  • adds e2e tests for oidc client

Added changeset

Copy link

changeset-bot bot commented Aug 11, 2025

🦋 Changeset detected

Latest commit: 5fe1f95

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@forgerock/oidc-client Minor
@forgerock/davinci-client Minor
@forgerock/protect Minor
@forgerock/sdk-types Minor
@forgerock/sdk-utilities Minor
@forgerock/iframe-manager Minor
@forgerock/sdk-logger Minor
@forgerock/sdk-oidc Minor
@forgerock/sdk-request-middleware Minor
@forgerock/storage Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

nx-cloud bot commented Aug 11, 2025

View your CI Pipeline Execution ↗ for commit 5fe1f95

Command Status Duration Result
nx run-many -t build ✅ Succeeded <1s View ↗
nx affected -t build typecheck lint test e2e-ci ✅ Succeeded 1m 16s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2025-08-20 18:28:55 UTC

Copy link
Contributor

github-actions bot commented Aug 11, 2025

Deployed ba29fba to https://ForgeRock.github.io/ping-javascript-sdk/pr-368/ba29fbaf97ff4b3a2039026af965a9a3f93e30dd branch gh-pages in ForgeRock/ping-javascript-sdk

Copy link
Contributor

github-actions bot commented Aug 11, 2025

📦 Bundle Size Analysis

📦 Bundle Size Analysis

📊 Minor Changes

📈 @forgerock/oidc-client - 21.4 KB (+0.3 KB)
📈 @forgerock/sdk-types - 5.9 KB (+0.1 KB)
📉 @forgerock/sdk-oidc - 2.7 KB (-0.7 KB)

➖ No Changes

@forgerock/protect - 152.3 KB
@forgerock/davinci-client - 34.1 KB
@forgerock/sdk-utilities - 4.0 KB
@forgerock/device-client - 9.2 KB
@forgerock/iframe-manager - 2.4 KB
@forgerock/sdk-request-middleware - 4.4 KB
@forgerock/storage - 1.4 KB
@forgerock/sdk-logger - 1.6 KB


11 packages analyzed • Baseline from latest main build

Legend

🆕 New package
🔺 Size increased
🔻 Size decreased
➖ No change

ℹ️ How bundle sizes are calculated
  • Current Size: Total gzipped size of all files in the package's dist directory
  • Baseline: Comparison against the latest build from the main branch
  • Files included: All build outputs except source maps and TypeScript build cache
  • Exclusions: .map, .tsbuildinfo, and .d.ts.map files

🔄 Updated automatically on each push to this PR

@ancheetah ancheetah force-pushed the SDKS-4053-qa-oidc-client branch 2 times, most recently from 1243ac3 to cc4af7c Compare August 12, 2025 13:56
Copy link
Collaborator

@cerebrl cerebrl left a comment

Choose a reason for hiding this comment

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

This looks good. I would like to add some negative cases to ensure we're returning the right errors in common use cases.

@ancheetah ancheetah force-pushed the SDKS-4053-qa-oidc-client branch from cc4af7c to d88e202 Compare August 12, 2025 20:42
@ancheetah
Copy link
Collaborator Author

  • added unit tests
  • refactored e2e test with asyncEvents
  • added e2e test for pi.flow
  • moved GetAuthorizationUrlOptions type from @forgerock/sdk-oidc to @forgerock/sdk-types

@ancheetah
Copy link
Collaborator Author

This looks good. I would like to add some negative cases to ensure we're returning the right errors in common use cases.

@cerebrl The only negative test case I can think of that would work with the e2e app is testing the state mismatch error from token exchange by navigating to a page with an invalid code and state. Any others you can think of? I think user would be difficult to test, but perhaps something for authorize.background?

@ancheetah ancheetah force-pushed the SDKS-4053-qa-oidc-client branch from d88e202 to 09b24e1 Compare August 13, 2025 15:22
@ancheetah ancheetah force-pushed the SDKS-4053-qa-oidc-client branch 2 times, most recently from 0a9d365 to bc6a1e5 Compare August 14, 2025 14:02
@ancheetah ancheetah marked this pull request as ready for review August 14, 2025 14:03
@ancheetah ancheetah requested review from cerebrl and ryanbas21 August 14, 2025 14:03
@ancheetah ancheetah force-pushed the SDKS-4053-qa-oidc-client branch from bc6a1e5 to 0242180 Compare August 14, 2025 16:30
Copy link
Collaborator

@ryanbas21 ryanbas21 left a comment

Choose a reason for hiding this comment

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

This looks good, just a few comments

*/
import { CustomLogger } from '@forgerock/sdk-logger';
import { GetAuthorizationUrlOptions } from '@forgerock/sdk-oidc';
import { GetAuthorizationUrlOptions } from '@forgerock/sdk-types';
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we have a type import here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can update this but I don't think we're very consistent with type imports. I'm definitely guilty of this but I'll try to be better.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is often a side-effect of VS Code auto-importing the types. It does not include the type keyword. I've been routinely going back and fixing the missing keyword. It's not a huge deal, but it's good to fix them when you come across them.

});
});

it.effect('handleTokenResponseµ with no data fails', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

import { iFrameManager, ResolvedParams } from '@forgerock/iframe-manager';

import type { WellKnownResponse } from '@forgerock/sdk-types';
import type { WellKnownResponse, GetAuthorizationUrlOptions } from '@forgerock/sdk-types';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome, thanks!

Copy link
Collaborator

@cerebrl cerebrl left a comment

Choose a reason for hiding this comment

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

I think this is great. I have no criticisms to leave here.

@ancheetah ancheetah force-pushed the SDKS-4053-qa-oidc-client branch from 0242180 to 1cb5e73 Compare August 18, 2025 14:40
@codecov-commenter
Copy link

codecov-commenter commented Aug 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.47%. Comparing base (777e771) to head (5fe1f95).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #368      +/-   ##
==========================================
- Coverage   57.58%   55.47%   -2.11%     
==========================================
  Files          32       32              
  Lines        2044     2044              
  Branches      321      340      +19     
==========================================
- Hits         1177     1134      -43     
- Misses        867      910      +43     

see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ancheetah ancheetah force-pushed the SDKS-4053-qa-oidc-client branch 2 times, most recently from 4b1a820 to 24d6c31 Compare August 18, 2025 16:29
Copy link
Collaborator

@cerebrl cerebrl left a comment

Choose a reason for hiding this comment

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

This is unbelievable good. Approved.

@ancheetah ancheetah force-pushed the SDKS-4053-qa-oidc-client branch from 24d6c31 to 5fe1f95 Compare August 20, 2025 18:26
@ancheetah ancheetah merged commit c806452 into main Aug 20, 2025
4 checks passed
@ancheetah ancheetah deleted the SDKS-4053-qa-oidc-client branch August 20, 2025 18:31
@ryanbas21 ryanbas21 mentioned this pull request Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants