Skip to content

Commit 0c6d928

Browse files
committed
Fix test & eslint
1 parent f3b4274 commit 0c6d928

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

cspell.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,10 @@
920920
"CARDFROZEN",
921921
"CARDUNFROZEN",
922922
"backgrounded",
923-
"Kolkata"
923+
"Kolkata",
924+
"lintrk",
925+
"Fbclid",
926+
"Gclid"
924927
],
925928
"ignorePaths": [
926929
".gitignore",

src/libs/Navigation/AppNavigator/Navigators/OnboardingModalNavigator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function OnboardingModalNavigator() {
8080

8181
signUpEventPublishedForAccountID = accountID;
8282
GoogleTagManager.publishEvent(CONST.ANALYTICS.EVENT.SIGN_UP.NAME, accountID, email ?? '');
83-
}, [accountID]);
83+
}, [accountID, email]);
8484

8585
const handleOuterClick = useCallback(() => {
8686
OnboardingRefManager.handleOuterClick();

tests/actions/PolicyTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ describe('actions/Policy', () => {
15471547
});
15481548

15491549
expect(GoogleTagManager.publishEvent).toHaveBeenCalledTimes(1);
1550-
expect(GoogleTagManager.publishEvent).toHaveBeenCalledWith(CONST.ANALYTICS.EVENT.WORKSPACE_CREATED, ESH_ACCOUNT_ID);
1550+
expect(GoogleTagManager.publishEvent).toHaveBeenCalledWith(CONST.ANALYTICS.EVENT.WORKSPACE_CREATED.NAME, ESH_ACCOUNT_ID, ESH_EMAIL);
15511551
});
15521552

15531553
it('should not publish a workspace created event if this is not their first policy', () => {

tests/unit/GoogleTagManagerTest.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ describe('GoogleTagManagerTest', () => {
160160

161161
// Then we publish the sign_up event only once
162162
expect(GoogleTagManager.publishEvent).toHaveBeenCalledTimes(1);
163-
expect(GoogleTagManager.publishEvent).toHaveBeenCalledWith(CONST.ANALYTICS.EVENT.SIGN_UP, accountID, email);
163+
expect(GoogleTagManager.publishEvent).toHaveBeenCalledWith(CONST.ANALYTICS.EVENT.SIGN_UP.NAME, accountID, email);
164164
});
165165

166166
test('workspace_created', async () => {
@@ -201,7 +201,7 @@ describe('GoogleTagManagerTest', () => {
201201

202202
// Then we publish a workspace_created event only once
203203
expect(GoogleTagManager.publishEvent).toHaveBeenCalledTimes(1);
204-
expect(GoogleTagManager.publishEvent).toHaveBeenCalledWith(CONST.ANALYTICS.EVENT.WORKSPACE_CREATED, 123456, email);
204+
expect(GoogleTagManager.publishEvent).toHaveBeenCalledWith(CONST.ANALYTICS.EVENT.WORKSPACE_CREATED.NAME, 123456, email);
205205
});
206206

207207
test('workspace_created - categorizeTrackedExpense', async () => {
@@ -245,7 +245,7 @@ describe('GoogleTagManagerTest', () => {
245245

246246
// Then we publish a workspace_created event only once
247247
expect(GoogleTagManager.publishEvent).toHaveBeenCalledTimes(1);
248-
expect(GoogleTagManager.publishEvent).toHaveBeenCalledWith('workspace_created', accountID, email);
248+
expect(GoogleTagManager.publishEvent).toHaveBeenCalledWith(CONST.ANALYTICS.EVENT.WORKSPACE_CREATED.NAME, accountID, email);
249249
});
250250

251251
test('paid_adoption - addPaymentCard', async () => {
@@ -262,7 +262,7 @@ describe('GoogleTagManagerTest', () => {
262262

263263
// Then we publish a paid_adoption event only once
264264
expect(GoogleTagManager.publishEvent).toHaveBeenCalledTimes(1);
265-
expect(GoogleTagManager.publishEvent).toHaveBeenCalledWith(CONST.ANALYTICS.EVENT.PAID_ADOPTION, accountID, email);
265+
expect(GoogleTagManager.publishEvent).toHaveBeenCalledWith(CONST.ANALYTICS.EVENT.PAID_ADOPTION.NAME, accountID, email);
266266
});
267267

268268
test('paid_adoption - addSubscriptionPaymentCard', async () => {
@@ -285,7 +285,7 @@ describe('GoogleTagManagerTest', () => {
285285

286286
// Then we publish a paid_adoption event only once
287287
expect(GoogleTagManager.publishEvent).toHaveBeenCalledTimes(1);
288-
expect(GoogleTagManager.publishEvent).toHaveBeenCalledWith(CONST.ANALYTICS.EVENT.PAID_ADOPTION, accountID, email);
288+
expect(GoogleTagManager.publishEvent).toHaveBeenCalledWith(CONST.ANALYTICS.EVENT.PAID_ADOPTION.NAME, accountID, email);
289289
});
290290

291291
it('addSubscriptionPaymentCard when changing payment card, will not publish event paid_adoption', async () => {

0 commit comments

Comments
 (0)