Skip to content

Commit

Permalink
feat(edit-content) clean test
Browse files Browse the repository at this point in the history
  • Loading branch information
oidacra committed Oct 2, 2024
1 parent 240e6df commit daa4bc7
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ import {
} from '@ngneat/spectator/jest';
import { of, throwError } from 'rxjs';

import { Location } from '@angular/common';
import { HttpErrorResponse } from '@angular/common/http';
import { fakeAsync, tick } from '@angular/core/testing';
import { ActivatedRoute, Router } from '@angular/router';

import { MessageService } from 'primeng/api';

import {
DotContentTypeService,
DotFireActionOptions,
Expand Down Expand Up @@ -43,17 +40,12 @@ describe('DotEditContentStore', () => {
let dotHttpErrorManagerService: SpyObject<DotHttpErrorManagerService>;
let dotEditContentService: SpyObject<DotEditContentService>;

let mockActivatedRoute: { snapshot: { params?: any } };
let mockActivatedRouteParams: { [key: string]: any };
let activatedRoute: SpyObject<ActivatedRoute>;
let router: SpyObject<Router>;

let workflowActionsService: SpyObject<DotWorkflowsActionsService>;
let workflowActionsFireService: SpyObject<DotWorkflowActionsFireService>;

let location: Location;
let messageService: MessageService;

const createService = createServiceFactory({
service: DotEditContentStore,
mocks: [
Expand All @@ -64,7 +56,6 @@ describe('DotEditContentStore', () => {
DotWorkflowsActionsService
],
providers: [
// mockProvider(ActivatedRoute, mockActivatedRoute),
{
provide: ActivatedRoute,
useValue: {
Expand Down Expand Up @@ -92,7 +83,6 @@ describe('DotEditContentStore', () => {
workflowActionsFireService = spectator.inject(DotWorkflowActionsFireService);
dotEditContentService = spectator.inject(DotEditContentService);

activatedRoute = spectator.inject(ActivatedRoute);
router = spectator.inject(Router);
});

Expand Down Expand Up @@ -140,10 +130,6 @@ describe('DotEditContentStore', () => {
describe('initializeExistingContent', () => {
const testInode = '123-test-inode';
it('should initialize existing content successfully', () => {
mockActivatedRoute = {
snapshot: { params: { contentType: undefined, id: testInode } }
};

const mockContentlet = {
inode: testInode,
contentType: 'testContentType'
Expand Down

0 comments on commit daa4bc7

Please sign in to comment.