-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3940 from 3scale/THREESCALE-11179_SSO-integration…
…s-empty-view 🦋 THREESCALE-11179: Account Settings > Users > SSO Integrations (Empty view)
- Loading branch information
Showing
6 changed files
with
78 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
app/javascript/src/AuthenticationProviders/components/AuthenticationProvidersEmptyState.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react' | ||
import { | ||
Title, | ||
Button, | ||
EmptyState, | ||
EmptyStateIcon, | ||
EmptyStateBody | ||
} from '@patternfly/react-core' | ||
import UserIcon from '@patternfly/react-icons/dist/esm/icons/user-icon' | ||
|
||
interface Props { | ||
newHref: string; | ||
} | ||
|
||
const AuthenticationProvidersEmptyState: React.FC<Props> = ({ newHref }) => ( | ||
<EmptyState> | ||
<EmptyStateIcon icon={UserIcon} /> | ||
<Title headingLevel="h4" size="lg"> | ||
No SSO integrations | ||
</Title> | ||
<EmptyStateBody> | ||
Choose a Single Sign-On (SSO) provider and create an integration to access the Admin Portal. | ||
</EmptyStateBody> | ||
<Button | ||
component="a" | ||
href={newHref} | ||
variant="primary" | ||
> | ||
Add a SSO integration | ||
</Button> | ||
</EmptyState> | ||
) | ||
|
||
export type { Props } | ||
export { AuthenticationProvidersEmptyState } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...javascripts/AuthenticationProviders/components/AuthenticationProvidersEmptyState.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { mount } from 'enzyme' | ||
|
||
import { AuthenticationProvidersEmptyState } from 'AuthenticationProviders/components/AuthenticationProvidersEmptyState' | ||
|
||
import type { Props } from 'AuthenticationProviders/components/AuthenticationProvidersEmptyState' | ||
|
||
const defaultProps = { | ||
newHref: '/new' | ||
} | ||
|
||
const mountWrapper = (props: Partial<Props> = {}) => mount(<AuthenticationProvidersEmptyState {...{ ...defaultProps, ...props }} />) | ||
|
||
it('should render itself', () => { | ||
const wrapper = mountWrapper() | ||
|
||
expect(wrapper.exists()).toEqual(true) | ||
}) |