Skip to content

Commit b9f09f1

Browse files
authored
Merge branch 'master' into FYLE-86cxkwzq3
2 parents d0571db + 68ded35 commit b9f09f1

File tree

66 files changed

+503
-450
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+503
-450
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [ master ]
66
pull_request:
7-
types: [opened, synchronize, edited]
7+
types: [opened, synchronize]
88

99
jobs:
1010
run-linters:

.github/workflows/main.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/stats.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [master]
66
pull_request:
7-
types: [opened, synchronize, edited]
7+
types: [opened, synchronize]
88

99
jobs:
1010
build:

src/app/auth/sign-in/sign-in.page.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ export class SignInPage implements OnInit {
257257
this.fg.reset();
258258
this.router.navigate(['/', 'auth', 'switch_org', { choose: true }]);
259259
},
260+
error: (err: HttpErrorResponse) => this.handleError(err),
260261
});
261262
}
262263

src/app/auth/verify/verify.page.spec.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import { RouterTestingModule } from '@angular/router/testing';
77
import { RouterAuthService } from 'src/app/core/services/router-auth.service';
88
import { AuthService } from 'src/app/core/services/auth.service';
99
import { TrackingService } from 'src/app/core/services/tracking.service';
10-
import { of, throwError } from 'rxjs';
10+
import { of } from 'rxjs';
1111
import { apiEouRes } from 'src/app/core/mock-data/extended-org-user.data';
12-
import { getElementBySelector, getTextContent } from 'src/app/core/dom-helpers';
13-
import { VerifyPageState } from './verify.enum';
1412
import { UserEventService } from 'src/app/core/services/user-event.service';
1513

