-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jp okta 417473 #1145
Jp okta 417473 #1145
Conversation
4972a9b
to
88ff21e
Compare
0a8d702
to
eaa7ee0
Compare
88ff21e
to
a2ea1d1
Compare
Codecov Report
@@ Coverage Diff @@
## master #1145 +/- ##
==========================================
- Coverage 93.52% 92.33% -1.20%
==========================================
Files 157 153 -4
Lines 4280 4434 +154
Branches 938 990 +52
==========================================
+ Hits 4003 4094 +91
- Misses 261 319 +58
- Partials 16 21 +5
Continue to review full report at Codecov.
|
c3a0109
to
f416467
Compare
7ed17eb
to
b292b32
Compare
@@ -182,6 +182,10 @@ export class Remediator { | |||
if (Array.isArray(input)) { | |||
input.forEach(i => inputs.push(i)); | |||
} else { | |||
// guarantees field-level messages are passed back | |||
if (messages) { | |||
input.messages = messages; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
field-level messages fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember we also have a jira for this issue, we can close that one together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Please also add changelogs
@@ -336,8 +335,6 @@ class OktaAuth implements OktaAuthInterface, SigninAPI, SignoutAPI { | |||
unlockAccount: unlockAccount.bind(null, this), | |||
}; | |||
|
|||
setGlobalRequestInterceptor(createGlobalRequestInterceptor(this)); // to pass custom headers to IDX endpoints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! this is what we need for the tree shaking next step
@@ -35,6 +35,20 @@ export interface InteractResponse { | |||
meta: IdxTransactionMeta; | |||
} | |||
|
|||
/* eslint-disable camelcase */ | |||
export interface InteractParams { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove export to keep this type private
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this type is used in a few other places: https://github.com/okta/okta-auth-js/blob/jp-OKTA-417473/lib/types/api.ts#L298
@@ -182,6 +182,10 @@ export class Remediator { | |||
if (Array.isArray(input)) { | |||
input.forEach(i => inputs.push(i)); | |||
} else { | |||
// guarantees field-level messages are passed back | |||
if (messages) { | |||
input.messages = messages; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember we also have a jira for this issue, we can close that one together.
test/spec/OktaAuth/constructor.ts
Outdated
features: require('../../../lib/features'), | ||
idxHeaders: require('../../../lib/idx/headers') | ||
}; | ||
// const mocked = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
/* | ||
Doing a jest.mock('../../src/makeIdxState') has problems with jest.mock causing the test to hang | ||
and spikes up the CPU usage for the current node process. | ||
Alternative mocking approach: https://jestjs.io/docs/en/es6-class-mocks | ||
*/ | ||
const mockMakeIdxState = jest.fn(); | ||
jest.mock('../../../../../../lib/idx/idx-js/v1/makeIdxState', () => ({ | ||
jest.mock('../../../../../../lib/idx/idxState/v1/makeIdxState', () => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe in a future refactor we can map ../../../../../../lib/
to an alias in jest config with moduleNameMapper
6fd207f
to
a1e8d9d
Compare
a1e8d9d
to
4baca3d
Compare
OKTA-417473 <<<Jenkins Check-In of Tested SHA: 4baca3d for eng_productivity_ci_bot_okta@okta.com>>> Artifact: okta-auth-js Files changed count: 76 PR Link: "#1145"
No description provided.