Skip to content
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

Fix runtime errors in Storybooks #456

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const config = {
'../__mocks__/DetailsFields.js'
);
config.resolve.alias['@pega/react-sdk-components/lib/components/helpers/state-utils'] = path.resolve(__dirname, '../__mocks__/state-utils.tsx');
config.resolve.alias['@pega/auth/lib/sdk-auth-manager'] = path.resolve(__dirname, '../__mocks__/authManager.tsx');
config.module.rules.push({
test: /\.(d.ts)$/,
loader: 'null-loader'
Expand Down
34 changes: 34 additions & 0 deletions __mocks__/authManager.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/** This file contains the Mocks for the various auth-manager APIs */
export function getHomeUrl() {
/* nothing */
}
export function authIsMainRedirect() {
/* nothing */
}
export function authRedirectCallback() {
/* nothing */
}
export function sdkIsLoggedIn() {
/* nothing */
}
export function loginIfNecessary() {
/* nothing */
}
export function sdkSetAuthHeader() {
/* nothing */
}
export function sdkSetCustomTokenParamsCB() {
/* nothing */
}
export function getSdkConfig() {
/* nothing */
}
export function SdkConfigAccess() {
/* nothing */
}
export function getAvailablePortals() {
/* nothing */
}
export function logout() {
/* nothing */
}
Loading