Commit 89741323 authored by David Burke's avatar David Burke

Fix tests by removing traces of demo component

parent a7c502f5
Pipeline #37840298 failed with stages
in 3 minutes and 2 seconds
......@@ -49,13 +49,7 @@ export function localStorageSyncReducer(
"secrets",
{ popup: { deserialize: popupDeserialize } },
{
conf: [
"isDemo",
"isPrivateOrgMode",
"environment",
"ravenDsn",
"timestamp"
]
conf: ["isPrivateOrgMode", "environment", "ravenDsn", "timestamp"]
}
],
rehydrate: true,
......@@ -97,17 +91,22 @@ export const getSecretsCount = createSelector(
);
export const getConfState = (state: IState) => state.conf;
export const getIsDemo = createSelector(getConfState, confState.getIsDemo);
export const getIsPrivateOrgMode = createSelector(
getConfState,
confState.getIsPrivateOrgMode
);
export const getIsPopup = createSelector(getConfState, confState.getIsPopup);
export const getIsPopup = createSelector(
getConfState,
confState.getIsPopup
);
export const getTimestamp = createSelector(
getConfState,
confState.getTimestamp
);
export const getRavenDsn = createSelector(getConfState, confState.getRavenDsn);
export const getRavenDsn = createSelector(
getConfState,
confState.getRavenDsn
);
export const getRouterState = (state: IState) => state.router;
export const getRouterPath = createSelector(
......
......@@ -80,7 +80,6 @@ describe("Conf Effects", () => {
const oldDate = "Sat Oct 21 2016 14:08:32 GMT-0400 (EDT)";
const oldTimeMockStore = Object.assign({}, mockStore, {
conf: {
isDemo: false,
isPrivateOrgMode: false,
timestamp: oldDate
}
......
import { Actions, ConfTypes } from "./conf.actions";
export interface IConfState {
isDemo: boolean;
isPrivateOrgMode: boolean;
environment: string | null;
/** Is operating in web extension popup */
......@@ -11,7 +10,6 @@ export interface IConfState {
}
export const initial: IConfState = {
isDemo: false,
isPrivateOrgMode: false,
environment: null,
isPopup: false,
......@@ -24,7 +22,6 @@ export function reducer(state = initial, action: Actions): IConfState {
case ConfTypes.SET_CONF: {
return {
...state,
isDemo: action.payload.IS_DEMO,
isPrivateOrgMode: action.payload.IS_PRIVATE_ORG_MODE,
environment: action.payload.ENVIRONMENT,
ravenDsn: action.payload.RAVEN_DSN,
......@@ -45,7 +42,6 @@ export function reducer(state = initial, action: Actions): IConfState {
}
}
export const getIsDemo = (state: IConfState) => state.isDemo;
export const getIsPrivateOrgMode = (state: IConfState) =>
state.isPrivateOrgMode;
export const getTimestamp = (state: IConfState) => state.timestamp;
......
......@@ -3,13 +3,12 @@ import { Router, RoutesRecognized } from "@angular/router";
import { Store, select } from "@ngrx/store";
import { LogoutAction } from "../../account/account.actions";
import { getIsLoggedIn, IAuthState } from "../../account/account.reducer";
import { getIsDemo, getIsPrivateOrgMode, IState } from "../../app.reducers";
import { getIsPrivateOrgMode, IState } from "../../app.reducers";
import { hasGroupInvites } from "../../group/group.reducer";
@Component({
selector: "navbar-container",
template: `
<demo *ngIf="isDemo$ | async"></demo>
<navbar
[isLoggedIn]="isLoggedIn$ | async"
[isPrivateOrgMode]="isPrivateOrgMode$ | async"
......@@ -21,7 +20,6 @@ import { hasGroupInvites } from "../../group/group.reducer";
})
export class NavbarContainer {
isLoggedIn$ = this.accountStore.pipe(select(getIsLoggedIn));
isDemo$ = this.store.pipe(select(getIsDemo));
isPrivateOrgMode$ = this.store.pipe(select(getIsPrivateOrgMode));
hasGroupInvites$ = this.store.pipe(select(hasGroupInvites));
isVisible: boolean;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment