Commit 94acd8c7 authored by VladikB's avatar VladikB

Alles funktioniert

parent e50dd6e4
......@@ -7,7 +7,6 @@ import {JWT_OPTIONS, JwtHelperService, JwtModule} from '@auth0/angular-jwt';
import {jwtOptionsFactory} from '../../../../../lib/jwt.factory';
import {PLATFORM_ID} from '@angular/core';
import {
MissingTranslationHandler,
TranslateCompiler,
TranslateFakeCompiler,
TranslateFakeLoader,
......@@ -18,7 +17,6 @@ import {
} from '@ngx-translate/core';
import {TranslateServiceMock} from '../../../../../../_mocks/_services/TranslateServiceMock';
import {TranslatePipeMock} from '../../../../../../_mocks/_pipes/TranslatePipeMock';
import {MissingTranslationError} from '@angular/localize/src/utils';
import {I18nTestingModule} from '../../../../../shared/testing/i18n-testing/i18n-testing.module';
import {SharedModule} from '../../../../../shared/shared.module';
import {RouterTestingModule} from '@angular/router/testing';
......@@ -36,9 +34,9 @@ import {SharedService} from '../../../../../service/shared/shared.service';
import {AttendeeService} from '../../../../../service/attendee/attendee.service';
import {AttendeeMockService} from '../../../../../service/attendee/attendee.mock.service';
describe('BonusTokenComponent', () => {
let component: BonusTokenComponent;
let fixture: ComponentFixture<BonusTokenComponent>;
describe('When BonusToken Icon is going to be clicked', () => {
let component: BonusTokenComponent;
let fixture: ComponentFixture<BonusTokenComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
......@@ -88,13 +86,18 @@ describe('BonusTokenComponent', () => {
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BonusTokenComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(BonusTokenComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
it('should change value of the Copy-to-clipboard-Button after copying to clipboard', () => {
component.copy();
expect(component.clipboardText).toBeFalsy();
});
});
......@@ -10,7 +10,6 @@ import {BonusTokenService} from '../../../../../service/user/bonus-token/bonus-t
export class BonusTokenComponent {
public bonusToken: string;
public clipboardText: boolean;
public mailText = '';
constructor(private activeModal: NgbActiveModal, bonusTokenService: BonusTokenService) {
......@@ -42,9 +41,4 @@ export class BonusTokenComponent {
public abort(): void {
this.activeModal.dismiss();
}
public mailTo(): void {
this.mailText = 'mailto: ?subject=Meine%20Tokennummer&amp;body=Hallo,%0D%0A%0D%0Ameine%20Tokennummer%20ist%20';
window.location.href = this.mailText;
}
}
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