Testing 应用程序状态:未定义且无休止的等待测试
不知何故,在运行e2e解毒测试时,我们总是等待一些同步完成(如果我们禁用它并手动等待它工作) 我尝试删除所有动画,但不知何故仍有一些东西在运行 日志显示以下内容:Testing 应用程序状态:未定义且无休止的等待测试,testing,react-native,e2e-testing,detox,Testing,React Native,E2e Testing,Detox,不知何故,在运行e2e解毒测试时,我们总是等待一些同步完成(如果我们禁用它并手动等待它工作) 我尝试删除所有动画,但不知何故仍有一些东西在运行 日志显示以下内容: 解毒信息同步应用程序状态:未定义 解毒信息同步调度队列:com.apple.main-thread 排毒动词ws-send:{“type”:“currentStatus”,“params”:{},“messageId”:21} 排除动词ws-onMessage:{“type”:“currentStatusResult”,“messa
解毒信息同步应用程序状态:未定义
解毒信息同步调度队列:com.apple.main-thread
排毒动词ws-send:{“type”:“currentStatus”,“params”:{},“messageId”:21}
排除动词ws-onMessage:{“type”:“currentStatusResult”,“messageId”:21,“params”:{“state”:“busy”,“resources”:[{“name”:“App state”,“info”:{“elements”:[“”],“appState”:“Waiting to window的根视图控制器的视图出现”。}},{“name”:“Dispatch Queue”,“info”:“prettyPrint”:“com.apple.main thread”},“messageId”:21}
排毒动词ws
解毒信息同步应用程序状态:未定义
解毒信息同步调度队列:com.apple.main-thread
排毒动词ws-send:{“type”:“currentStatus”,“params”:{},“messageId”:22}
排除动词ws-onMessage:{“type”:“currentStatusResult”,“messageId”:22,“params”:{“state”:“busy”,“resources”:[{“name”:“App state”,“info”:{“elements”:[“”],“appState”:“Waiting to window的根视图控制器的视图出现”。}},{“name”:“Dispatch Queue”,“info”:“prettyPrint”:“com.apple.main thread”},“messageId”:22}
非常感谢您对本问题的任何帮助
[更新2018/04/18]:
我想澄清一下:
my app组件的渲染功能如下所示:
render() {
const {
isOnboardingVisible,
} = this.props;
if (isOnboardingVisible) {
return (
<View>
<Onboarding onPressButton={this.props.onOnboardingViewed} />
</View>
);
}
return <LoginScreen statusBarHidden {!!this.props.notification} />;
};
你的应用程序中有些东西定义不清——我猜它是如何在本机部分启动的。你需要在应用程序委托中发布更多关于如何设置用户界面的信息。@LeoNatan嗨,Leo。非常感谢你的帮助。我用更多的信息更新了描述。我觉得很好。你能上传一个测试项目吗?我想用本机调试。我看到了一个类似的问题,但它只发生在我在排毒中使用“tap”时。使用tap会使reloadReactNative永远不会完成,并显示消息“等待窗口的根视图控制器的视图出现”。更多详细信息请参见:
#import "AppDelegate.h"
#import <CodePush/CodePush.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <BugsnagReactNative/BugsnagReactNative.h>
#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>
#import <react-native-branch/RNBranch.h>
#import "OneSignalConfig.h"
#import <React/RCTPushNotificationManager.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
@implementation AppDelegate
@synthesize oneSignal = _oneSignal;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
NSDictionary *plistDict = [NSDictionary dictionaryWithContentsOfFile:filePath];
[GIDSignIn sharedInstance].clientID = [plistDict objectForKey:@"CLIENT_ID"];
#ifdef FREEWORK_DEBUG
[RNBranch useTestInstance];
#endif
#ifdef FREEWORK_EDGE
[RNBranch useTestInstance];
#endif
#ifdef FREEWORK_STAGING
[RNBranch useTestInstance];
#endif
[RNBranch initSessionWithLaunchOptions:launchOptions isReferrable:YES];
NSURL *jsCodeLocation;
#ifdef DEBUG
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
jsCodeLocation = [CodePush bundleURL];
#endif
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"Freework"
initialProperties:nil
launchOptions:launchOptions];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
OneSignalConfig* config = [[OneSignalConfig alloc] init];
self.oneSignal = [[RCTOneSignal alloc] initWithLaunchOptions:launchOptions
appId: [config getOneSignalAppId]
settings:@{kOSSettingsKeyAutoPrompt: @false}];
[[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
[BugsnagReactNative start];
[Fabric with:@[[Crashlytics class]]];
return YES;
}
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
BOOL handled = [[GIDSignIn sharedInstance] handleURL:url
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:options[UIApplicationOpenURLOptionsAnnotationKey]];
return handled;
}
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
if (![RNBranch.branch application:application openURL:url sourceApplication:sourceApplication annotation:annotation]) {
if ([LinkedinSwiftHelper shouldHandleUrl:url]) {
return [LinkedinSwiftHelper application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
} else if ([[GIDSignIn sharedInstance] handleURL:url
sourceApplication:sourceApplication
annotation:annotation]) {
return YES;
} else if( [url.absoluteString rangeOfString: @"fb" ].location != NSNotFound ) {
return [[FBSDKApplicationDelegate sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
} else {
}
}
return YES;
}
// Respond to Universal Links
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler {
return [RNBranch continueUserActivity:userActivity];
} // Required to register for notifications
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
[RCTPushNotificationManager didRegisterUserNotificationSettings:notificationSettings];
}
// Required for the register event.
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
[RCTPushNotificationManager didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}
// Required for the notification event. You must call the completion handler after handling the remote notification.
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
{
[RCTPushNotificationManager didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}
// Required for the registrationError event.
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
[RCTPushNotificationManager didFailToRegisterForRemoteNotificationsWithError:error];
}
// Required for the localNotification event.
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
[RCTPushNotificationManager didReceiveLocalNotification:notification];
}
@end