Test123
'; diff --git a/client/src/app/site/motions/components/motion-list/motion-list.component.ts b/client/src/app/site/motions/components/motion-list/motion-list.component.ts index 14a7a4948..d6a79eae4 100644 --- a/client/src/app/site/motions/components/motion-list/motion-list.component.ts +++ b/client/src/app/site/motions/components/motion-list/motion-list.component.ts @@ -21,7 +21,6 @@ import { ViewCategory } from '../../models/view-category'; import { ViewMotionBlock } from '../../models/view-motion-block'; import { WorkflowRepositoryService } from '../../services/workflow-repository.service'; - /** * Component that displays all the motions in a Table using DataSource. */ @@ -31,7 +30,6 @@ import { WorkflowRepositoryService } from '../../services/workflow-repository.se styleUrls: ['./motion-list.component.scss'] }) export class MotionListComponent extends ListViewBaseComponentThis is the text before
', - after = "This is the text before
\nThis is one added line
\nAnother added line
"; - const diff = service.diff(before, after); - expect(diff).toBe("This is the text before
\nThis is one added line
\nAnother added line
"); - } - )); + it('works with multiple inserted paragraphs', inject([DiffService], (service: DiffService) => { + const before = 'This is the text before
', + after = 'This is the text before
\nThis is one added line
\nAnother added line
'; + const diff = service.diff(before, after); + expect(diff).toBe( + 'This is the text before
\nThis is one added line
\nAnother added line
' + ); + })); it('does not a change in a very specific case', inject([DiffService], (service: DiffService) => { // See diff._fixWrongChangeDetection @@ -965,17 +964,21 @@ describe('DiffService', () => { })); it('does not delete a paragraph before an inserted one', inject([DiffService], (service: DiffService) => { - const inHtml = 'At vero eos et accusam et justo duo dolores et ea rebum.
\nAt vero eos et accusam et justo duo dolores et ea rebum.
\nAt vero eos et accusam et justo duo dolores et ea rebum.
\nAt vero eos et accusam et justo duo dolores et ea rebum.
\n1234
1234 1234
"; + it('does not count within .insert nodes', inject([LinenumberingService], (service: LinenumberingService) => { + const inHtml = '1234
1234 1234
'; const outHtml = service.insertLineNumbers(inHtml, 10); - expect(outHtml).toBe('' + noMarkup(1) + '1234
' + noMarkup(2) + '1234 1234
'); + expect(outHtml).toBe( + '' + noMarkup(1) + '1234
' + noMarkup(2) + '1234 1234
' + ); expect(service.stripLineNumbers(outHtml)).toBe(inHtml); expect(service.insertLineBreaksWithoutNumbers(outHtml, 80)).toBe(outHtml); })); diff --git a/client/src/app/site/motions/services/local-permissions.service.spec.ts b/client/src/app/site/motions/services/local-permissions.service.spec.ts index 2a160f368..6376b3df1 100644 --- a/client/src/app/site/motions/services/local-permissions.service.spec.ts +++ b/client/src/app/site/motions/services/local-permissions.service.spec.ts @@ -4,10 +4,10 @@ import { LocalPermissionsService } from './local-permissions.service'; import { E2EImportsModule } from '../../../../e2e-imports.module'; describe('LocalPermissionsService', () => { - beforeEach(() => TestBed.configureTestingModule({ imports: [E2EImportsModule] })); + beforeEach(() => TestBed.configureTestingModule({ imports: [E2EImportsModule] })); - it('should be created', () => { - const service: LocalPermissionsService = TestBed.get(LocalPermissionsService); - expect(service).toBeTruthy(); - }); + it('should be created', () => { + const service: LocalPermissionsService = TestBed.get(LocalPermissionsService); + expect(service).toBeTruthy(); + }); }); diff --git a/client/src/app/site/motions/services/local-permissions.service.ts b/client/src/app/site/motions/services/local-permissions.service.ts index ec3ee9b9d..1cb655b11 100644 --- a/client/src/app/site/motions/services/local-permissions.service.ts +++ b/client/src/app/site/motions/services/local-permissions.service.ts @@ -3,20 +3,17 @@ import { OperatorService } from '../../../core/services/operator.service'; import { ViewMotion } from '../models/view-motion'; import { ConfigService } from '../../../core/services/config.service'; - @Injectable({ - providedIn: 'root' + providedIn: 'root' }) export class LocalPermissionsService { - public configMinSupporters: number; - public constructor( - private operator: OperatorService, - private configService: ConfigService, - ) { + public constructor(private operator: OperatorService, private configService: ConfigService) { // load config variables - this.configService.get('motions_min_supporters').subscribe(supporters => (this.configMinSupporters = supporters)); + this.configService + .get('motions_min_supporters') + .subscribe(supporters => (this.configMinSupporters = supporters)); } /** @@ -36,13 +33,11 @@ export class LocalPermissionsService { this.operator.hasPerms('motions.can_support') && this.configMinSupporters > 0 && motion.state.allow_support && - (motion.submitters.indexOf(this.operator.user) === -1) && - (motion.supporters.indexOf(this.operator.user) === -1)); - case 'unsupport': - return ( - motion.state.allow_support && - (motion.supporters.indexOf(this.operator.user) !== -1) + motion.submitters.indexOf(this.operator.user) === -1 && + motion.supporters.indexOf(this.operator.user) === -1 ); + case 'unsupport': + return motion.state.allow_support && motion.supporters.indexOf(this.operator.user) !== -1; default: return false; } diff --git a/client/src/app/site/motions/services/motion-block-repository.service.spec.ts b/client/src/app/site/motions/services/motion-block-repository.service.spec.ts index 880756dc5..9463afffe 100644 --- a/client/src/app/site/motions/services/motion-block-repository.service.spec.ts +++ b/client/src/app/site/motions/services/motion-block-repository.service.spec.ts @@ -4,9 +4,11 @@ import { MotionBlockRepositoryService } from './motion-block-repository.service' import { E2EImportsModule } from 'e2e-imports.module'; describe('MotionBlockRepositoryService', () => { - beforeEach(() => TestBed.configureTestingModule({ - imports: [E2EImportsModule] - })); + beforeEach(() => + TestBed.configureTestingModule({ + imports: [E2EImportsModule] + }) + ); it('should be created', () => { const service: MotionBlockRepositoryService = TestBed.get(MotionBlockRepositoryService); diff --git a/client/src/app/site/motions/services/motion-block-repository.service.ts b/client/src/app/site/motions/services/motion-block-repository.service.ts index f507576e4..323d649ee 100644 --- a/client/src/app/site/motions/services/motion-block-repository.service.ts +++ b/client/src/app/site/motions/services/motion-block-repository.service.ts @@ -32,7 +32,7 @@ export class MotionBlockRepositoryService extends BaseRepository${this.user.full_name}`; + const content = + this.translate.instant('Do you want to delete this participant?') + + `
${this.user.full_name}`;
if (await this.promptService.open(this.translate.instant('Are you sure?'), content)) {
this.repo.delete(this.user).then(() => this.router.navigate(['./users/']), this.raiseError);
}
diff --git a/client/src/app/site/users/components/user-list/user-list.component.ts b/client/src/app/site/users/components/user-list/user-list.component.ts
index 4e7d9e3d3..232281f70 100644
--- a/client/src/app/site/users/components/user-list/user-list.component.ts
+++ b/client/src/app/site/users/components/user-list/user-list.component.ts
@@ -24,7 +24,6 @@ import { UserSortListService } from '../../services/user-sort-list.service';
styleUrls: ['./user-list.component.scss']
})
export class UserListComponent extends ListViewBaseComponent