Skip to content

Commit 7f3249b

Browse files
Fix v5 tests (#2791)
1 parent 78e6c8d commit 7f3249b

File tree

6 files changed

+487
-17
lines changed

6 files changed

+487
-17
lines changed

.github/workflows/e2e.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ jobs:
364364
-scheme RnDiffApp \
365365
-destination 'platform=iOS Simulator,OS=${{ matrix.runtime }},name=${{ matrix.device }}' \
366366
ONLY_ACTIVE_ARCH=yes \
367-
-sdk 'iphonesimulator' \
368367
-derivedDataPath "$derivedData" \
369368
build
370369
@@ -405,21 +404,20 @@ jobs:
405404
strategy:
406405
fail-fast: false # keeps matrix running if one fails
407406
matrix:
408-
rn-version: ['0.65.3', '0.70.6']
407+
rn-version: ['0.65.3', '0.71.0']
409408
rn-architecture: ['legacy', 'new']
410409
platform: ['android', 'ios']
411410
build-type: ['production']
412411
include:
413412
- platform: ios
414-
runtime: '16.0'
413+
runtime: 'latest'
415414
device: 'iPhone 14'
416415
# exclude all rn versions lower than 0.70.0 for new architecture
417416
exclude:
418417
- rn-version: '0.65.3'
419418
rn-architecture: 'new'
420419
env:
421420
PLATFORM: ${{ matrix.platform }}
422-
RUNTIME: ${{ matrix.runtime }}
423421
DEVICE: ${{ matrix.device }}
424422
steps:
425423
- uses: actions/checkout@v3
@@ -463,9 +461,8 @@ jobs:
463461
-scheme WebDriverAgentRunner \
464462
GCC_TREAT_WARNINGS_AS_ERRORS=0 \
465463
COMPILER_INDEX_STORE_ENABLE=NO \
466-
-destination 'platform=iOS Simulator,name=${{ matrix.device }}' \
464+
-destination 'platform=iOS Simulator,OS=${{ matrix.runtime }},name=${{ matrix.device }}' \
467465
ONLY_ACTIVE_ARCH=yes \
468-
-sdk 'iphonesimulator${{ matrix.runtime }}' \
469466
-derivedDataPath "$derivedData" \
470467
build
471468

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"eslint-plugin-react": "^7.20.6",
6565
"eslint-plugin-react-native": "^3.8.1",
6666
"jest": "^29.3.1",
67+
"jest-environment-jsdom": "^29.4.1",
6768
"prettier": "^2.0.5",
6869
"react": "18.2.0",
6970
"react-native": "0.71.0",

test/e2e/tsconfig.build.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"paths": {
1515
"@sentry/react-native": [
1616
"../../dist/js/index.js"
17+
],
18+
"react-native": [
19+
"../../node_modules/react-native/index.js"
1720
]
1821
},
1922
"types": [

test/perf/metrics-ios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ startupTimeTest:
1111

1212
binarySizeTest:
1313
diffMin: 200 KiB
14-
diffMax: 400 KiB
14+
diffMax: 600 KiB

test/touchevents.test.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ import type { SeverityLevel } from '@sentry/types';
66

77
import { TouchEventBoundary } from '../src/js/touchevents';
88

9-
const addBreadcrumb = jest.spyOn(core, 'addBreadcrumb');
9+
describe('TouchEventBoundary._onTouchStart', () => {
10+
let addBreadcrumb: jest.SpyInstance;
1011

11-
afterEach(() => {
12-
jest.resetAllMocks();
13-
});
12+
beforeEach(() => {
13+
jest.resetAllMocks();
14+
addBreadcrumb = jest.spyOn(core, 'addBreadcrumb');
15+
});
1416

15-
describe('TouchEventBoundary._onTouchStart', () => {
1617
it('tree without displayName or label is not logged', () => {
1718
const { defaultProps } = TouchEventBoundary;
1819
const boundary = new TouchEventBoundary(defaultProps);

0 commit comments

Comments
 (0)