mirror of
https://github.com/status-im/react-native-testfairy.git
synced 2025-02-23 23:58:18 +00:00
Merge branch 'master' of https://github.com/testfairy/react-native-testfairy
This commit is contained in:
commit
1400b52895
@ -11,51 +11,73 @@
|
||||
RCT_EXPORT_MODULE();
|
||||
|
||||
RCT_EXPORT_METHOD(begin:(NSString *)appKey withOptions:(NSDictionary *)options) {
|
||||
[TestFairy begin:appKey withOptions:options];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[TestFairy begin:appKey withOptions:options];
|
||||
});
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(setCorrelationId:(NSString *)correlationId) {
|
||||
[TestFairy setCorrelationId:correlationId];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[TestFairy setCorrelationId:correlationId];
|
||||
});
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(identify:(NSString *)correlationId traits:(NSDictionary *)traits) {
|
||||
[TestFairy identify:correlationId traits:traits];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[TestFairy identify:correlationId traits:traits];
|
||||
});
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(takeScreenshot) {
|
||||
[TestFairy takeScreenshot];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[TestFairy takeScreenshot];
|
||||
});
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(pause) {
|
||||
[TestFairy pause];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[TestFairy pause];
|
||||
});
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(resume) {
|
||||
[TestFairy resume];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[TestFairy resume];
|
||||
});
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(checkpoint:(NSString *)name) {
|
||||
[TestFairy checkpoint:name];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[TestFairy checkpoint:name];
|
||||
});
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(sendUserFeedback:(NSString *)feedback) {
|
||||
[TestFairy sendUserFeedback:feedback];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[TestFairy sendUserFeedback:feedback];
|
||||
});
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(sessionUrl:(RCTResponseSenderBlock)callback) {
|
||||
callback(@[[NSNull null], [TestFairy sessionUrl]]);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
callback(@[[NSNull null], [TestFairy sessionUrl]]);
|
||||
});
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(version:(RCTResponseSenderBlock)callback) {
|
||||
callback(@[[NSNull null], [TestFairy version]]);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
callback(@[[NSNull null], [TestFairy version]]);
|
||||
});
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(hideView:(nonnull NSNumber *)reactTag) {
|
||||
dispatch_async(_bridge.uiManager.methodQueue, ^{
|
||||
[_bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
||||
UIView *view = viewRegistry[reactTag];
|
||||
__block UIView *view = viewRegistry[reactTag];
|
||||
if (view != nil) {
|
||||
[TestFairy hideView:view];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[TestFairy hideView:view];
|
||||
});
|
||||
}
|
||||
}];
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-testfairy",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"description": "TestFairy for React Native",
|
||||
"author": "Gil Megidish",
|
||||
"main": "./index.js",
|
||||
@ -12,8 +12,10 @@
|
||||
"url": "git+https://github.com/testfairy/react-native-testfairy"
|
||||
},
|
||||
"keywords": [
|
||||
"react-component",
|
||||
"testfairy",
|
||||
"react-native"
|
||||
"react-native",
|
||||
"ios"
|
||||
],
|
||||
"author": "testfairy",
|
||||
"license": "Apache-2.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user