Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
344
Merge Requests
57
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
4399c6bc
Commit
4399c6bc
authored
17 minutes ago
by
Mark Harding
Browse files
Options
Download
(fix): failing spec tests
parent
8dfc9b3a
epic/SSR
1 merge request
!343
WIP: Epic/ssr
Pipeline
#108425311
failed with stages
in 3 minutes and 40 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
12 deletions
+28
-12
src/app/modules/channels/sidebar/sidebar.spec.ts
View file @
4399c6bc
...
...
@@ -6,11 +6,14 @@ import {
TestBed
,
tick
,
}
from
'
@angular/core/testing
'
;
import
{
DebugElement
,
EventEmitter
}
from
'
@angular/core
'
;
import
{
DebugElement
,
EventEmitter
,
PLATFORM_ID
}
from
'
@angular/core
'
;
import
{
MockComponent
,
MockDirective
,
MockService
}
from
'
../../../utils/mock
'
;
import
{
CommonModule
as
NgCommonModule
}
from
'
@angular/common
'
;
import
{
CommonModule
as
NgCommonModule
,
ɵ
PLATFORM_BROWSER_ID
,
}
from
'
@angular/common
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
RouterTestingModule
}
from
'
@angular/router/testing
'
;
import
{
Client
}
from
'
../../../services/api/client
'
;
...
...
@@ -39,6 +42,7 @@ import { ChannelMode } from '../../../interfaces/entities';
import
{
ifStmt
}
from
'
@angular/compiler/src/output/output_ast
'
;
import
{
ChannelModulesComponent
}
from
'
../modules/modules
'
;
import
{
SiteService
}
from
'
../../../common/services/site.service
'
;
import
{
IfBrowserDirective
}
from
'
../../../common/directives/if-browser.directive
'
;
describe
(
'
ChannelSidebar
'
,
()
=>
{
let
comp
:
ChannelSidebar
;
...
...
@@ -113,6 +117,7 @@ describe('ChannelSidebar', () => {
inputs
:
[
'
icon
'
,
'
iconClass
'
],
}),
IfFeatureDirective
,
IfBrowserDirective
,
],
imports
:
[
FormsModule
,
RouterTestingModule
,
NgCommonModule
],
providers
:
[
...
...
@@ -143,6 +148,10 @@ describe('ChannelSidebar', () => {
},
}),
},
{
provide
:
PLATFORM_ID
,
useValue
:
ɵ
PLATFORM_BROWSER_ID
,
},
],
}).
compileComponents
();
// compile template and css
}));
...
...
This diff is collapsed.
src/app/modules/groups/list.component.spec.ts
View file @
4399c6bc
...
...
@@ -21,6 +21,7 @@ import { contextServiceMock } from '../../../tests/context-service-mock.spec';
import
{
MockComponent
}
from
'
../../utils/mock
'
;
import
{
OverlayModalService
}
from
'
../../services/ux/overlay-modal
'
;
import
{
overlayModalServiceMock
}
from
'
../../../tests/overlay-modal-service-mock.spec
'
;
import
{
ConfigsService
}
from
'
../../common/services/configs.service
'
;
@
Component
({
selector
:
'
m-groups--tile
'
,
...
...
@@ -83,7 +84,8 @@ describe('Groups List', () => {
{
provide
:
Client
,
useValue
:
clientMock
},
{
provide
:
MindsTitle
,
useClass
:
Title
,
deps
:
[
Title
]
},
{
provide
:
ContextService
,
useValue
:
contextServiceMock
},
{
provide
:
Session
,
useClass
:
Session
},
ConfigsService
,
Session
,
{
provide
:
OverlayModalService
,
useValue
:
overlayModalServiceMock
},
],
}).
compileComponents
();
...
...
This diff is collapsed.
src/app/modules/notifications/notification.service.spec.ts
View file @
4399c6bc
...
...
@@ -6,7 +6,7 @@ import { fakeAsync, tick } from '@angular/core/testing';
import
{
mindsTitleMock
}
from
'
../../mocks/services/ux/minds-title.service.mock.spec
'
;
import
{
MockService
}
from
'
../../utils/mock
'
;
import
{
SiteService
}
from
'
../../common/services/site.service
'
;
import
{
EventEmitter
}
from
'
@angular/core
'
;
import
{
EventEmitter
,
PLATFORM_ID
}
from
'
@angular/core
'
;
export
let
siteServiceMock
=
new
(
function
()
{
var
pro
=
()
=>
null
;
...
...
@@ -26,6 +26,7 @@ describe('NewsfeedService', () => {
clientMock
,
socketMock
,
mindsTitleMock
,
PLATFORM_ID
,
siteServiceMock
);
clientMock
.
response
=
{};
...
...
This diff is collapsed.
src/app/modules/notifications/notification.service.ts
View file @
4399c6bc
...
...
@@ -91,10 +91,12 @@ export class NotificationService {
*/
getNotifications
()
{
const
pollIntervalSeconds
=
60
;
// this.notificationPollTimer = timer(0, pollIntervalSeconds * 1000);
// this.updateNotificationCountSubscription = this.notificationPollTimer.subscribe(
// () => this.updateNotificationCount()
// );
if
(
isPlatformBrowser
(
this
.
platformId
))
{
this
.
notificationPollTimer
=
timer
(
0
,
pollIntervalSeconds
*
1000
);
this
.
updateNotificationCountSubscription
=
this
.
notificationPollTimer
.
subscribe
(
()
=>
this
.
updateNotificationCount
()
);
}
}
updateNotificationCount
()
{
...
...
@@ -125,7 +127,8 @@ export class NotificationService {
this
.
title
.
setCounter
(
window
.
Minds
.
notifications_count
);
}
// ngOnDestroy() {
// this.updateNotificationCountSubscription.unsubscribe();
// }
ngOnDestroy
()
{
if
(
this
.
updateNotificationCountSubscription
)
this
.
updateNotificationCountSubscription
.
unsubscribe
();
}
}
This diff is collapsed.
src/app/services/session.ts
View file @
4399c6bc
/**
* Sessions
*/
import
{
EventEmitter
}
from
'
@angular/core
'
;
import
{
EventEmitter
,
Injectable
}
from
'
@angular/core
'
;
import
{
ConfigsService
}
from
'
../common/services/configs.service
'
;
@
Injectable
()
export
class
Session
{
loggedinEmitter
:
EventEmitter
<
any
>
=
new
EventEmitter
();
userEmitter
:
EventEmitter
<
any
>
=
new
EventEmitter
();
...
...
This diff is collapsed.
Please
register
or
sign in
to comment