Compare commits

..
20 changed files with 63 additions and 188 deletions
+2 -4
View File
@@ -881,9 +881,7 @@ PODS:
- React-Core
- react-native-blur (4.3.3):
- React-Core
- react-native-cameraroll (7.5.2):
- glog
- RCT-Folly (= 2022.05.16.00)
- react-native-cameraroll (5.10.0):
- React-Core
- react-native-config (1.5.0):
- react-native-config/App (= 1.5.0)
@@ -1477,7 +1475,7 @@ SPEC CHECKSUMS:
react-native-biometrics: 352e5a794bfffc46a0c86725ea7dc62deb085bdc
react-native-blob-util: 600972b1782380a5a7d5db61a3817ea32349dae9
react-native-blur: c6d0a1dc2b4b519f7afe3b14d8151998632b6d18
react-native-cameraroll: af8eec1e585d053ff485d98ec837f9a8a11b5745
react-native-cameraroll: 4701ae7c3dbcd3f5e9e150ca17f250a276154b35
react-native-config: 5330c8258265c1e5fdb8c009d2cabd6badd96727
react-native-hole-view: 6935448993bac79f2b5a4ad7e9741094cf810679
react-native-image-resizer: 2f1577efa3bc762597681f530c8e8d05ce0ceeb3
+23 -19
View File
@@ -60,26 +60,30 @@ in {
version = "15.0";
allowHigher = true;
};
go = super.go_1_19;
go = super.go_1_20;
clang = super.clang_15;
buildGoPackage = super.buildGo119Package;
buildGoModule = super.buildGo119Module;
gomobile = (super.gomobile.overrideAttrs (old: {
patches = [
(self.fetchurl { # https://github.com/golang/mobile/pull/84
url = "https://github.com/golang/mobile/commit/f20e966e05b8f7e06bed500fa0da81cf6ebca307.patch";
sha256 = "sha256-TZ/Yhe8gMRQUZFAs9G5/cf2b9QGtTHRSObBFD5Pbh7Y=";
})
(self.fetchurl { # https://github.com/golang/go/issues/58426
url = "https://github.com/golang/mobile/commit/406ed3a7b8e44dc32844953647b49696d8847d51.patch";
sha256 = "sha256-dqbYukHkQEw8npOkKykOAzMC3ot/Y4DEuh7fE+ptlr8=";
})
];
})).override {
# FIXME: No Android SDK packages for aarch64-darwin.
withAndroidPkgs = stdenv.system != "aarch64-darwin";
androidPkgs = self.androidEnvCustom.compose;
};
buildGoPackage = super.buildGo120Package;
buildGoModule = super.buildGo120Module;
gomobile = super.gomobile.override {
# FIXME: No Android SDK packages for aarch64-darwin.
withAndroidPkgs = stdenv.system != "aarch64-darwin";
androidPkgs = self.androidEnvCustom.compose;
buildGoModule = args: super.buildGo120Module ( args // rec {
CGO_ENABLED=1;
GODEBUG="netdns=cgo";
patches = [
(self.fetchurl { # https://github.com/golang/mobile/pull/84
url = "https://github.com/golang/mobile/commit/f20e966e05b8f7e06bed500fa0da81cf6ebca307.patch";
sha256 = "sha256-TZ/Yhe8gMRQUZFAs9G5/cf2b9QGtTHRSObBFD5Pbh7Y=";
})
(self.fetchurl { # https://github.com/golang/go/issues/58426
url = "https://github.com/golang/mobile/commit/406ed3a7b8e44dc32844953647b49696d8847d51.patch";
sha256 = "sha256-dqbYukHkQEw8npOkKykOAzMC3ot/Y4DEuh7fE+ptlr8=";
})
];
});
};
# Android environement
androidEnvCustom = callPackage ./pkgs/android-sdk { };
+2
View File
@@ -35,6 +35,8 @@ in buildGoPackage {
ANDROID_HOME = optionalString isAndroid androidPkgs.sdk;
CGO_ENABLED=1;
# Ensure XCode is present for iOS, instead of failing at the end of the build.
preConfigure = optionalString isIOS enforceXCodeAvailable;
+2 -2
View File
@@ -9,7 +9,7 @@
},
"dependencies": {
"@react-native-async-storage/async-storage": "1.19.3",
"@react-native-camera-roll/camera-roll": "7.5.2",
"@react-native-camera-roll/camera-roll": "git+https://github.com/status-im/react-native-camera-roll.git#refs/tags/v5.1.1.1",
"@react-native-clipboard/clipboard": "1.13.2",
"@react-native-community/audio-toolkit": "git+https://github.com/tbenr/react-native-audio-toolkit.git#refs/tags/v2.0.3-status-v6",
"@react-native-community/blur": "git+https://github.com/status-im/react-native-blur.git#refs/tags/v4.3.3-status",
@@ -48,7 +48,7 @@
"react-native-keychain": "8.1.2",
"react-native-linear-gradient": "^2.8.0",
"react-native-lottie-splash-screen": "^1.0.1",
"react-native-mail": "6.1.1",
"react-native-mail": "git+https://github.com/status-im/react-native-mail.git#refs/tags/v6.1.2-status",
"react-native-navigation": "7.38.3",
"react-native-orientation-locker": "^1.5.0",
"react-native-permissions": "3.8.0",
-22
View File
@@ -1,22 +0,0 @@
--- /tmp/tmp-status-mobile-3907e6b2e/tmp.re8kHerusA/CameraRoll.ts 2024-04-16 15:17:12.942432000 +0200
+++ ./node_modules/@react-native-camera-roll/camera-roll/src/CameraRoll.ts 2024-04-16 15:17:42.455250986 +0200
@@ -239,6 +239,19 @@
}
/**
+ * Returns total iOS image count
+ */
+ static getPhotosCountiOS(): Promise<number> {
+ return RNCCameraRoll.getPhotosCountiOS('');
+ }
+ /**
+ * Returns favorites and their count iOS
+ */
+ static getFavoritesiOS(): Promise<Album> {
+ return RNCCameraRoll.getFavoritesiOS('');
+ }
+
+ /**
* Saves the photo or video to the camera roll or photo library, and returns the URI of the newly created asset.
*
* @deprecated `save(...)` is deprecated - use `saveAsset(...)` instead.
-11
View File
@@ -1,11 +0,0 @@
--- /tmp/tmp-status-mobile-3907e6b2e/tmp.juxTO1BeCM/NativeCameraRollModule.ts 2024-04-16 15:21:28.379979000 +0200
+++ ./node_modules/@react-native-camera-roll/camera-roll/src/NativeCameraRollModule.ts 2024-04-16 15:21:40.490391291 +0200
@@ -81,6 +81,8 @@
getPhotos(params: Object): Promise<PhotoIdentifiersPage>;
getAlbums(params: Object): Promise<Album[]>;
deletePhotos(photoUris: Array<string>): Promise<void>;
+ getPhotosCountiOS(arg: string): Promise<number>;
+ getFavoritesiOS(arg: string): Promise<Album>;
getPhotoByInternalID(
internalID: string,
options: Object,
-56
View File
@@ -1,56 +0,0 @@
--- /tmp/tmp-status-mobile-3907e6b2e/tmp.O0mkyjqnsy/RNCCameraRoll.mm 2024-04-16 15:26:23.070258000 +0200
+++ ./node_modules/@react-native-camera-roll/camera-roll/ios/RNCCameraRoll.mm 2024-04-16 15:26:32.664996066 +0200
@@ -955,6 +955,53 @@
return [albumTitles copy];
}
+RCT_EXPORT_METHOD(getPhotosCountiOS:(NSString *)blank
+ resolve:(RCTPromiseResolveBlock)resolve
+ reject:(RCTPromiseRejectBlock)reject)
+{
+ __block NSInteger intTotalCount=0;
+ PHFetchOptions *allPhotosOptions = [PHFetchOptions new];
+ allPhotosOptions.predicate = [NSPredicate predicateWithFormat:@"mediaType == %d ",PHAssetMediaTypeImage];
+ PHFetchResult *allPhotosResult = [PHAsset fetchAssetsWithOptions:allPhotosOptions];
+ intTotalCount+=allPhotosResult.count;
+
+ resolve(@(intTotalCount));
+}
+
+RCT_EXPORT_METHOD(getFavoritesiOS:(NSString *)blank
+ resolve:(RCTPromiseResolveBlock)resolve
+ reject:(RCTPromiseRejectBlock)reject)
+{
+ __block NSInteger intTotalCount=0;
+ PHFetchOptions *fetchOptions = [PHFetchOptions new];
+ NSString *format = @"(favorite == true)";
+ fetchOptions.predicate = [NSPredicate predicateWithFormat:format];
+ PHFetchResult<PHAsset *> *const assetsFetchResult = [PHAsset fetchAssetsWithOptions:fetchOptions];
+ PHAsset *imageAsset = [assetsFetchResult firstObject];
+ NSMutableArray * result = [NSMutableArray new];
+
+ for (PHAsset* asset in assetsFetchResult) {
+ NSArray *resources = [PHAssetResource assetResourcesForAsset:asset ];
+ if ([resources count] < 1) continue;
+ NSString *orgFilename = ((PHAssetResource*)resources[0]).originalFilename;
+ NSString *uit = ((PHAssetResource*)resources[0]).uniformTypeIdentifier;
+ NSString *mimeType = (NSString *)CFBridgingRelease(UTTypeCopyPreferredTagWithClass((__bridge CFStringRef _Nonnull)(uit), kUTTagClassMIMEType));
+ CFStringRef extension = UTTypeCopyPreferredTagWithClass((__bridge CFStringRef _Nonnull)(uit), kUTTagClassFilenameExtension);
+ [result addObject:@{
+ @"width": @([asset pixelWidth]),
+ @"height": @([asset pixelHeight]),
+ @"filename": orgFilename ?: @"",
+ @"mimeType": mimeType ?: @"",
+ @"id": [asset localIdentifier],
+ @"creationDate": [asset creationDate],
+ @"uri": [NSString stringWithFormat:@"ph://%@", [asset localIdentifier]],
+ @"duration": @([asset duration])
+ }];
+ }
+ [result addObject:@{@"count": @(assetsFetchResult.count)}];
+ resolve(result);
+}
+
static void checkPhotoLibraryConfig()
{
#if RCT_DEV
@@ -1,15 +0,0 @@
--- /tmp/tmp-status-mobile-6e854428f/tmp.PSruc8WtHx/build.gradle 2024-04-17 11:08:46.857319000 +0200
+++ ./node_modules/react-native-mail/android/build.gradle 2024-04-17 11:09:22.935436792 +0200
@@ -1,7 +1,11 @@
apply plugin: 'com.android.library'
+def safeExtGet(prop, fallback) {
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
+}
+
android {
- compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : 23
+ compileSdkVersion safeExtGet('compileSdkVersion', 30)
buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : "23.0.1"
defaultConfig {
+6 -6
View File
@@ -28,9 +28,9 @@
:theme :light/:dark
only icon
[button {:icon-only? true} :i/close-circle]"
[{:keys [on-press on-long-press disabled? type background size icon-left icon-left-color icon-right
icon-right-color icon-top icon-top-color customization-color accessibility-label icon-only?
container-style inner-style pressed? on-press-in on-press-out allow-multiple-presses?]
[{:keys [on-press on-long-press disabled? type background size icon-left icon-right icon-top
customization-color accessibility-label icon-only? container-style inner-style
pressed? on-press-in on-press-out allow-multiple-presses?]
:or {type :primary
size 40
customization-color (if (= type :primary) :blue nil)}}
@@ -94,7 +94,7 @@
[quo.icons/icon icon-top
{:container-style {:margin-bottom 2
:opacity (when disabled? 0.3)}
:color (or icon-top-color icon-color)
:color icon-color
:size icon-size}]])
(when icon-left
[rn/view
@@ -103,7 +103,7 @@
:icon-size icon-size
:disabled? disabled?})}
[quo.icons/icon icon-left
{:color (or icon-left-color icon-color)
{:color icon-color
:size icon-size}]])
[rn/view
(cond
@@ -130,5 +130,5 @@
:icon-size icon-size
:disabled? disabled?})}
[quo.icons/icon icon-right
{:color (or icon-right-color icon-color)
{:color icon-color
:size icon-size}]])]]]))
@@ -51,7 +51,7 @@
[rn/view {:padding-top 4 :width 32}]))
(defn author
[{:keys [content
[{:keys [response-to
compressed-key
last-in-group?
pinned-by
@@ -61,7 +61,7 @@
show-reactions?
in-reaction-and-action-menu?
show-user-info?]
(when (or (and (seq (:response-to content)) quoted-message)
(when (or (and (seq response-to) quoted-message)
last-in-group?
pinned-by
show-user-info?
@@ -1,7 +1,6 @@
(ns status-im.contexts.wallet.collectible.view
(:require
[quo.core :as quo]
[quo.foundations.colors :as colors]
[quo.theme :as quo.theme]
[react-native.core :as rn]
[react-native.svg :as svg]
@@ -37,13 +36,10 @@
:icon-left :i/send}
(i18n/label :t/send)]
[quo/button
{:container-style style/opensea-button
:type :outline
:size 40
:icon-left :i/opensea
:icon-left-color (colors/theme-colors colors/neutral-100 colors/neutral-40)
:icon-right :i/external
:icon-right-color (colors/theme-colors colors/neutral-50 colors/neutral-40)}
{:container-style style/opensea-button
:type :outline
:size 40
:icon-left :i/opensea}
(i18n/label :t/opensea)]])
(def tabs-data
+3 -3
View File
@@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v0.179.5",
"commit-sha1": "a39c01d7fe1ac60dc2a34bb16d550f09c64d3a3d",
"src-sha256": "0g53nqkhpyzy9iwz9lfh2qq8s5wrfa69lic29ps0qb92h0ac428l"
"version": "investigate-store-node-failure",
"commit-sha1": "88c0b7d6a1e0ca199c4bc72f320c6087e476d59f",
"src-sha256": "1yh65b52nw62mi8mpq3jpd22m29gny4gd71iyk5n06bai32s6q9c"
}
+3 -5
View File
@@ -51,8 +51,7 @@ class BaseTestReport:
'name': test.name,
'geth_paths': geth_paths,
'testruns': list(),
'group_name': test.group_name,
'secured': test.secured
'group_name': test.group_name
}
for testrun in test.testruns:
test_dict['testruns'].append(testrun.__dict__)
@@ -76,8 +75,7 @@ class BaseTestReport:
geth_paths=test_data['geth_paths'],
testruns=testruns,
testrail_case_id=test_data['testrail_case_id'],
grop_name=test_data['group_name'],
secured=test_data['secured']))
grop_name=test_data['group_name']))
return tests
def get_tests_by_status(self):
@@ -108,7 +106,7 @@ class BaseTestReport:
@staticmethod
def get_jenkins_link_to_rerun_e2e(branch_name="develop", pr_id="", tr_case_ids=""):
return 'https://ci.status.im/job/status-mobile/job/e2e/job/status-app-prs-rerun/parambuild/' \
'?BRANCH_NAME=%s&PR_ID=%s&APK_URL=%s.apk&TR_CASE_IDS=%s' % (branch_name, pr_id, pr_id, tr_case_ids)
'?BRANCH_NAME=%s&PR_ID=%s&TR_CASE_IDS=%s' % (branch_name, pr_id, tr_case_ids)
def get_sauce_final_screenshot_url(self, job_id):
return 'https://media.giphy.com/media/9M5jK4GXmD5o1irGrF/giphy.gif'
+3 -9
View File
@@ -76,19 +76,13 @@ class GithubHtmlReport(BaseTestReport):
from tests import pytest_config_global
pr_id = pytest_config_global['pr_number']
from github import Github
from conftest import github_token
branch_name = Github(github_token).get_user('status-im').get_repo('status-mobile').get_pull(int(pr_id)).head.ref
if not_executed_tests:
html += "<li><a href=\"%s\">Rerun not executed tests</a></li>" % self.get_jenkins_link_to_rerun_e2e(
branch_name=branch_name,
pr_id=pr_id,
tr_case_ids=','.join([str(i) for i in tests]))
if failed_tests:
html += "<li><a href=\"%s\">Rerun failed tests</a></li>" % self.get_jenkins_link_to_rerun_e2e(
branch_name=branch_name,
pr_id=pr_id,
tr_case_ids=','.join([str(test.testrail_case_id) for test in tests]))
@@ -147,7 +141,7 @@ class GithubHtmlReport(BaseTestReport):
else:
html += "\n\n```\n%s\n```\n\n" % error.replace("[[", "<b>[[").replace("]]", "]]</b>")
html += "<br/><br/>"
if last_testrun.jobs and not test.secured:
if last_testrun.jobs:
html += self.build_device_sessions_html(last_testrun)
html += "</td></tr>"
return html
@@ -164,8 +158,8 @@ class GithubHtmlReport(BaseTestReport):
self.get_sauce_job_url(job_id, test_run.first_commands[job_id])
else:
html += "<li><a href=\"%s\">Steps, video, logs</a></li>" % self.get_sauce_job_url(job_id)
# if test_run.error:
# html += "<li><a href=\"%s\">Failure screenshot</a></li>" % self.get_sauce_final_screenshot_url(job_id)
if test_run.error:
html += "<li><a href=\"%s\">Failure screenshot</a></li>" % self.get_sauce_final_screenshot_url(job_id)
html += "</ul></p>"
html += "</ul></p>"
return html
+3 -4
View File
@@ -2,13 +2,12 @@ from typing import Dict
class SingleTestData(object):
def __init__(self, name, testruns, testrail_case_id, geth_paths, grop_name, secured):
def __init__(self, name, testruns, testrail_case_id, geth_paths, grop_name):
self.testrail_case_id = testrail_case_id
self.name = name
self.testruns = testruns
self.geth_paths = geth_paths
self.group_name = grop_name
self.secured = secured
class TestRunData(object):
def __init__(self, steps, jobs, error, first_commands: Dict[str, int], xfail):
@@ -28,11 +27,11 @@ class TestSuiteData(object):
self.current_test = None
self.tests = list()
def set_current_test(self, test_name, testrail_case_id, secured):
def set_current_test(self, test_name, testrail_case_id):
existing_test = next((test for test in self.tests if test.name == test_name), None)
if existing_test:
self.current_test = existing_test
else:
test = SingleTestData(test_name, list(), testrail_case_id, list(), None, secured)
test = SingleTestData(test_name, list(), testrail_case_id, list(), None)
self.tests.append(test)
self.current_test = test
+3 -7
View File
@@ -187,14 +187,10 @@ class TestrailReport(BaseTestReport):
test_steps += step + "\n"
for i, device in enumerate(last_testrun.jobs):
if last_testrun.first_commands:
first_command = last_testrun.first_commands[device]
devices += "# [Device %d](%s) \n" % (
i + 1, self.get_sauce_job_url(job_id=device, first_command=last_testrun.first_commands[device]))
else:
first_command = 0
try:
devices += "# [Device %d](%s) \n" % (i + 1, self.get_sauce_job_url(job_id=device,
first_command=first_command))
except KeyError:
devices += "# Device %s: SauceLabs session was not found \n" % (i + 1)
devices += "# [Device %d](%s) \n" % (i + 1, self.get_sauce_job_url(job_id=device))
comment = str()
if test.group_name:
comment += "# Class: %s \n" % test.group_name
+2 -6
View File
@@ -338,8 +338,6 @@ def pytest_runtest_makereport(item, call):
error = error.replace(re.findall(failure_pattern, report.longreprtext)[0], '')
return error
secured_test = "secured" in item.keywords._markers or "secured" in item.parent.keywords._markers
if report.when == 'setup':
is_group = "xdist_group" in item.keywords._markers or "xdist_group" in item.parent.keywords._markers
error_intro, error = 'Test setup failed:', ''
@@ -347,8 +345,7 @@ def pytest_runtest_makereport(item, call):
if (hasattr(report, 'wasxfail') and not case_ids_set) or (hasattr(report, 'wasxfail') and (
str([mark.args[0] for mark in item.iter_markers(name='testrail_id')][0]) in str(case_ids_set))):
if '[NOTRUN]' in report.wasxfail:
test_suite_data.set_current_test(test_name=item.name, testrail_case_id=get_testrail_case_id(item),
secured=secured_test)
test_suite_data.set_current_test(item.name, testrail_case_id=get_testrail_case_id(item))
test_suite_data.current_test.create_new_testrun()
if is_group:
test_suite_data.current_test.group_name = item.instance.__class__.__name__
@@ -432,8 +429,7 @@ def pytest_runtest_setup(item):
if run_testrail_ids:
if str(testrail_id) not in list(run_testrail_ids.split(",")):
pytest.skip("test requires testrail case id %s" % testrail_id)
secured = bool([mark for mark in item.iter_markers(name='secured')])
test_suite_data.set_current_test(test_name=item.name, testrail_case_id=get_testrail_case_id(item), secured=secured)
test_suite_data.set_current_test(item.name, testrail_case_id=get_testrail_case_id(item))
test_suite_data.current_test.create_new_testrun()
@@ -13,7 +13,6 @@ from views.sign_in_view import SignInView
@pytest.mark.xdist_group(name="new_four_2")
@marks.new_ui_critical
@marks.secured
class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
def prepare_devices(self):
-1
View File
@@ -12,4 +12,3 @@ flaky = pytest.mark.flaky
upgrade = pytest.mark.upgrade
skip = pytest.mark.skip
xfail = pytest.mark.xfail
secured = pytest.mark.secured
+5 -7
View File
@@ -2576,10 +2576,9 @@
dependencies:
merge-options "^3.0.4"
"@react-native-camera-roll/camera-roll@7.5.2":
version "7.5.2"
resolved "https://registry.yarnpkg.com/@react-native-camera-roll/camera-roll/-/camera-roll-7.5.2.tgz#2b248a835fbb8b53d04fc0c2957adba1474d9c99"
integrity sha512-XiVIrW17EFXrFzqB48q6cQOaYeVnw0iC3tH+Jhl+MAHDYGLJp+ulzxCNNwngaMvnVAA5Q2mUMzRocUiJPy8q0g==
"@react-native-camera-roll/camera-roll@git+https://github.com/status-im/react-native-camera-roll.git#refs/tags/v5.1.1.1":
version "5.10.0"
resolved "git+https://github.com/status-im/react-native-camera-roll.git#174f8c6ad88e5bad9d9bd207f42173e567ec3138"
"@react-native-clipboard/clipboard@1.13.2":
version "1.13.2"
@@ -7934,10 +7933,9 @@ react-native-lottie-splash-screen@^1.0.1:
lottie-ios "3.2.3"
lottie-react-native "^5.1.3"
react-native-mail@6.1.1:
"react-native-mail@git+https://github.com/status-im/react-native-mail.git#refs/tags/v6.1.2-status":
version "6.1.1"
resolved "https://registry.yarnpkg.com/react-native-mail/-/react-native-mail-6.1.1.tgz#f1b1f8034c84d2510a93e4a2a795f0db5a13595e"
integrity sha512-pTs180wwyh7hN/iyTC9SfOX579U4YhDlHOLxi47IGvhPJENqO/QFdBq+wWKxyhNqdQuVSy+LoeIxLreWnIeYmg==
resolved "git+https://github.com/status-im/react-native-mail.git#6d28780dfe156dfed87d8a4ceba520cc7db019c5"
react-native-navigation@7.38.3:
version "7.38.3"