-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* paginate okta response on backend, add scrollbar to frontend * updating snapshot * updating unit tests * update mock to ensure it doesn't page * moving 'magic number' to constant
- Loading branch information
1 parent
8ddf077
commit 7828a38
Showing
5 changed files
with
34 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
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
import com.okta.sdk.resource.api.GroupApi; | ||
import com.okta.sdk.resource.api.UserApi; | ||
import com.okta.sdk.resource.client.ApiException; | ||
import com.okta.sdk.resource.common.PagedList; | ||
import com.okta.sdk.resource.group.GroupBuilder; | ||
import com.okta.sdk.resource.model.Application; | ||
import com.okta.sdk.resource.model.Group; | ||
|
@@ -586,7 +587,7 @@ void getAllUsersForOrganization() { | |
var mockGroupList = List.of(mockGroup); | ||
var mockUser = mock(User.class); | ||
var mockUserProfile = mock(UserProfile.class); | ||
var mockUserList = List.of(mockUser); | ||
PagedList<User> mockedUserList = new PagedList<>(List.of(mockUser), "", "", null); | ||
when(groupApi.listGroups( | ||
eq(groupProfilePrefix), | ||
isNull(), | ||
|
@@ -599,7 +600,7 @@ void getAllUsersForOrganization() { | |
.thenReturn(mockGroupList); | ||
when(mockGroup.getProfile()).thenReturn(mockGroupProfile); | ||
when(mockGroupProfile.getName()).thenReturn(groupProfilePrefix); | ||
when(groupApi.listGroupUsers(any(), isNull(), isNull())).thenReturn(mockUserList); | ||
when(groupApi.listGroupUsers(any(), any(), any())).thenReturn(mockedUserList); | ||
when(mockUser.getProfile()).thenReturn(mockUserProfile); | ||
when(mockUserProfile.getLogin()).thenReturn("[email protected]"); | ||
|
||
|
@@ -633,7 +634,7 @@ void getAllUsersWithStatusForOrganization() { | |
var mockGroupList = List.of(mockGroup); | ||
var mockGroupProfile = mock(GroupProfile.class); | ||
var mockUser = mock(User.class); | ||
var mockUserList = List.of(mockUser); | ||
PagedList<User> mockUserList = new PagedList<>(List.of(mockUser), "", "", null); | ||
var mockUserProfile = mock(UserProfile.class); | ||
when(groupApi.listGroups( | ||
eq(groupProfilePrefix), | ||
|
@@ -648,7 +649,7 @@ void getAllUsersWithStatusForOrganization() { | |
when(mockGroup.getProfile()).thenReturn(mockGroupProfile); | ||
when(mockGroupProfile.getName()).thenReturn(groupProfilePrefix); | ||
when(mockGroup.getId()).thenReturn("1234"); | ||
when(groupApi.listGroupUsers(eq("1234"), isNull(), isNull())).thenReturn(mockUserList); | ||
when(groupApi.listGroupUsers(eq("1234"), any(), any())).thenReturn(mockUserList); | ||
when(mockUser.getProfile()).thenReturn(mockUserProfile); | ||
when(mockUserProfile.getLogin()).thenReturn("[email protected]"); | ||
when(mockUser.getStatus()).thenReturn(UserStatus.ACTIVE); | ||
|
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