Skip to content

STCOR-574 rotate tokens after 80% of their TTL (#1361) #1436

STCOR-574 rotate tokens after 80% of their TTL (#1361)

STCOR-574 rotate tokens after 80% of their TTL (#1361) #1436

GitHub Actions / Jest Unit Test Results succeeded Oct 31, 2023 in 0s

All 127 tests pass in 21s

127 tests  +2   127 ✔️ +2   21s ⏱️ +4s
  15 suites ±0       0 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit dd71819. ± Comparison against earlier commit 27d2948.

Annotations

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Jest Unit Test Results

127 tests found

There are 127 tests, see "Raw output" for the full list of tests.
Raw output
AboutInstallMessages finds a version ‑ AboutInstallMessages finds a version
AboutInstallMessages finds an install date ‑ AboutInstallMessages finds an install date
AboutInstallMessages finds an install message ‑ AboutInstallMessages finds an install message
CreateResetPassword utils getTenant should return tenant value from location ?search when defined ‑ CreateResetPassword utils getTenant should return tenant value from location ?search when defined
CreateResetPassword utils getTenant should return tenant value from okapi when location search is empty ‑ CreateResetPassword utils getTenant should return tenant value from okapi when location search is empty
Given useChunkedCQLFetch deduplicates ids as expected sets up 1 fetch for the 5 unique ids ‑ Given useChunkedCQLFetch deduplicates ids as expected sets up 1 fetch for the 5 unique ids
Given useChunkedCQLFetch sets up correct number of fetches sets up 1 fetch for the 5 ids by default ‑ Given useChunkedCQLFetch sets up correct number of fetches sets up 1 fetch for the 5 ids by default
Given useChunkedCQLFetch sets up correct number of fetches sets up 3 fetches for the 5 ids when STEP_SIZE = 2 ‑ Given useChunkedCQLFetch sets up correct number of fetches sets up 3 fetches for the 5 ids when STEP_SIZE = 2
Given useChunkedCQLFetch sets up correct number of fetches sets up 5 fetches for the 5 ids when STEP_SIZE = 1 ‑ Given useChunkedCQLFetch sets up correct number of fetches sets up 5 fetches for the 5 ids when STEP_SIZE = 1
Given useChunkedCQLFetch works with an id list of > 300 ids sets up 1 fetch for the 5 unique ids ‑ Given useChunkedCQLFetch works with an id list of > 300 ids sets up 1 fetch for the 5 unique ids
Given useConfigurations configurationsApi includes code in the API query ‑ Given useConfigurations configurationsApi includes code in the API query
Given useConfigurations configurationsApi includes configName in the API query ‑ Given useConfigurations configurationsApi includes configName in the API query
Given useConfigurations configurationsApi includes module in the API query ‑ Given useConfigurations configurationsApi includes module in the API query
Given useConfigurations configurationsApi joins criteria with "AND" ‑ Given useConfigurations configurationsApi joins criteria with "AND"
Given useConfigurations configurationsApi retrieves all values without any criteria ‑ Given useConfigurations configurationsApi retrieves all values without any criteria
Given useConfigurations correctly checks permissions: with permissions with permission, calls get ‑ Given useConfigurations correctly checks permissions: with permissions with permission, calls get
Given useConfigurations correctly checks permissions: without permissions without permission, throws an error ‑ Given useConfigurations correctly checks permissions: without permissions without permission, throws an error
Given useOkapiEnv correctly checks permissions: with permissions with permission, calls get ‑ Given useOkapiEnv correctly checks permissions: with permissions with permission, calls get
Given useOkapiEnv correctly checks permissions: without permissions without permission, throws an error ‑ Given useOkapiEnv correctly checks permissions: without permissions without permission, throws an error
ProfileDropdown should display current consortium (if enabled) in the dropdown trigger ‑ ProfileDropdown should display current consortium (if enabled) in the dropdown trigger
ProfileDropdown should display module profile dropdown item ‑ ProfileDropdown should display module profile dropdown item
StaleBundleWarning equal responses render nothing ‑ StaleBundleWarning equal responses render nothing
StaleBundleWarning query reads request body ‑ StaleBundleWarning query reads request body
StaleBundleWarning query reads request header ‑ StaleBundleWarning query reads request header
StaleBundleWarning query returns null if config is absent ‑ StaleBundleWarning query returns null if config is absent
StaleBundleWarning query swallows errors but warns about them ‑ StaleBundleWarning query swallows errors but warns about them
StaleBundleWarning unequal responses render a refresh warning clicking warning button calls reload ‑ StaleBundleWarning unequal responses render a refresh warning clicking warning button calls reload
StaleBundleWarning unequal responses render a refresh warning warning is present ‑ StaleBundleWarning unequal responses render a refresh warning warning is present
consortiaServices checkIfUserInCentralTenant when consortia interface is not available should return false ‑ consortiaServices checkIfUserInCentralTenant when consortia interface is not available should return false
consortiaServices checkIfUserInCentralTenant when tenant does not match central tenant id should return false ‑ consortiaServices checkIfUserInCentralTenant when tenant does not match central tenant id should return false
consortiaServices checkIfUserInCentralTenant when tenant matches central tenant id should return true ‑ consortiaServices checkIfUserInCentralTenant when tenant matches central tenant id should return true
consortiaServices checkIfUserInMemberTenant when consortia interface is not available should return false ‑ consortiaServices checkIfUserInMemberTenant when consortia interface is not available should return false
consortiaServices checkIfUserInMemberTenant when tenant does not match central tenant id should return true ‑ consortiaServices checkIfUserInMemberTenant when tenant does not match central tenant id should return true
consortiaServices checkIfUserInMemberTenant when tenant matches central tenant id should return false ‑ consortiaServices checkIfUserInMemberTenant when tenant matches central tenant id should return false
createOkapiSession clears authentication errors and sends a TOKEN_EXPIRATION message ‑ createOkapiSession clears authentication errors and sends a TOKEN_EXPIRATION message
entryFor should find a matching entry ‑ entryFor should find a matching entry
entryFor should return empty string for missing configs ‑ entryFor should return empty string for missing configs
entryFor should return empty string for missing entry ‑ entryFor should return empty string for missing entry
finds conditional fields finds an install-date even when no install-version is present ‑ finds conditional fields finds an install-date even when no install-version is present
finds conditional fields finds an install-version when no install-date is present ‑ finds conditional fields finds an install-version when no install-date is present
handleLoginError dispatches setOkapiReady ‑ handleLoginError dispatches setOkapiReady
handleServiceWorkerMessage handles same-origin events on RTR error, ends session ‑ handleServiceWorkerMessage handles same-origin events on RTR error, ends session
handleServiceWorkerMessage handles same-origin events on RTR, dispatches new token-expiration data ‑ handleServiceWorkerMessage handles same-origin events on RTR, dispatches new token-expiration data
handleServiceWorkerMessage handles same-origin events only handles events if data.source is "@folio/stripes-core" ‑ handleServiceWorkerMessage handles same-origin events only handles events if data.source is "@folio/stripes-core"
handleServiceWorkerMessage ignores cross-origin events mismatched event origin ‑ handleServiceWorkerMessage ignores cross-origin events mismatched event origin
handleServiceWorkerMessage ignores cross-origin events missing event origin ‑ handleServiceWorkerMessage ignores cross-origin events missing event origin
installDate should find a stripesConf value ‑ installDate should find a stripesConf value
installDate should prefer conf over stripesConf ‑ installDate should prefer conf over stripesConf
installDate should prefer env over conf, stripesConf ‑ installDate should prefer env over conf, stripesConf
installDate should return empty string for missing configs ‑ installDate should return empty string for missing configs
installMessage should find a stripesConf value ‑ installMessage should find a stripesConf value
installMessage should prefer conf over stripesConf ‑ installMessage should prefer conf over stripesConf
installMessage should prefer env over conf, stripesConf ‑ installMessage should prefer env over conf, stripesConf
installMessage should return empty string for missing configs ‑ installMessage should return empty string for missing configs
installVersion should find a stripesConf value ‑ installVersion should find a stripesConf value
installVersion should prefer conf over stripesConf ‑ installVersion should prefer conf over stripesConf
installVersion should prefer env over conf, stripesConf ‑ installVersion should prefer env over conf, stripesConf
installVersion should return empty string for missing configs ‑ installVersion should return empty string for missing configs
isLogoutRequest accepts logout endpoints /authn/logout ‑ isLogoutRequest accepts logout endpoints /authn/logout
isLogoutRequest rejects unknown endpoints ‑ isLogoutRequest rejects unknown endpoints
isOkapiRequest accepts requests whose origin matches okapi's ‑ isOkapiRequest accepts requests whose origin matches okapi's
isOkapiRequest rejects requests whose origin does not match okapi's ‑ isOkapiRequest rejects requests whose origin does not match okapi's
isPermissibleRequest when AT is invalid or missing accepts known endpoints that do not require authorization /bl-users/forgotten/password ‑ isPermissibleRequest when AT is invalid or missing accepts known endpoints that do not require authorization /bl-users/forgotten/password
isPermissibleRequest when AT is invalid or missing accepts known endpoints that do not require authorization /bl-users/forgotten/username ‑ isPermissibleRequest when AT is invalid or missing accepts known endpoints that do not require authorization /bl-users/forgotten/username
isPermissibleRequest when AT is invalid or missing accepts known endpoints that do not require authorization /bl-users/login-with-expiry ‑ isPermissibleRequest when AT is invalid or missing accepts known endpoints that do not require authorization /bl-users/login-with-expiry
isPermissibleRequest when AT is invalid or missing accepts known endpoints that do not require authorization /bl-users/password-reset ‑ isPermissibleRequest when AT is invalid or missing accepts known endpoints that do not require authorization /bl-users/password-reset
isPermissibleRequest when AT is invalid or missing accepts known endpoints that do not require authorization /saml/check ‑ isPermissibleRequest when AT is invalid or missing accepts known endpoints that do not require authorization /saml/check
isPermissibleRequest when AT is invalid or missing rejects unknown endpoints ‑ isPermissibleRequest when AT is invalid or missing rejects unknown endpoints
isPermissibleRequest when AT is valid when AT is valid, accepts any endpoint ‑ isPermissibleRequest when AT is valid when AT is valid, accepts any endpoint
isValidAT returns false for ATs 5% or less of their TTL remaining ‑ isValidAT returns false for ATs 5% or less of their TTL remaining
isValidAT returns false for expired ATs ‑ isValidAT returns false for expired ATs
isValidAT returns false when AT info is missing ‑ isValidAT returns false when AT info is missing
isValidAT returns true for ATs with 95% or more of their TTL remaining ‑ isValidAT returns true for ATs with 95% or more of their TTL remaining
isValidRT returns false for RTs 5% or less of their TTL remaining ‑ isValidRT returns false for RTs 5% or less of their TTL remaining
isValidRT returns false for expired RTs ‑ isValidRT returns false for expired RTs
isValidRT returns false when RT info is missing ‑ isValidRT returns false when RT info is missing
isValidRT returns true for valid RTs ‑ isValidRT returns true for valid RTs
loadTranslations dispatches setLocale ‑ loadTranslations dispatches setLocale
loadTranslations sets document attributes correctly sets dir (LTR) ‑ loadTranslations sets document attributes correctly sets dir (LTR)
loadTranslations sets document attributes correctly sets dir (RTL) ‑ loadTranslations sets document attributes correctly sets dir (RTL)
loadTranslations sets document attributes correctly sets lang given region ‑ loadTranslations sets document attributes correctly sets lang given region
loadTranslations sets document attributes correctly sets lang without region ‑ loadTranslations sets document attributes correctly sets lang without region
messageToClient when clients are absent, ignores events event.clientId is absent ‑ messageToClient when clients are absent, ignores events event.clientId is absent
messageToClient when clients are absent, ignores events self.clients.get(event.clientId) is empty ‑ messageToClient when clients are absent, ignores events self.clients.get(event.clientId) is empty
messageToClient when clients are present, posts a message posts a message ‑ messageToClient when clients are present, posts a message posts a message
okapiReducer SET_IS_AUTHENTICATED ‑ okapiReducer SET_IS_AUTHENTICATED
okapiReducer SET_LOGIN_DATA ‑ okapiReducer SET_LOGIN_DATA
okapiReducer SET_SESSION_DATA ‑ okapiReducer SET_SESSION_DATA
okapiReducer UPDATE_CURRENT_USER ‑ okapiReducer UPDATE_CURRENT_USER
passThrough non-okapi requests break on through, break on through, break on through to the other side failed requests receive a rejection ‑ passThrough non-okapi requests break on through, break on through, break on through to the other side failed requests receive a rejection
passThrough non-okapi requests break on through, break on through, break on through to the other side successful requests receive a response ‑ passThrough non-okapi requests break on through, break on through, break on through to the other side successful requests receive a response
passThrough okapi requests are subject to RTR requests to logout succeed ‑ passThrough okapi requests are subject to RTR requests to logout succeed
passThrough okapi requests are subject to RTR requests with false-valid AT data succeed via RTR ‑ passThrough okapi requests are subject to RTR requests with false-valid AT data succeed via RTR
passThrough okapi requests are subject to RTR requests with false-valid RTs fail softly ‑ passThrough okapi requests are subject to RTR requests with false-valid RTs fail softly
passThrough okapi requests are subject to RTR requests with invalid RTs fail softly ‑ passThrough okapi requests are subject to RTR requests with invalid RTs fail softly
passThrough okapi requests are subject to RTR requests with valid ATs succeed with error response ‑ passThrough okapi requests are subject to RTR requests with valid ATs succeed with error response
passThrough okapi requests are subject to RTR requests with valid ATs succeed with success response ‑ passThrough okapi requests are subject to RTR requests with valid ATs succeed with success response
passThrough okapi requests are subject to RTR requests with valid RTs succeed ‑ passThrough okapi requests are subject to RTR requests with valid RTs succeed
passThroughLogout succeeds even when it fails ‑ passThroughLogout succeeds even when it fails
passThroughLogout succeeds ‑ passThroughLogout succeeds
processOkapiSession handles error ‑ processOkapiSession handles error
processOkapiSession handles success ‑ processOkapiSession handles success
queryLimit should return 2000 ‑ queryLimit should return 2000
registerServiceWorker on failure registration is not in expected state ‑ registerServiceWorker on failure registration is not in expected state
registerServiceWorker on failure registration throws ‑ registerServiceWorker on failure registration throws
registerServiceWorker on success active ‑ registerServiceWorker on success active
registerServiceWorker on success installing ‑ registerServiceWorker on success installing
registerServiceWorker on success waiting ‑ registerServiceWorker on success waiting
rtr on error with JSON, returns it ‑ rtr on error with JSON, returns it
rtr on unknown error, throws a generic error ‑ rtr on unknown error, throws a generic error
setIsAuthenticated handles falsey values ‑ setIsAuthenticated handles falsey values
setIsAuthenticated handles truthy values ‑ setIsAuthenticated handles truthy values
setLoginData receives given data in "loginData" ‑ setLoginData receives given data in "loginData"
supportedLocales is an array of strings ‑ supportedLocales is an array of strings
supportedNumberingSystems is an array of strings ‑ supportedNumberingSystems is an array of strings
unregisterServiceWorker on failure ‑ unregisterServiceWorker on failure
unregisterServiceWorker on success ‑ unregisterServiceWorker on success
updateCurrentUser receives given data in "data" ‑ updateCurrentUser receives given data in "data"
updateTenant should set tenant and updated user in session ‑ updateTenant should set tenant and updated user in session
updateUser dispatches updateCurrentUser ‑ updateUser dispatches updateCurrentUser
useOkapiKy overrides tenant ‑ useOkapiKy overrides tenant
useOkapiKy provides default values if stripes lacks them ‑ useOkapiKy provides default values if stripes lacks them
useOkapiKy pulls values from stripes object ‑ useOkapiKy pulls values from stripes object
validateUser handles fetch failure from "_self" ‑ validateUser handles fetch failure from "_self"
validateUser handles invalid user ‑ validateUser handles invalid user
validateUser handles valid user with empty tenant in session ‑ validateUser handles valid user with empty tenant in session
validateUser handles valid user with tenant in session ‑ validateUser handles valid user with tenant in session