Browse Source
Merge pull request #17786 from abpframework/auto-merge/rel-7-4/2216
Merge branch dev with rel-7.4
pull/17797/head
maliming
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
7 additions and
6 deletions
-
npm/ng-packs/packages/core/src/lib/tests/capsLock.directive.spec.ts
-
npm/ng-packs/packages/core/src/lib/tests/show-password-directive.spec.ts
-
npm/ng-packs/packages/core/src/lib/tests/utils/mock-compare-function.ts
-
npm/ng-packs/packages/oauth/src/lib/tests/auth.guard.spec.ts
|
|
|
@ -11,7 +11,7 @@ import { By } from '@angular/platform-browser'; |
|
|
|
imports:[TrackCapsLockDirective] |
|
|
|
}) |
|
|
|
class TestComponent { |
|
|
|
capsLock:boolean = false |
|
|
|
capsLock = false |
|
|
|
} |
|
|
|
|
|
|
|
describe('TrackCapsLockDirective',()=>{ |
|
|
|
|
|
|
|
@ -13,7 +13,7 @@ import { By } from '@angular/platform-browser'; |
|
|
|
imports:[ShowPasswordDirective] |
|
|
|
}) |
|
|
|
class TestComponent { |
|
|
|
showPassword:boolean = false |
|
|
|
showPassword = false |
|
|
|
} |
|
|
|
|
|
|
|
describe('ShowPasswordDirective',()=>{ |
|
|
|
@ -46,7 +46,7 @@ describe('ShowPasswordDirective',()=>{ |
|
|
|
}); |
|
|
|
|
|
|
|
it('should have three input has ShowPasswordDirective elements', () => { |
|
|
|
let input = des[2].nativeElement |
|
|
|
const input = des[2].nativeElement |
|
|
|
expect(input.type).toBe('password') |
|
|
|
fixture.componentInstance.showPassword = true |
|
|
|
fixture.detectChanges() |
|
|
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
import { ABP } from '@abp/ng.core'; |
|
|
|
import { ABP } from "../../models"; |
|
|
|
|
|
|
|
|
|
|
|
export const mockCompareFunction = (a: ABP.Route, b: ABP.Route) => { |
|
|
|
const aName = a.name; |
|
|
|
const bName = b.name; |
|
|
|
|
|
|
|
@ -7,8 +7,8 @@ import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; |
|
|
|
describe('AuthGuard', () => { |
|
|
|
let spectator: SpectatorService<AbpOAuthGuard>; |
|
|
|
let guard : AbpOAuthGuard; |
|
|
|
let route = createSpyObject<ActivatedRouteSnapshot>(ActivatedRouteSnapshot) |
|
|
|
let state = createSpyObject<RouterStateSnapshot>(RouterStateSnapshot) |
|
|
|
const route = createSpyObject<ActivatedRouteSnapshot>(ActivatedRouteSnapshot) |
|
|
|
const state = createSpyObject<RouterStateSnapshot>(RouterStateSnapshot) |
|
|
|
|
|
|
|
const createService = createServiceFactory({ |
|
|
|
service: AbpOAuthGuard, |
|
|
|
|