Skip to content

feat: add-optional-query-params-to-start#7

Merged
ryanbas21 merged 1 commit into
mainfrom
query-params-to-start
Jan 30, 2025
Merged

feat: add-optional-query-params-to-start#7
ryanbas21 merged 1 commit into
mainfrom
query-params-to-start

Conversation

@ryanbas21
Copy link
Copy Markdown
Collaborator

JIRA Ticket

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

Description

adds ability to add query parameters to the start call

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 28, 2025

🦋 Changeset detected

Latest commit: 6ce29c4

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

This PR includes changesets to release 1 package
Name Type
@forgerock/davinci-client 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

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Jan 28, 2025

View your CI Pipeline Execution ↗ for commit 6ce29c4.

Command Status Duration Result
nx affected -t typecheck build lint test docs e... ✅ Succeeded 1m 33s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-30 21:30:18 UTC

@ryanbas21 ryanbas21 force-pushed the query-params-to-start branch from 07c344f to 6959be7 Compare January 28, 2025 22:22
Comment thread e2e/davinci-app/main.ts
const config: DaVinciConfig = {
clientId: '724ec718-c41c-4d51-98b0-84a583f450f9',
redirectUri: window.location.href,
redirectUri: window.location.origin + '/',
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

because i added query params to the testing, i just appended the '/' since it's stripped when using origin.

Comment thread e2e/davinci-app/main.ts
});

const node = await davinciClient.start();
const qs = window.location.search;
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

logic so that we can pull query params dynamically in tests

"exclude": ["src/**/*.spec.ts", "src/**/*.test.ts"],
"include": ["src/**/*.ts"]
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"include": ["./main.ts", "components/**/*.ts"]
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

was causing issues with module resolution not using Bundler since there is no src dir here

{
"extends": "./tsconfig.json",
"compilerOptions": {
"moduleResolution": "NodeNext",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

i think this was me debugging but should be a noop since this affects test files.

const accessToken = await page.locator('#accessTokenValue').innerText();
await expect(accessToken).toBeTruthy();
});
test('ensure query params passed to start are sent off in authorize call', async ({ page }) => {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

copy pasted above test, passed in a query param and then also added a few other query params from authorize specifically to make sure thats what we are testing

@ryanbas21 ryanbas21 force-pushed the query-params-to-start branch from 6959be7 to 239d016 Compare January 28, 2025 22:27
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 29, 2025

Codecov Report

❌ Patch coverage is 15.38462% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.12%. Comparing base (ee8c7aa) to head (6ce29c4).
⚠️ Report is 770 commits behind head on main.

Files with missing lines Patch % Lines
packages/davinci-client/src/lib/davinci.api.ts 0.00% 23 Missing ⚠️
packages/davinci-client/src/lib/client.store.ts 0.00% 10 Missing ⚠️

❌ Your patch status has failed because the patch coverage (15.38%) is below the target coverage (40.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #7      +/-   ##
==========================================
+ Coverage   45.73%   54.12%   +8.39%     
==========================================
  Files          18       13       -5     
  Lines        2003     1637     -366     
  Branches      123      111      -12     
==========================================
- Hits          916      886      -30     
+ Misses       1087      751     -336     
Files with missing lines Coverage Δ
packages/davinci-client/src/lib/davinci.utils.ts 93.08% <100.00%> (+0.03%) ⬆️
packages/davinci-client/src/lib/node.slice.ts 87.66% <100.00%> (+0.16%) ⬆️
packages/davinci-client/src/lib/client.store.ts 0.00% <0.00%> (ø)
packages/davinci-client/src/lib/davinci.api.ts 0.00% <0.00%> (ø)

... and 5 files with indirect coverage changes

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

@ryanbas21 ryanbas21 force-pushed the query-params-to-start branch from 239d016 to dc96747 Compare January 30, 2025 21:24
adds ability to add query parameters to the start call
@ryanbas21 ryanbas21 force-pushed the query-params-to-start branch from dc96747 to 6ce29c4 Compare January 30, 2025 21:27
@ryanbas21 ryanbas21 merged commit e12d8c0 into main Jan 30, 2025
@ryanbas21 ryanbas21 deleted the query-params-to-start branch January 30, 2025 21:53
@github-actions github-actions Bot mentioned this pull request Jan 30, 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.

3 participants