Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/790_members_einladen' in…
Browse files Browse the repository at this point in the history
…to feature/790_members_einladen
  • Loading branch information
janikEndtner committed Apr 12, 2024
2 parents b609505 + 15c1024 commit ed8655f
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 49 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import {ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';

import {ApplicationTopBarComponent} from './application-top-bar.component';
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
import {DateTimeProvider, OAuthLogger, OAuthService, UrlHelperService} from 'angular-oauth2-oidc';
import {HttpClient, HttpHandler} from '@angular/common/http';
import {MatMenuModule} from '@angular/material/menu';
import {HarnessLoader} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {MatMenuHarness} from '@angular/material/menu/testing';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {MatDialog, MatDialogModule} from '@angular/material/dialog';
import {NavigationEnd, Router} from '@angular/router';
import {of} from 'rxjs';
import {testUser} from '../../shared/testData';
import {UserService} from '../../services/user.service';
import {ConfigService} from '../../config.service';
import { ApplicationTopBarComponent } from './application-top-bar.component';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { DateTimeProvider, OAuthLogger, OAuthService, UrlHelperService } from 'angular-oauth2-oidc';
import { HttpClient, HttpHandler } from '@angular/common/http';
import { MatMenuModule } from '@angular/material/menu';
import { HarnessLoader } from '@angular/cdk/testing';
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
import { MatMenuHarness } from '@angular/material/menu/testing';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
import { NavigationEnd, Router } from '@angular/router';
import { of } from 'rxjs';
import { testUser } from '../../shared/testData';
import { UserService } from '../../services/user.service';
import { ConfigService } from '../../config.service';

const oAuthMock = {
getIdentityClaims: jest.fn(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import {ComponentFixture, fakeAsync, TestBed, tick} from '@angular/core/testing';

import {InviteUserDialogComponent} from './invite-user-dialog.component';
import {MatDialogModule} from '@angular/material/dialog';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {NewUserComponent} from '../new-user/new-user.component';
import {PuzzleIconComponent} from '../../shared/custom/puzzle-icon/puzzle-icon.component';
import {PuzzleIconButtonComponent} from '../../shared/custom/puzzle-icon-button/puzzle-icon-button.component';
import {UserService} from '../../services/user.service';
import {testUser} from '../../shared/testData';
import {DialogRef} from '@angular/cdk/dialog';
import {of} from 'rxjs';
import {UniqueEmailValidator} from "../new-user/unique-mail.validator";
import {MatFormFieldModule} from "@angular/material/form-field";
import {NO_ERRORS_SCHEMA} from "@angular/core";
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';

import { InviteUserDialogComponent } from './invite-user-dialog.component';
import { MatDialogModule } from '@angular/material/dialog';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NewUserComponent } from '../new-user/new-user.component';
import { PuzzleIconComponent } from '../../shared/custom/puzzle-icon/puzzle-icon.component';
import { PuzzleIconButtonComponent } from '../../shared/custom/puzzle-icon-button/puzzle-icon-button.component';
import { UserService } from '../../services/user.service';
import { testUser } from '../../shared/testData';
import { DialogRef } from '@angular/cdk/dialog';
import { of } from 'rxjs';
import { UniqueEmailValidator } from '../new-user/unique-mail.validator';
import { MatFormFieldModule } from '@angular/material/form-field';
import { NO_ERRORS_SCHEMA } from '@angular/core';

describe('InviteUserDialogComponent', () => {
let component: InviteUserDialogComponent;
Expand All @@ -24,7 +24,7 @@ describe('InviteUserDialogComponent', () => {

const userServiceMock = {
createUsers: jest.fn(),
getUsers: jest.fn()
getUsers: jest.fn(),
};

const dialogRefMock = {
Expand All @@ -33,7 +33,7 @@ describe('InviteUserDialogComponent', () => {

const uniqueMailValidatorMock = {
setAddedMails: jest.fn(),
validate: () => null
validate: () => null,
};

beforeEach(async () => {
Expand All @@ -46,8 +46,7 @@ describe('InviteUserDialogComponent', () => {
{ provide: UniqueEmailValidator, useValue: uniqueMailValidatorMock },
],
schemas: [NO_ERRORS_SCHEMA],
})
.compileComponents();
}).compileComponents();

fixture = TestBed.createComponent(InviteUserDialogComponent);
component = fixture.componentInstance;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';

import {NewUserComponent} from './new-user.component';
import {FormControl, FormGroup, FormsModule, NgForm, ReactiveFormsModule} from '@angular/forms';
import {SharedModule} from '../../shared/shared.module';
import {PuzzleIconButtonComponent} from '../../shared/custom/puzzle-icon-button/puzzle-icon-button.component';
import {PuzzleIconComponent} from '../../shared/custom/puzzle-icon/puzzle-icon.component';
import {CommonModule} from '@angular/common';
import {NewUserForm} from "../../shared/types/model/NewUserForm";
import { NewUserComponent } from './new-user.component';
import { FormControl, FormGroup, FormsModule, NgForm, ReactiveFormsModule } from '@angular/forms';
import { SharedModule } from '../../shared/shared.module';
import { PuzzleIconButtonComponent } from '../../shared/custom/puzzle-icon-button/puzzle-icon-button.component';
import { PuzzleIconComponent } from '../../shared/custom/puzzle-icon/puzzle-icon.component';
import { CommonModule } from '@angular/common';
import { NewUserForm } from '../../shared/types/model/NewUserForm';

describe('NewUserComponent', () => {
let component: NewUserComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {UniqueEmailValidator} from './unique-mail.validator';
import {users} from '../../shared/testData';
import {TestBed} from '@angular/core/testing';
import {of} from 'rxjs';
import {AbstractControl} from '@angular/forms';
import { UniqueEmailValidator } from './unique-mail.validator';
import { users } from '../../shared/testData';
import { TestBed } from '@angular/core/testing';
import { of } from 'rxjs';
import { AbstractControl } from '@angular/forms';

describe('UniqueMailDirective', () => {
const userServiceMock = {
Expand All @@ -28,7 +28,7 @@ describe('UniqueMailDirective', () => {
expect(directive.validate(control)).toStrictEqual({ notUniqueMail: { value: users[0].email } });

const notExistingMail = '[email protected]';
control = { value: notExistingMail} as AbstractControl;
control = { value: notExistingMail } as AbstractControl;
expect(directive.validate(control)).toStrictEqual(null);

directive.setAddedMails([notExistingMail]);
Expand Down

0 comments on commit ed8655f

Please sign in to comment.