Commit 2c0d28d5 authored by Vladislav Bogac's avatar Vladislav Bogac

Revert "Alles funktioniert"

This reverts commit 94acd8c7
parent c5fe072c
...@@ -7,6 +7,7 @@ import {JWT_OPTIONS, JwtHelperService, JwtModule} from '@auth0/angular-jwt'; ...@@ -7,6 +7,7 @@ import {JWT_OPTIONS, JwtHelperService, JwtModule} from '@auth0/angular-jwt';
import {jwtOptionsFactory} from '../../../../../lib/jwt.factory'; import {jwtOptionsFactory} from '../../../../../lib/jwt.factory';
import {PLATFORM_ID} from '@angular/core'; import {PLATFORM_ID} from '@angular/core';
import { import {
MissingTranslationHandler,
TranslateCompiler, TranslateCompiler,
TranslateFakeCompiler, TranslateFakeCompiler,
TranslateFakeLoader, TranslateFakeLoader,
...@@ -17,6 +18,7 @@ import { ...@@ -17,6 +18,7 @@ import {
} from '@ngx-translate/core'; } from '@ngx-translate/core';
import {TranslateServiceMock} from '../../../../../../_mocks/_services/TranslateServiceMock'; import {TranslateServiceMock} from '../../../../../../_mocks/_services/TranslateServiceMock';
import {TranslatePipeMock} from '../../../../../../_mocks/_pipes/TranslatePipeMock'; import {TranslatePipeMock} from '../../../../../../_mocks/_pipes/TranslatePipeMock';
import {MissingTranslationError} from '@angular/localize/src/utils';
import {I18nTestingModule} from '../../../../../shared/testing/i18n-testing/i18n-testing.module'; import {I18nTestingModule} from '../../../../../shared/testing/i18n-testing/i18n-testing.module';
import {SharedModule} from '../../../../../shared/shared.module'; import {SharedModule} from '../../../../../shared/shared.module';
import {RouterTestingModule} from '@angular/router/testing'; import {RouterTestingModule} from '@angular/router/testing';
...@@ -34,9 +36,9 @@ import {SharedService} from '../../../../../service/shared/shared.service'; ...@@ -34,9 +36,9 @@ import {SharedService} from '../../../../../service/shared/shared.service';
import {AttendeeService} from '../../../../../service/attendee/attendee.service'; import {AttendeeService} from '../../../../../service/attendee/attendee.service';
import {AttendeeMockService} from '../../../../../service/attendee/attendee.mock.service'; import {AttendeeMockService} from '../../../../../service/attendee/attendee.mock.service';
describe('When BonusToken Icon is going to be clicked', () => { describe('BonusTokenComponent', () => {
let component: BonusTokenComponent; let component: BonusTokenComponent;
let fixture: ComponentFixture<BonusTokenComponent>; let fixture: ComponentFixture<BonusTokenComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
...@@ -86,18 +88,13 @@ describe('When BonusToken Icon is going to be clicked', () => { ...@@ -86,18 +88,13 @@ describe('When BonusToken Icon is going to be clicked', () => {
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(BonusTokenComponent); fixture = TestBed.createComponent(BonusTokenComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
it('should be created', () => { it('should create', () => {
expect(component).toBeTruthy(); expect(component).toBeTruthy();
}); });
it('should change value of the Copy-to-clipboard-Button after copying to clipboard', () => {
component.copy();
expect(component.clipboardText).toBeFalsy();
});
}); });
...@@ -11,6 +11,7 @@ import {AttendeeService} from '../../../../../service/attendee/attendee.service' ...@@ -11,6 +11,7 @@ import {AttendeeService} from '../../../../../service/attendee/attendee.service'
export class BonusTokenComponent { export class BonusTokenComponent {
public bonusToken = '## you\'ve been to fast ##'; public bonusToken = '## you\'ve been to fast ##';
public clipboardText: boolean; public clipboardText: boolean;
public mailText = '';
constructor(private activeModal: NgbActiveModal, bonusTokenService: BonusTokenService, attendeeService: AttendeeService) { constructor(private activeModal: NgbActiveModal, bonusTokenService: BonusTokenService, attendeeService: AttendeeService) {
...@@ -42,4 +43,9 @@ export class BonusTokenComponent { ...@@ -42,4 +43,9 @@ export class BonusTokenComponent {
public abort(): void { public abort(): void {
this.activeModal.dismiss(); 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