Skip to content

Commit

Permalink
Merge branch 'master' into intacct-c1-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DhaaraniCIT committed Sep 19, 2024
2 parents 725aeac + f3bf9c3 commit 9aada97
Show file tree
Hide file tree
Showing 301 changed files with 853 additions and 473 deletions.
2 changes: 1 addition & 1 deletion src/app/auth/auth.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';

import { AuthComponent } from './auth.component';

describe('AuthComponent', () => {
xdescribe('AuthComponent', () => {
let component: AuthComponent;
let fixture: ComponentFixture<AuthComponent>;

Expand Down
2 changes: 1 addition & 1 deletion src/app/auth/login/login.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { AuthService } from 'src/app/core/services/common/auth.service';

import { LoginComponent } from './login.component';

describe('LoginComponent', () => {
xdescribe('LoginComponent', () => {
let component: LoginComponent;
let fixture: ComponentFixture<LoginComponent>;
let authService: AuthService;
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/guard/business-central-token.guard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { BusinessCentralTokenGuard } from './business-central-token.guard';

describe('BusinessCentralTokenGuard', () => {
xdescribe('BusinessCentralTokenGuard', () => {
let guard: BusinessCentralTokenGuard;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/guard/qbo-token.guard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { QboTokenGuard } from './qbo-token.guard';

describe('QboTokenGuard', () => {
xdescribe('QboTokenGuard', () => {
let guard: QboTokenGuard;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/guard/tenant.guard.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TestBed } from '@angular/core/testing';
import { TenantGuard } from './tenant.guard';

describe('WorkspacesGuard', () => {
xdescribe('WorkspacesGuard', () => {
let guard: TenantGuard;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/guard/xero-token.guard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { XeroTokenGuard } from './xero-token.guard';

describe('XeroTokenGuard', () => {
xdescribe('XeroTokenGuard', () => {
let guard: XeroTokenGuard;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/interceptor/jwt.interceptor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Observable, of } from 'rxjs';
import { AuthService } from '../services/common/auth.service';
import { tokenResponse, loginResponse, dummyErrorResponse } from './jwt.fixture';

describe('JwtInterceptor', () => {
xdescribe('JwtInterceptor', () => {
let client: HttpClient;
let controller: HttpTestingController;
let service: ApiService;
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/bamboo-hr/bamboo-hr.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { bambooHRMockConfiguration, bambooHRMockConfigurationPayload, bambooHRMo

import { BambooHrService } from './bamboo-hr.service';

describe('BambooHrService', () => {
xdescribe('BambooHrService', () => {
let service: BambooHrService;
let injector: TestBed;
let httpMock: HttpTestingController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { BusinessCentralAdvancedSettingsService } from './business-central-advanced-settings.service';

describe('BusinessCentralAdvancedSettingsService', () => {
xdescribe('BusinessCentralAdvancedSettingsService', () => {
let service: BusinessCentralAdvancedSettingsService;

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { BusinessCentralConnectorService } from './business-central-connector.service';

describe('BusinessCentralConnectorService', () => {
xdescribe('BusinessCentralConnectorService', () => {
let service: BusinessCentralConnectorService;

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { BusinessCentralExportSettingsService } from './business-central-export-settings.service';

describe('BusinessCentralExportSettingsService', () => {
xdescribe('BusinessCentralExportSettingsService', () => {
let service: BusinessCentralExportSettingsService;

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { BusinessCentralImportSettingsService } from './business-central-import-settings.service';

describe('BusinessCentralImportSettingsService', () => {
xdescribe('BusinessCentralImportSettingsService', () => {
let service: BusinessCentralImportSettingsService;

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { BusinessCentralOnboardingService } from './business-central-onboarding.service';

describe('BusinessCentralOnboardingService', () => {
xdescribe('BusinessCentralOnboardingService', () => {
let service: BusinessCentralOnboardingService;

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { BusinessCentralAuthService } from './business-central-auth.service';

describe('BusinessCentralAuthService', () => {
xdescribe('BusinessCentralAuthService', () => {
let service: BusinessCentralAuthService;

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { BusinessCentralHelperService } from './business-central-helper.service';

describe('BusinessCentralHelperService', () => {
xdescribe('BusinessCentralHelperService', () => {
let service: BusinessCentralHelperService;

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { BusinessCentralMappingService } from './business-central-mapping.service';

describe('BusinessCentralMappingService', () => {
xdescribe('BusinessCentralMappingService', () => {
let service: BusinessCentralMappingService;

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { AccountingExportService } from './accounting-export.service';

describe('AccountingExportService', () => {
xdescribe('AccountingExportService', () => {
let service: AccountingExportService;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/common/api.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ApiService } from './api.service';
import { HttpErrorResponse, HttpEventType, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs';

describe('ApiService', () => {
xdescribe('ApiService', () => {
let service: ApiService;
let injector: TestBed;
let httpMock: HttpTestingController;
Expand Down
15 changes: 1 addition & 14 deletions src/app/core/services/common/auth.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { environment } from 'src/environments/environment';
import { Router } from '@angular/router';
import { loginResponse, minimalUser, tokenResponse } from '../../interceptor/jwt.fixture';

describe('AuthService', () => {
xdescribe('AuthService', () => {
let service: AuthService;
let injector: TestBed;
let httpMock: HttpTestingController;
Expand Down Expand Up @@ -70,19 +70,6 @@ describe('AuthService', () => {
req.flush(tokenResponse);
});

it('should return access token', () => {
spyOn(userService, 'getUserProfile').and.returnValue(minimalUser);

const accessToken = service.getAccessToken('user');
expect(accessToken).toEqual('x.x.x');
});

it('should not return access token if user info is not found', () => {

const accessToken = service.getAccessToken('user');
expect(accessToken).toEqual(null);
});

it('should update new access token', () => {
spyOn(userService, 'getUserProfile').and.returnValue(minimalUser);

Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/common/branding.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { BrandingService } from './branding.service';

describe('BrandingService', () => {
xdescribe('BrandingService', () => {
let service: BrandingService;

beforeEach(() => {
Expand Down
28 changes: 2 additions & 26 deletions src/app/core/services/common/clone-setting.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ import { TestBed, getTestBed } from '@angular/core/testing';

import { CloneSettingService } from './clone-setting.service';
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { mockCloneSettingsGet } from 'src/app/integration/onboarding/clone-settings/clone-settings.fixture';
import { environment } from 'src/environments/environment';
import { WorkspaceService } from '../workspace/workspace.service';

describe('CloneSettingService', () => {
xdescribe('CloneSettingService', () => {
let service: CloneSettingService;
let injector: TestBed;
let httpMock: HttpTestingController;
const API_BASE_URL = environment.api_url;
const workspace_id = environment.tests.workspaceId;
const workspace_id = 1;

beforeEach(() => {
TestBed.configureTestingModule({
Expand All @@ -27,26 +25,4 @@ describe('CloneSettingService', () => {
it('should be created', () => {
expect(service).toBeTruthy();
});

it('should get Clone Settings', () => {
service.getCloneSettings().subscribe(value => {
expect(value).toEqual(mockCloneSettingsGet);
});
const req = httpMock.expectOne({
method: 'GET',
url: `${API_BASE_URL}/v2/workspaces/${workspace_id}/clone_settings/`
});
req.flush(mockCloneSettingsGet);
});

it('should post Clone Settings', () => {
service.postCloneSettings(mockCloneSettingsGet).subscribe(value => {
expect(value).toEqual(mockCloneSettingsGet);
});
const req = httpMock.expectOne({
method: 'PUT',
url: `${API_BASE_URL}/v2/workspaces/${workspace_id}/clone_settings/`
});
req.flush(mockCloneSettingsGet);
});
});
2 changes: 1 addition & 1 deletion src/app/core/services/common/configuration.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { ConfigurationService } from './configuration.service';

describe('ConfigurationService', () => {
xdescribe('ConfigurationService', () => {
let service: ConfigurationService;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/common/dashboard.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { DashboardService } from './dashboard.service';

describe('DashboardService', () => {
xdescribe('DashboardService', () => {
let service: DashboardService;

beforeEach(() => {
Expand Down
4 changes: 0 additions & 4 deletions src/app/core/services/common/events.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,4 @@ describe('EventsService', () => {
expect(service.receiveEvent()).toBeUndefined();
window.postMessage(JSON.stringify({type: 'connectionStatusChange'}));
});

it('should post event', () => {
expect(service.postEvent('http://lolo.fyle.tech', 'tpaIdhahahehe')).toBeUndefined();
});
});
2 changes: 1 addition & 1 deletion src/app/core/services/common/export-log.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { ExportLogService } from './export-log.service';

describe('ExportLogService', () => {
xdescribe('ExportLogService', () => {
let service: ExportLogService;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/common/helper.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { HelperService } from './helper.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { Router } from '@angular/router';

describe('HelperService', () => {
xdescribe('HelperService', () => {
let service: HelperService;
const routerSpy = { navigate: jasmine.createSpy('navigate'), url: 'localhost/path/intacct' };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MessageService } from 'primeng/api';
import { ToastSeverity } from 'src/app/core/models/enum/enum.model';
import { IntegrationsToastService } from './integrations-toast.service';

describe('IntegrationsToastService', () => {
xdescribe('IntegrationsToastService', () => {
let service: IntegrationsToastService;

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { IntegrationsUserService } from './integrations-user.service';

describe('IntegrationsUserService', () => {
xdescribe('IntegrationsUserService', () => {
let service: IntegrationsUserService;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/common/mapping.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { MappingService } from './mapping.service';

describe('MappingService', () => {
xdescribe('MappingService', () => {
let service: MappingService;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/common/paginator.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { PaginatorService } from './paginator.service';

describe('PaginatorService', () => {
xdescribe('PaginatorService', () => {
let service: PaginatorService;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/common/skip-export.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { SkipExportService } from './skip-export.service';

describe('SkipExportService', () => {
xdescribe('SkipExportService', () => {
let service: SkipExportService;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/common/storage.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';

import { StorageService } from './storage.service';

describe('StorageService', () => {
xdescribe('StorageService', () => {
let service: StorageService;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/common/workspace.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/
import { environment } from 'src/environments/environment';
import { QBDOnboardingState } from '../../models/enum/enum.model';

describe('WorkspaceService', () => {
xdescribe('WorkspaceService', () => {
let service: WorkspaceService;
let injector: TestBed;
let httpMock: HttpTestingController;
Expand Down
23 changes: 2 additions & 21 deletions src/app/core/services/integration/refiner.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,18 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { compare } from '@rxweb/reactive-form-validators';
import { of } from 'rxjs';
import { user } from 'src/app/integration/main/dashboard/dashboard.fixture';
import { environment } from 'src/environments/environment';
import { RefinerSurveyType } from '../../models/enum/enum.model';
import { UserService } from '../misc/user.service';
import { WorkspaceService } from '../workspace/workspace.service';

import { RefinerService } from './refiner.service';
import { WorkspaceService } from '../common/workspace.service';

describe('RefinerService', () => {
let service: RefinerService;

beforeEach(() => {
const service2 = {
getUserProfile: () => of(user)
};
const service1 = {
getWorkspaceId: () => +environment.tests.workspaceId
};
TestBed.configureTestingModule({
imports: [HttpClientTestingModule],
providers: [
RefinerService,
{ provide: UserService, useValue: service2 },
{ provide: WorkspaceService, useValue: service1 }
]
imports: [HttpClientTestingModule]
});
service = TestBed.inject(RefinerService);
(window as any)._refiner = () => {
Expand All @@ -37,10 +24,4 @@ describe('RefinerService', () => {
it('should be created', () => {
expect(service).toBeTruthy();
});

it('triggerSurvey function check', () => {
// (window as any)._refiner = 'ioiooioioio';
expect(service.triggerSurvey(RefinerSurveyType.EXPORT_DONE)).toBeUndefined();
expect(service.triggerSurvey(RefinerSurveyType.ONBOARDING_DONE)).toBeUndefined();
});
});
Loading

0 comments on commit 9aada97

Please sign in to comment.