мои настройки детоксикации работают для android, но у меня проблемы с iOS.
Проблема в том, что приложение застревает на экране запуска / spla sh после загрузки пакета из комплектовщик метро. Детокс не записывает много:
App has not responded to the network requests below:
(id = -1000) isReady: {}
Unresponded network requests might result in timeout errors in Detox tests.
Настройка выглядит так:
.detoxr c. json
...
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/<app_name>.app",
"build": "xcodebuild -workspace ios/<project_name>.xcworkspace -scheme <scheme> -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"device": {
"type": "iPhone 11 Pro"
}
},
...
e2e / Login.e2e. js
const detox = require('detox');
const config = require('../.detoxrc.json');
describe('Login', () => {
beforeAll(async () => {
await detox.init(config, { launchApp: false });
await device.launchApp({
newInstance: true,
launchArgs: { detoxPrintBusyIdleResources: 'YES' },
permissions: {
notifications: 'YES',
camera: 'YES',
medialibrary: 'YES',
photos: 'YES',
microphone: 'YES',
},
});
});
beforeEach(async () => {
// await device.reloadReactNative();
});
it('should be able to login successfully', async () => {
await element(by.id('EmailInput')).typeText('email\n');
await element(by.id('PasswordInput')).typeText('pass\n');
await element(by.id('LoginButton')).tap();
});
it('should display the welcome screen after the login', async () => {
await expect(element(by.id('WelcomeScreen'))).toBeVisible();
});
});
Команда для просмотра журналов EarlGrey, но при этом не регистрируется ни одного символа:
xcrun simctl spawn booted log stream --level debug --style compact --predicate "category=='EarlGreyStatistics'"
Я часами ломаю голову, пытаясь понять, почему приложение зависло и почему я не получаю никаких журналов, и был бы очень признателен за вашу помощь.
Окружающая среда:
Станок:
MacOS: 10.15.5
XCode: 11.6
applesimutils: 0.8
Node: 12.18.1
detox-cli: 17.1.0
Проект:
"react": "16.11.0",
"react-native": "0.62.1",
"detox": "^17.3.4",
"jest": "^26.2.2",
"jest-circus": "^26.2.2",