Skip to content

Commit

Permalink
Fixing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iartemiev committed Feb 25, 2020
1 parent 63a3854 commit 5c431d1
Show file tree
Hide file tree
Showing 14 changed files with 367 additions and 347 deletions.
Original file line number Diff line number Diff line change
@@ -1,41 +1,43 @@
import { Component } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import { AmplifyService } from '../../../providers/amplify.service'
import { AmazonSignInComponentCore } from '../../../components/authenticator/federated-sign-in-component/amazon-sign-in-component/amazon-sign-in.component.core'
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
import { AmplifyService } from '../../../providers/amplify.service';
import { AmazonSignInComponentCore } from '../../../components/authenticator/federated-sign-in-component/amazon-sign-in-component/amazon-sign-in.component.core';
import Amplify from 'aws-amplify';

describe('AmazonSignInComponentCore (basics): ', () => {
let component: AmazonSignInComponentCore;
let service: AmplifyService;

let component: AmazonSignInComponentCore;
let service: AmplifyService;
beforeEach(() => {
service = new AmplifyService(Amplify);
component = new AmazonSignInComponentCore(service);
});

beforeEach(() => {
service = new AmplifyService();
component = new AmazonSignInComponentCore(service);
});
afterEach(() => {
service = null;
component = null;
});

afterEach(() => {
service = null;
component = null;
});

it('...should be created', () => {
expect(component).toBeTruthy();
});
it('...should have a onSignIn method', () => {
expect(component.onSignIn).toBeTruthy();
});
it('...should have a initAmazon method', () => {
expect(component.initAmazon).toBeTruthy();
});
it('...should have a amazonAuthorize method', () => {
expect(component.amazonAuthorize).toBeTruthy();
});
it('...should have a amazonRetrieveProfile method', () => {
expect(component.amazonRetrieveProfile).toBeTruthy();
});
it('...should have a createScript method', () => {
expect(component.createScript).toBeTruthy();
});
});
it('...should be created', () => {
expect(component).toBeTruthy();
});
it('...should have a onSignIn method', () => {
expect(component.onSignIn).toBeTruthy();
});
it('...should have a initAmazon method', () => {
expect(component.initAmazon).toBeTruthy();
});
it('...should have a amazonAuthorize method', () => {
expect(component.amazonAuthorize).toBeTruthy();
});
it('...should have a amazonRetrieveProfile method', () => {
expect(component.amazonRetrieveProfile).toBeTruthy();
});
it('...should have a createScript method', () => {
expect(component.createScript).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -1,41 +1,43 @@
import { Component } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import { AmplifyService } from '../../../providers/amplify.service'
import { AmazonSignInComponentIonic } from '../../../components/authenticator/federated-sign-in-component/amazon-sign-in-component/amazon-sign-in.component.ionic'
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
import { AmplifyService } from '../../../providers/amplify.service';
import { AmazonSignInComponentIonic } from '../../../components/authenticator/federated-sign-in-component/amazon-sign-in-component/amazon-sign-in.component.ionic';
import Amplify from 'aws-amplify';

describe('AmazonSignInComponentIonic (basics): ', () => {
let component: AmazonSignInComponentIonic;
let service: AmplifyService;

let component: AmazonSignInComponentIonic;
let service: AmplifyService;
beforeEach(() => {
service = new AmplifyService(Amplify);
component = new AmazonSignInComponentIonic(service);
});

beforeEach(() => {
service = new AmplifyService();
component = new AmazonSignInComponentIonic(service);
});
afterEach(() => {
service = null;
component = null;
});

afterEach(() => {
service = null;
component = null;
});

it('...should be created', () => {
expect(component).toBeTruthy();
});
it('...should have a onSignIn method', () => {
expect(component.onSignIn).toBeTruthy();
});
it('...should have a initAmazon method', () => {
expect(component.initAmazon).toBeTruthy();
});
it('...should have a amazonAuthorize method', () => {
expect(component.amazonAuthorize).toBeTruthy();
});
it('...should have a amazonRetrieveProfile method', () => {
expect(component.amazonRetrieveProfile).toBeTruthy();
});
it('...should have a createScript method', () => {
expect(component.createScript).toBeTruthy();
});
});
it('...should be created', () => {
expect(component).toBeTruthy();
});
it('...should have a onSignIn method', () => {
expect(component.onSignIn).toBeTruthy();
});
it('...should have a initAmazon method', () => {
expect(component.initAmazon).toBeTruthy();
});
it('...should have a amazonAuthorize method', () => {
expect(component.amazonAuthorize).toBeTruthy();
});
it('...should have a amazonRetrieveProfile method', () => {
expect(component.amazonRetrieveProfile).toBeTruthy();
});
it('...should have a createScript method', () => {
expect(component.createScript).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
import { Component } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import { AmplifyService } from '../../../providers/amplify.service'
import { FacebookSignInComponentCore } from '../../../components/authenticator/federated-sign-in-component/facebook-sign-in-component/facebook-sign-in.component.core'
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
import { AmplifyService } from '../../../providers/amplify.service';
import { FacebookSignInComponentCore } from '../../../components/authenticator/federated-sign-in-component/facebook-sign-in-component/facebook-sign-in.component.core';
import Amplify from 'aws-amplify';

describe('FacebookSignInComponentCore (basics): ', () => {
let component: FacebookSignInComponentCore;
let service: AmplifyService;

let component: FacebookSignInComponentCore;
let service: AmplifyService;
beforeEach(() => {
service = new AmplifyService(Amplify);
component = new FacebookSignInComponentCore(service);
});

beforeEach(() => {
service = new AmplifyService();
component = new FacebookSignInComponentCore(service);
});
afterEach(() => {
service = null;
component = null;
});

afterEach(() => {
service = null;
component = null;
});


it('...should be created', () => {
expect(component).toBeTruthy();
});
it('...should have a onSignIn method', () => {
expect(component.onSignIn).toBeTruthy();
});
it('...should have a facebookApi method', () => {
expect(component.facebookApi).toBeTruthy();
});
it('...should have a facebookLoginStatus method', () => {
expect(component.facebookLoginStatus).toBeTruthy();
});
it('...should have a facebookLogin method', () => {
expect(component.facebookLogin).toBeTruthy();
});
it('...should have a fbAsyncInit method', () => {
expect(component.fbAsyncInit).toBeTruthy();
});
it('...should have a createScript method', () => {
expect(component.createScript).toBeTruthy();
});
});
it('...should be created', () => {
expect(component).toBeTruthy();
});
it('...should have a onSignIn method', () => {
expect(component.onSignIn).toBeTruthy();
});
it('...should have a facebookApi method', () => {
expect(component.facebookApi).toBeTruthy();
});
it('...should have a facebookLoginStatus method', () => {
expect(component.facebookLoginStatus).toBeTruthy();
});
it('...should have a facebookLogin method', () => {
expect(component.facebookLogin).toBeTruthy();
});
it('...should have a fbAsyncInit method', () => {
expect(component.fbAsyncInit).toBeTruthy();
});
it('...should have a createScript method', () => {
expect(component.createScript).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
import { Component } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import { AmplifyService } from '../../../providers/amplify.service'
import { FacebookSignInComponentIonic } from '../../../components/authenticator/federated-sign-in-component/facebook-sign-in-component/facebook-sign-in.component.ionic'
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
import { AmplifyService } from '../../../providers/amplify.service';
import { FacebookSignInComponentIonic } from '../../../components/authenticator/federated-sign-in-component/facebook-sign-in-component/facebook-sign-in.component.ionic';
import Amplify from 'aws-amplify';

describe('FacebookSignInComponentIonic (basics): ', () => {
let component: FacebookSignInComponentIonic;
let service: AmplifyService;

let component: FacebookSignInComponentIonic;
let service: AmplifyService;
beforeEach(() => {
service = new AmplifyService(Amplify);
component = new FacebookSignInComponentIonic(service);
});

beforeEach(() => {
service = new AmplifyService();
component = new FacebookSignInComponentIonic(service);
});
afterEach(() => {
service = null;
component = null;
});

afterEach(() => {
service = null;
component = null;
});


it('...should be created', () => {
expect(component).toBeTruthy();
});
it('...should have a onSignIn method', () => {
expect(component.onSignIn).toBeTruthy();
});
it('...should have a facebookApi method', () => {
expect(component.facebookApi).toBeTruthy();
});
it('...should have a facebookLoginStatus method', () => {
expect(component.facebookLoginStatus).toBeTruthy();
});
it('...should have a facebookLogin method', () => {
expect(component.facebookLogin).toBeTruthy();
});
it('...should have a fbAsyncInit method', () => {
expect(component.fbAsyncInit).toBeTruthy();
});
it('...should have a createScript method', () => {
expect(component.createScript).toBeTruthy();
});
});
it('...should be created', () => {
expect(component).toBeTruthy();
});
it('...should have a onSignIn method', () => {
expect(component.onSignIn).toBeTruthy();
});
it('...should have a facebookApi method', () => {
expect(component.facebookApi).toBeTruthy();
});
it('...should have a facebookLoginStatus method', () => {
expect(component.facebookLoginStatus).toBeTruthy();
});
it('...should have a facebookLogin method', () => {
expect(component.facebookLogin).toBeTruthy();
});
it('...should have a fbAsyncInit method', () => {
expect(component.fbAsyncInit).toBeTruthy();
});
it('...should have a createScript method', () => {
expect(component.createScript).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
import { Component } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import { AmplifyService } from '../../../providers/amplify.service'
import { FederatedSignInComponentCore } from '../../../components/authenticator/federated-sign-in-component/federated-sign-in.component.core'
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
import { AmplifyService } from '../../../providers/amplify.service';
import { FederatedSignInComponentCore } from '../../../components/authenticator/federated-sign-in-component/federated-sign-in.component.core';
import Amplify from 'aws-amplify';

describe('FederatedSignInComponentCore (basics): ', () => {
let component: FederatedSignInComponentCore;
let service: AmplifyService;

let component: FederatedSignInComponentCore;
let service: AmplifyService;
beforeEach(() => {
service = new AmplifyService(Amplify);
component = new FederatedSignInComponentCore(service);
});

beforeEach(() => {
service = new AmplifyService();
component = new FederatedSignInComponentCore(service);
});
afterEach(() => {
service = null;
component = null;
});

afterEach(() => {
service = null;
component = null;
});


it('...should be created', () => {
expect(component).toBeTruthy();
});
});
it('...should be created', () => {
expect(component).toBeTruthy();
});
});
Loading

0 comments on commit 5c431d1

Please sign in to comment.