PR #2369 #150
codeql
on: dynamic
Matrix: Analyze
Annotations
6 errors and 1 warning
useNotificationRegistrations > registerNotifications > does not create preferences/notify if registration does not succeed:
src/components/settings/PushNotifications/hooks/__tests__/useNotificationRegistrations.test.ts#L74
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: {"buildNumber": "0", "bundle": "https://app.safe.global", "cloudMessagingToken": "token", "deviceType": "WEB", "safeRegistrations": [{"chainId": "1", "safes": ["0x0000000000000000000000000000000000000001"], "signatures": []}, {"chainId": "2", "safes": ["0x0000000000000000000000000000000000000002"], "signatures": []}], "timestamp": "1693486829", "uuid": "0.7720383316489652", "version": "1.17.0"}
Number of calls: 0
at Object.toHaveBeenCalledWith (/home/runner/work/safe-wallet-web/safe-wallet-web/src/components/settings/PushNotifications/hooks/__tests__/useNotificationRegistrations.test.ts:101:33)
|
useNotificationRegistrations > registerNotifications > does not create preferences/notify if registration throws:
src/components/settings/PushNotifications/hooks/__tests__/useNotificationRegistrations.test.ts#L106
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: {"buildNumber": "0", "bundle": "https://app.safe.global", "cloudMessagingToken": "token", "deviceType": "WEB", "safeRegistrations": [{"chainId": "1", "safes": ["0x0000000000000000000000000000000000000001"], "signatures": []}, {"chainId": "2", "safes": ["0x0000000000000000000000000000000000000002"], "signatures": []}], "timestamp": "1693486829", "uuid": "0.41140856261459713", "version": "1.17.0"}
Number of calls: 0
at Object.toHaveBeenCalledWith (/home/runner/work/safe-wallet-web/safe-wallet-web/src/components/settings/PushNotifications/hooks/__tests__/useNotificationRegistrations.test.ts:133:33)
|
useNotificationRegistrations > registerNotifications > creates preferences if registration succeeds without signature for a single Safe Account:
src/components/settings/PushNotifications/hooks/__tests__/useNotificationRegistrations.test.ts#L138
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: {"buildNumber": "0", "bundle": "https://app.safe.global", "cloudMessagingToken": "token", "deviceType": "WEB", "safeRegistrations": [{"chainId": "1", "safes": ["0x0000000000000000000000000000000000000001"], "signatures": []}], "timestamp": "1693486829", "uuid": "0.36884348685941326", "version": "1.17.0"}
Number of calls: 0
at Object.toHaveBeenCalledWith (/home/runner/work/safe-wallet-web/safe-wallet-web/src/components/settings/PushNotifications/hooks/__tests__/useNotificationRegistrations.test.ts:165:33)
|
useNotificationRegistrations > registerNotifications > creates preferences if registration succeeds without signature for multiple Safe Accounts:
src/components/settings/PushNotifications/hooks/__tests__/useNotificationRegistrations.test.ts#L176
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: {"buildNumber": "0", "bundle": "https://app.safe.global", "cloudMessagingToken": "token", "deviceType": "WEB", "safeRegistrations": [{"chainId": "1", "safes": ["0x0000000000000000000000000000000000000001"], "signatures": []}, {"chainId": "2", "safes": ["0x0000000000000000000000000000000000000002"], "signatures": []}], "timestamp": "1693486829", "uuid": "0.4984828201731506", "version": "1.17.0"}
Number of calls: 0
at Object.toHaveBeenCalledWith (/home/runner/work/safe-wallet-web/safe-wallet-web/src/components/settings/PushNotifications/hooks/__tests__/useNotificationRegistrations.test.ts:202:33)
|
useNotificationRegistrations > registerNotifications > creates preferences/does not notify if registration succeeded with signature:
src/components/settings/PushNotifications/hooks/__tests__/useNotificationRegistrations.test.ts#L213
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: {"buildNumber": "0", "bundle": "https://app.safe.global", "cloudMessagingToken": "token", "deviceType": "WEB", "safeRegistrations": [{"chainId": "1", "safes": ["0x0000000000000000000000000000000000000001"], "signatures": []}, {"chainId": "2", "safes": ["0x0000000000000000000000000000000000000002"], "signatures": []}], "timestamp": "1693486829", "uuid": "0.9491349644992053", "version": "1.17.0"}
Number of calls: 0
at Object.toHaveBeenCalledWith (/home/runner/work/safe-wallet-web/safe-wallet-web/src/components/settings/PushNotifications/hooks/__tests__/useNotificationRegistrations.test.ts:241:33)
|
Notifications > getRegisterDevicePayload > should return the payload with signature:
src/components/settings/PushNotifications/logic.test.ts#L92
Error: expect(received).toStrictEqual(expected) // deep equality
- Expected - 1
+ Received + 1
@@ -1,8 +1,8 @@
Object {
"buildNumber": "0",
- "bundle": "https://app.safe.global",
+ "bundle": "safe",
"cloudMessagingToken": "0.5882649678420977",
"deviceType": "WEB",
"safeRegistrations": Array [
Object {
"chainId": "1",
at Object.toStrictEqual (/home/runner/work/safe-wallet-web/safe-wallet-web/src/components/settings/PushNotifications/logic.test.ts:117:23)
|
Analyze (javascript)
Failed to restore: Cache service responded with 403
|