Skip to content

Commit 3cc5fa5

Browse files
Mattia VianelliMattia Vianelli
authored andcommitted
DSC-2485 Tests fix
(cherry picked from commit c6f0d2425bc307d1a6e7bfd4a9c5639031b0fa52)
1 parent dc0d44c commit 3cc5fa5

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/app/shared/log-in/log-in.component.spec.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ describe('LogInComponent', () => {
138138

139139
it('should render a log-in container component for each auth method available', () => {
140140
const loginContainers = fixture.debugElement.queryAll(By.css('ds-log-in-container'));
141-
expect(loginContainers.length).toBe(2);
141+
expect(loginContainers.length).toBe(1);
142142

143143
});
144144

@@ -154,14 +154,15 @@ describe('LogInComponent', () => {
154154
expect(result).toEqual([{ authMethodType: AuthMethodType.Password, position: 1 }]);
155155
});
156156

157-
it('excludes password method when standard login is disabled', () => {
157+
it('does not exclude password method when standard login is disabled', () => {
158158
const authMethods = [
159159
{ authMethodType: AuthMethodType.Password, position: 1 },
160160
{ authMethodType: AuthMethodType.Shibboleth, position: 2 },
161161
];
162162
component.excludedAuthMethod = undefined;
163163
const result = component.filterAndSortAuthMethods(authMethods, false, true);
164164
expect(result).toEqual([
165+
{ authMethodType: AuthMethodType.Password, position: 1 },
165166
{ authMethodType: AuthMethodType.Shibboleth, position: 2 },
166167
]);
167168
});
@@ -176,8 +177,7 @@ describe('LogInComponent', () => {
176177
component.excludedAuthMethod = AuthMethodType.Ip;
177178
const result = component.filterAndSortAuthMethods(authMethods, isBackdoor);
178179
expect(result).toEqual([
179-
{ authMethodType: AuthMethodType.Password, position: 1 },
180-
{ authMethodType: AuthMethodType.Shibboleth, position: 3 },
180+
{ authMethodType: AuthMethodType.Shibboleth, position: 3 }
181181
]);
182182
});
183183

@@ -190,8 +190,7 @@ describe('LogInComponent', () => {
190190
component.excludedAuthMethod = undefined;
191191
const result = component.filterAndSortAuthMethods(authMethods, isBackdoor);
192192
expect(result).toEqual([
193-
{ authMethodType: AuthMethodType.Shibboleth, position: 1 },
194-
{ authMethodType: AuthMethodType.Password, position: 2 },
193+
{ authMethodType: AuthMethodType.Shibboleth, position: 1 }
195194
]);
196195
});
197196
});

0 commit comments

Comments
 (0)