1614
describe('VerifyPage', () => {
@@ -25,7 +23,7 @@ describe('VerifyPage', () => {
2523
beforeEach(waitForAsync(() => {
2624
const routerSpy = jasmine.createSpyObj('Router', ['navigate']);
2725
const routerAuthServiceSpy = jasmine.createSpyObj('RouterAuthService', ['emailVerify']);
28-
const authServiceSpy = jasmine.createSpyObj('AuthService', ['newRefreshToken']);
26+
const authServiceSpy = jasmine.createSpyObj('AuthService', ['refreshEou']);
2927
const trackingServiceSpy = jasmine.createSpyObj('TrackingService', ['emailVerified', 'onSignin']);
3028
const userEventServiceSpy = jasmine.createSpyObj('UserEventService', ['logout']);
3129

@@ -81,7 +79,7 @@ describe('VerifyPage', () => {
8179
it('should navigate to switch_org route when verification is successful', () => {
8280
const mockResponse = { refresh_token: 'xyz123' };
8381
routerAuthService.emailVerify.and.returnValue(of(mockResponse));
84-
authService.newRefreshToken.and.returnValue(of(apiEouRes));
82+
authService.refreshEou.and.returnValue(of(apiEouRes));
8583
fixture.detectChanges();
8684
expect(trackingService.emailVerified).toHaveBeenCalledTimes(1);
8785
expect(trackingService.onSignin).toHaveBeenCalledOnceWith('[email protected]');

src/app/auth/verify/verify.page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class VerifyPage implements OnInit {
2626
this.routerAuthService
2727
.emailVerify(verificationCode)
2828
.pipe(
29-
switchMap((resp) => this.authService.newRefreshToken(resp.refresh_token)),
29+
switchMap(() => this.authService.refreshEou()),
3030
tap((eou) => {
3131
this.trackingService.emailVerified();
3232
this.trackingService.onSignin(eou.us.email);

src/app/core/mock-data/action-sheet-options.data.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const actionSheetOptionsData = deepFreeze([
2424
]);
2525
export const expectedActionSheetButtonRes = deepFreeze([
2626
{
27-
text: 'Capture Receipt',
27+
text: 'Capture receipt',
2828
icon: 'assets/svg/camera.svg',
2929
cssClass: 'capture-receipt',
3030
handler: undefined,
@@ -51,7 +51,7 @@ export const expectedActionSheetButtonRes = deepFreeze([
5151

5252
export const expectedActionSheetButtonsWithMileage = deepFreeze([
5353
{
54-
text: 'Capture Receipt',
54+
text: 'Capture receipt',
5555
icon: 'assets/svg/camera.svg',
5656
cssClass: 'capture-receipt',
5757
handler: undefined,
@@ -72,7 +72,7 @@ export const expectedActionSheetButtonsWithMileage = deepFreeze([
7272

7373
export const expectedActionSheetButtonsWithPerDiem = deepFreeze([
7474
{
75-
text: 'Capture Receipt',
75+
text: 'Capture receipt',
7676
icon: 'assets/svg/camera.svg',
7777
cssClass: 'capture-receipt',
7878
handler: undefined,

src/app/core/mock-data/filter-options.data.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ export const filterOptions: FilterOptions<string>[] = deepFreeze([
2424
],
2525
},
2626
{
27-
name: 'Sort By',
27+
name: 'Sort by',
2828
optionType: FilterOptionType.singleselect,
2929
options: [
3030
{
31-
label: 'Created At - New to Old',
31+
label: 'Created date - New to Old',
3232
value: SortingValue.creationDateAsc,
3333
},
3434
{
35-
label: 'Created At - Old to New',
35+
label: 'Created date - Old to New',
3636
value: SortingValue.creationDateDesc,
3737
},
3838
{
39-
label: 'Approved At - New to Old',
39+
label: 'Approved date - New to Old',
4040
value: SortingValue.approvalDateAsc,
4141
},
4242
{
43-
label: 'Approved At - Old to New',
43+
label: 'Approved date - Old to New',
4444
value: SortingValue.approvalDateDesc,
4545
},
4646
{
@@ -151,7 +151,7 @@ export const filterOptions2: FilterOptions<string>[] = deepFreeze([
151151
],
152152
},
153153
{
154-
name: 'Sort By',
154+
name: 'Sort by',
155155
optionType: FilterOptionType.singleselect,
156156
options: [
157157
{
@@ -278,7 +278,7 @@ export const filterOptions3: FilterOptions<string>[] = deepFreeze([
278278
],
279279
},
280280
{
281-
name: 'Sort By',
281+
name: 'Sort by',
282282
optionType: FilterOptionType.singleselect,
283283
options: [
284284
{

src/app/core/mock-data/filter-pills.data.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const expectedFilterPill1: FilterPill[] = deepFreeze([
7575
value: 'Per Diem, Mileage',
7676
},
7777
{
78-
label: 'Sort By',
78+
label: 'Sort by',
7979
type: 'sort',
8080
value: 'category - a to z',
8181
},
@@ -98,7 +98,7 @@ export const expectedFilterPill2: FilterPill[] = deepFreeze([
9898
value: 'yes',
9999
},
100100
{
101-
label: 'Sort By',
101+
label: 'Sort by',
102102
type: 'sort',
103103
value: 'category - a to z',
104104
},
@@ -142,7 +142,7 @@ export const typeFilterPill: FilterPill = deepFreeze({
142142
});
143143

144144
export const sortFilterPill: FilterPill = deepFreeze({
145-
label: 'Sort By',
145+
label: 'Sort by',
146146
type: 'sort',
147147
value: 'category - a to z',
148148
});
@@ -170,31 +170,31 @@ export const filterTypeMappings: FilterPill[] = deepFreeze([
170170

171171
export const sortByDescFilterPill: FilterPill[] = deepFreeze([
172172
{
173-
label: 'Sort By',
173+
label: 'Sort by',
174174
type: 'sort',
175175
value: 'amount - high to low',
176176
},
177177
]);
178178

179179
export const sortByAscFilterPill: FilterPill[] = deepFreeze([
180180
{
181-
label: 'Sort By',
181+
label: 'Sort by',
182182
type: 'sort',
183183
value: 'amount - low to high',
184184
},
185185
]);
186186

187187
export const sortByDateAscFilterPill: FilterPill[] = deepFreeze([
188188
{
189-
label: 'Sort By',
189+
label: 'Sort by',
190190
type: 'sort',
191191
value: 'date - old to new',
192192
},
193193
]);
194194

195195
export const sortByDateDescFilterPill: FilterPill[] = deepFreeze([
196196
{
197-
label: 'Sort By',
197+
label: 'Sort by',
198198
type: 'sort',
199199
value: 'date - new to old',
200200
},

0 commit comments

Comments
 (0)