forked from sunbird-cb/sunbird-cb-adminportal
-
Notifications
You must be signed in to change notification settings - Fork 4
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 #100 from KB-iGOT/sync-with-19-branch
Sync with 19 branch
- Loading branch information
Showing
142 changed files
with
5,778 additions
and
5,074 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ speed-measure-plugin.json | |
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
.angular | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
|
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
21 changes: 21 additions & 0 deletions
21
project/ws/app/src/lib/head/btn-channel-analytics/btn-channel-analytics.component.spec.ts
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,21 @@ | ||
import '@angular/compiler' | ||
import { BtnChannelAnalyticsComponent } from './btn-channel-analytics.component' | ||
|
||
describe('BtnChannelAnalyticsComponent', () => { | ||
let component: BtnChannelAnalyticsComponent | ||
|
||
beforeAll(() => { | ||
component = new BtnChannelAnalyticsComponent( | ||
|
||
) | ||
}) | ||
|
||
beforeEach(() => { | ||
jest.clearAllMocks() | ||
jest.resetAllMocks() | ||
}) | ||
|
||
it('should create a instance of component', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
32 changes: 32 additions & 0 deletions
32
...omponents/btn-content-feedback-dialog-v2/btn-content-feedback-dialog-v2.component.spec.ts
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,32 @@ | ||
|
||
import { MatDialogRef } from '@angular/material/dialog' | ||
import { MatSnackBar } from '@angular/material/snack-bar' | ||
import { FeedbackService } from '../../services/feedback.service' | ||
import { BtnContentFeedbackDialogV2Component } from './btn-content-feedback-dialog-v2.component' | ||
|
||
describe('BtnContentFeedbackDialogV2Component', () => { | ||
let component: BtnContentFeedbackDialogV2Component | ||
|
||
const content: any = {} | ||
const dialogRef: Partial<MatDialogRef<BtnContentFeedbackDialogV2Component>> = {} | ||
const feedbackApi: Partial<FeedbackService> = {} | ||
const snackbar: Partial<MatSnackBar> = {} | ||
|
||
beforeAll(() => { | ||
component = new BtnContentFeedbackDialogV2Component( | ||
content as any, | ||
dialogRef as MatDialogRef<BtnContentFeedbackDialogV2Component>, | ||
feedbackApi as FeedbackService, | ||
snackbar as MatSnackBar | ||
) | ||
}) | ||
|
||
beforeEach(() => { | ||
jest.clearAllMocks() | ||
jest.resetAllMocks() | ||
}) | ||
|
||
it('should create a instance of component', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
27 changes: 27 additions & 0 deletions
27
...-feedback-v2/components/btn-content-feedback-v2/btn-content-feedback-v2.component.spec.ts
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,27 @@ | ||
import '@angular/compiler' | ||
import { MatDialog } from '@angular/material/dialog' | ||
import { ConfigurationsService } from '@sunbird-cb/utils' | ||
import { BtnContentFeedbackV2Component } from './btn-content-feedback-v2.component' | ||
|
||
describe('BtnContentFeedbackV2Component', () => { | ||
let component: BtnContentFeedbackV2Component | ||
|
||
const dialog: Partial<MatDialog> = {} | ||
const configSvc: Partial<ConfigurationsService> = {} | ||
|
||
beforeAll(() => { | ||
component = new BtnContentFeedbackV2Component( | ||
dialog as MatDialog, | ||
configSvc as ConfigurationsService | ||
) | ||
}) | ||
|
||
beforeEach(() => { | ||
jest.clearAllMocks() | ||
jest.resetAllMocks() | ||
}) | ||
|
||
it('should create a instance of component', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
24 changes: 24 additions & 0 deletions
24
.../btn-content-feedback-v2/components/feedback-snackbar/feedback-snackbar.component.spec.ts
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,24 @@ | ||
|
||
import { IFeedbackSnackbarData } from '../../models/feedback.model' | ||
import { FeedbackSnackbarComponent } from './feedback-snackbar.component' | ||
|
||
describe('FeedbackSnackbarComponent', () => { | ||
let component: FeedbackSnackbarComponent | ||
|
||
const snackbarData: Partial<IFeedbackSnackbarData> = {} | ||
|
||
beforeAll(() => { | ||
component = new FeedbackSnackbarComponent( | ||
snackbarData as IFeedbackSnackbarData | ||
) | ||
}) | ||
|
||
beforeEach(() => { | ||
jest.clearAllMocks() | ||
jest.resetAllMocks() | ||
}) | ||
|
||
it('should create a instance of component', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
33 changes: 33 additions & 0 deletions
33
project/ws/app/src/lib/head/ui-admin-table/directory-list/directory-table.component.spec.ts
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,33 @@ | ||
(window as any)['env'] = { | ||
name: 'test-environment', | ||
sitePath: '/test-site-path', | ||
karmYogiPath: '/test-karm-yogi-path', | ||
cbpPath: '/test-cbp-path', | ||
} | ||
|
||
import { Router } from '@angular/router' | ||
import { EventService } from '@sunbird-cb/utils' | ||
import { UIDirectoryTableComponent } from './directory-table.component' | ||
|
||
describe('UIDirectoryTableComponent', () => { | ||
let component: UIDirectoryTableComponent | ||
|
||
const router: Partial<Router> = {} | ||
const events: Partial<EventService> = {} | ||
|
||
beforeAll(() => { | ||
component = new UIDirectoryTableComponent( | ||
router as Router, | ||
events as EventService | ||
) | ||
}) | ||
|
||
beforeEach(() => { | ||
jest.clearAllMocks() | ||
jest.resetAllMocks() | ||
}) | ||
|
||
it('should create a instance of component', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
30 changes: 30 additions & 0 deletions
30
...s/app/src/lib/head/ui-admin-table/discussion-list/discussion-post-popup.component.spec.ts
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,30 @@ | ||
|
||
import { MatDialogRef } from '@angular/material/dialog' | ||
import { FormBuilder } from '@angular/forms' | ||
import { DialogTextProfanityComponent } from './discussion-post-popup.component' | ||
import { IDialogData } from './discussion-post.component' | ||
|
||
describe('DialogTextProfanityComponent', () => { | ||
let component: DialogTextProfanityComponent | ||
|
||
const fb: Partial<FormBuilder> = {} | ||
const dialogRef: Partial<MatDialogRef<DialogTextProfanityComponent>> = {} | ||
const data: Partial<IDialogData> = {} | ||
|
||
beforeAll(() => { | ||
component = new DialogTextProfanityComponent( | ||
fb as FormBuilder, | ||
dialogRef as MatDialogRef<DialogTextProfanityComponent>, | ||
data as IDialogData | ||
) | ||
}) | ||
|
||
beforeEach(() => { | ||
jest.clearAllMocks() | ||
jest.resetAllMocks() | ||
}) | ||
|
||
it('should create a instance of component', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
29 changes: 29 additions & 0 deletions
29
project/ws/app/src/lib/head/ui-admin-table/discussion-list/discussion-post.component.spec.ts
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,29 @@ | ||
import { RejectPublishService } from '../reject-publish.service' | ||
import { MatDialog } from '@angular/material/dialog' | ||
import { LoggerService } from '@sunbird-cb/utils' | ||
import { UIDiscussionPostComponent } from './discussion-post.component' | ||
|
||
describe('UIDiscussionPostComponent', () => { | ||
let component: UIDiscussionPostComponent | ||
|
||
const logger: Partial<LoggerService> = {} | ||
const discussion: Partial<RejectPublishService> = {} | ||
const dialog: Partial<MatDialog> = {} | ||
|
||
beforeAll(() => { | ||
component = new UIDiscussionPostComponent( | ||
logger as LoggerService, | ||
discussion as RejectPublishService, | ||
dialog as MatDialog | ||
) | ||
}) | ||
|
||
beforeEach(() => { | ||
jest.clearAllMocks() | ||
jest.resetAllMocks() | ||
}) | ||
|
||
it('should create a instance of component', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
32 changes: 32 additions & 0 deletions
32
...ws/app/src/lib/head/ui-admin-table/user-list-popup/ui-user-table-pop-up.component.spec.ts
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,32 @@ | ||
import { ProfileV2UtillService } from '../../../routes/home/services/home-utill.service' | ||
import { UsersService } from '../../../routes/home/services/users.service' | ||
import { ActivatedRoute } from '@angular/router' | ||
import { CreateMDOService } from '../../../routes/home/services/create-mdo.services' | ||
import { UIUserTablePopUpComponent } from './ui-user-table-pop-up.component' | ||
|
||
describe('UIUserTablePopUpComponent', () => { | ||
let component: UIUserTablePopUpComponent | ||
|
||
const profileUtilSvc: Partial<ProfileV2UtillService> = {} | ||
const userService: Partial<UsersService> = {} | ||
const activatedRoute: Partial<ActivatedRoute> = {} | ||
const createMDOService2: Partial<CreateMDOService> = {} | ||
|
||
beforeAll(() => { | ||
component = new UIUserTablePopUpComponent( | ||
profileUtilSvc as ProfileV2UtillService, | ||
userService as UsersService, | ||
activatedRoute as ActivatedRoute, | ||
createMDOService2 as CreateMDOService | ||
) | ||
}) | ||
|
||
beforeEach(() => { | ||
jest.clearAllMocks() | ||
jest.resetAllMocks() | ||
}) | ||
|
||
it('should create a instance of component', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
61 changes: 61 additions & 0 deletions
61
project/ws/app/src/lib/head/ui-admin-table/user-list/ui-admin-user-table.component.spec.ts
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,61 @@ | ||
(window as any)['env'] = { | ||
name: 'test-environment', | ||
sitePath: '/test-site-path', | ||
karmYogiPath: '/test-karm-yogi-path', | ||
cbpPath: '/test-cbp-path', | ||
} | ||
|
||
import { MatDialog } from '@angular/material/dialog' | ||
import { MatSnackBar } from '@angular/material/snack-bar' | ||
import { Router, ActivatedRoute } from '@angular/router' | ||
import { CreateMDOService as MDO2 } from '../../../routes/home/services/create-mdo.services' | ||
import { EventService } from '@sunbird-cb/utils' | ||
import { UIAdminUserTableComponent } from './ui-admin-user-table.component' | ||
import { of } from 'rxjs' | ||
|
||
describe('UIAdminUserTableComponent', () => { | ||
let component: UIAdminUserTableComponent | ||
|
||
const router: Partial<Router> = {} | ||
const dialog: Partial<MatDialog> = {} | ||
const activatedRoute: Partial<ActivatedRoute> = { | ||
snapshot: { | ||
parent: { | ||
data: { | ||
configService: { | ||
unMappedUser: { | ||
roles: ['PUBLIC, STATE_ADMIN'], | ||
}, | ||
}, | ||
}, | ||
}, | ||
params: of({ tab: 'verified' }), | ||
queryParams: of({ roleId: 'testRoleId' }), | ||
} as any, | ||
params: of({ tab: 'verified' }), | ||
queryParams: of({ roleId: 'testRoleId' }), | ||
} | ||
const createMDOService2: Partial<MDO2> = {} | ||
const events: Partial<EventService> = {} | ||
const snackBar: Partial<MatSnackBar> = {} | ||
|
||
beforeAll(() => { | ||
component = new UIAdminUserTableComponent( | ||
router as Router, | ||
dialog as MatDialog, | ||
activatedRoute as ActivatedRoute, | ||
createMDOService2 as MDO2, | ||
events as EventService, | ||
snackBar as MatSnackBar | ||
) | ||
}) | ||
|
||
beforeEach(() => { | ||
jest.clearAllMocks() | ||
jest.resetAllMocks() | ||
}) | ||
|
||
it('should create a instance of component', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
38 changes: 38 additions & 0 deletions
38
project/ws/app/src/lib/routes/access/routes/roles-access/roles-access.component.spec.ts
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,38 @@ | ||
(window as any)['env'] = { | ||
name: 'test-environment', | ||
sitePath: '/test-site-path', | ||
karmYogiPath: '/test-karm-yogi-path', | ||
cbpPath: '/test-cbp-path', | ||
} | ||
import { ActivatedRoute } from '@angular/router' | ||
import { UsersService } from '../../../home/services/users.service' | ||
import { RolesService } from '../../../home/services/roles.service' | ||
import { RolesAccessComponent } from './roles-access.component' | ||
import { of } from 'rxjs' | ||
|
||
describe('RolesAccessComponent', () => { | ||
let component: RolesAccessComponent | ||
|
||
const activatedRoute: Partial<ActivatedRoute> = { | ||
queryParams: of({}), | ||
} | ||
const usersService: Partial<UsersService> = {} | ||
const roleservice: Partial<RolesService> = {} | ||
|
||
beforeAll(() => { | ||
component = new RolesAccessComponent( | ||
activatedRoute as ActivatedRoute, | ||
usersService as UsersService, | ||
roleservice as RolesService | ||
) | ||
}) | ||
|
||
beforeEach(() => { | ||
jest.clearAllMocks() | ||
jest.resetAllMocks() | ||
}) | ||
|
||
it('should create a instance of component', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
30 changes: 30 additions & 0 deletions
30
project/ws/app/src/lib/routes/app-event/components/app-event/app-event.component.spec.ts
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,30 @@ | ||
|
||
import { ActivatedRoute } from '@angular/router' | ||
import { EventService } from '../../services/event.service' | ||
import { ConfigurationsService } from '@sunbird-cb/utils' | ||
import { AppEventComponent } from './app-event.component' | ||
|
||
describe('AppEventComponent', () => { | ||
let component: AppEventComponent | ||
|
||
const activatedRoute: Partial<ActivatedRoute> = {} | ||
const appEventSvc: Partial<EventService> = {} | ||
const configSvc: Partial<ConfigurationsService> = {} | ||
|
||
beforeAll(() => { | ||
component = new AppEventComponent( | ||
activatedRoute as ActivatedRoute, | ||
appEventSvc as EventService, | ||
configSvc as ConfigurationsService | ||
) | ||
}) | ||
|
||
beforeEach(() => { | ||
jest.clearAllMocks() | ||
jest.resetAllMocks() | ||
}) | ||
|
||
it('should create a instance of component', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
Oops, something went wrong.