Skip to content

Commit

Permalink
Merge branch 'develop' into 16108
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrkhalil authored Jul 16, 2023
2 parents 46ce541 + 1d0186a commit 57728d5
Show file tree
Hide file tree
Showing 14 changed files with 286 additions and 109 deletions.
29 changes: 12 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

[<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" alt="Get it on Google Play" height="80"/>](https://play.google.com/store/apps/details?id=im.status.ethereum)
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" height="80"/>](https://f-droid.org/packages/im.status.ethereum/)
[<img src="doc/github_badge.png" alt="Get it on Github" height="80"/>](https://github.com/status-im/status-mobile/releases)


[Get it on Github](https://github.com/status-im/status-mobile/releases)

Join us in creating a browser, messenger, and gateway to a decentralized world. Status is a free (libre) open source mobile client targeting Android & iOS built entirely on [Ethereum](https://ethereum.org/) technologies. That's right, no middle men and `go-ethereum` running directly on your device.

Expand All @@ -20,41 +22,38 @@ If this interests you, **help us make Status a reality** - anyone can contribute

## How to Contribute?

Go straight to the [docs](https://status.im/docs) or [join our chat](https://join.status.im/chat/public/status) and choose what interests you:
Go straight to the [docs](doc/) and choose what interests you:

- **Developer** Developers are the heart of software and to keep Status beating
we need all the help we can get! If you're looking to code in ClojureScript or
Golang then Status is the project for you! We use React Native and there is even
some Java/Objective-C too! Want to learn more about it? Start by reading our
[Developer Introduction](https://status.im/developer_tools/) which guides you
[Developer Introduction](doc/starting-guide.md) which guides you
through the technology stack and start browsing [beginner
issues](https://github.com/status-im/status-mobile/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20label%3A%22good%20first%20issue%22%20).
Then you can read how to [Build
Status](https://status.im/technical/build_status/), which talks about managing
project dependencies, coding guidelines and testing procedures. The [doc/](doc/)
directory also has valuable information for contributors.
Status](doc/starting-guide.md), which talks about managing
project dependencies, coding guidelines and testing procedures.
Check out our [coding guidelines](doc/new-guidelines.md).

- **Community Management**
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and long lasting relationships you form will be well worth it, check out our [Mission and Community Principles](https://status.im/about)

- **Specification / Documentation**
John Dewey once said "Education is not preparation for life; education is life *itself* ". Developers & Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, head over to our [docs](https://status.im/docs) and see how you can improve what we have.
John Dewey once said "Education is not preparation for life; education is life *itself* ". Developers & Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, check out our [docs](doc/) and see how you can improve what we have.

- **Blog Writing**
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page. [Jump into our chat](https://join.status.im/chat/public/status) and discuss with the team how you can contribute!
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page.

- **Testers**
It's bug hunting season! Status is currently under active development and there is sure to be a bunch of learning, [build status from scratch](https://status.im/technical/build_status/) or if an android user check out our [nightly builds](https://status.im/nightly). You can shake your phone to submit bug reports, or start browsing our [Github Issues](https://github.com/status-im/status-mobile/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!
It's bug hunting season! Status is currently under active development and there is sure to be a bunch of learning, [build status from scratch](doc/starting-guide.md) or if an android user check out our [nightly builds](https://status.im/nightly). You can shake your phone to submit bug reports, or start browsing our [Github Issues](https://github.com/status-im/status-mobile/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!

- **Security**
Status is a visual interface to make permanent changes on the Blockchain, it handles crypto-tokens that have real value and allows 3rd party code execution. Security is paramount to its success. You are given permission to break Status as hard as you can, as long as you share your findings with the community!

- **Evangelism**
Help us spread the word! Tell a friend *right now*, in fact tell **everyone** - yell from a mountain if you have to, every person counts! If you've got a great story to tell or have some interesting way you've spread the word about Status let us know about it in our [chat](https://join.status.im/chat/public/status)

## Status API
View our [API Docs](https://status.im/developer_tools/status_web_api.html) and learn how to integrate your DApp into Status. You can read more about how to add your DApp to Status [here](https://status.im/developer_tools/add_your_dapp.html).

## Give me Binaries!

You can get our Beta builds for both Android and iOS on our [website](https://status.im), through our [nightly builds](https://status.im/nightly/) or by [building it yourself](https://status.im/technical/build_status/).
Expand All @@ -68,12 +67,8 @@ Without the dedication of these outstanding individuals, Status would not exist.

## Contact us

Feel free to email us at [support@status.im](mailto:support@status.im) or better yet, [join our chat](https://join.status.im/chat/public/status).
Feel free to email us at [support@status.im](mailto:support@status.im).

## License

Licensed under the [Mozilla Public License v2.0](https://github.com/status-im/status-mobile/blob/develop/LICENSE.md)

## Testing Supported by

[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=SFBWQ3k5R2tnT2t6UGsxU1h1U0g3VFlCNnoxVTRHYWNoTDhsb1laaTJZWT0tLUZMUm5sSVFBSU9qSWM1RUJvK1I3Z3c9PQ==--ad15ae7992b432b33743749d40318952415bd98f)](https://www.browserstack.com/automate/public-build/SFBWQ3k5R2tnT2t6UGsxU1h1U0g3VFlCNnoxVTRHYWNoTDhsb1laaTJZWT0tLUZMUm5sSVFBSU9qSWM1RUJvK1I3Z3c9PQ==--ad15ae7992b432b33743749d40318952415bd98f)
4 changes: 3 additions & 1 deletion src/status_im2/constants.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
(def ^:const content-type-gap 10)
(def ^:const content-type-contact-request 11) ;; TODO: temp, will be removed
(def ^:const content-type-system-pinned-message 14)
(def ^:const content-type-system-mutual-state-update 15)
(def ^:const content-type-system-message-mutual-event-sent 15)
(def ^:const content-type-system-message-mutual-event-accepted 16)
(def ^:const content-type-system-message-mutual-event-removed 17)

;; Not implemented in status-go, only used for testing/ui work
(def ^:const content-type-gif 100)
Expand Down
15 changes: 9 additions & 6 deletions src/status_im2/contexts/chat/lightbox/top_view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,15 @@
:style {:color colors/neutral-40}} (when timestamp (datetime/to-short-str timestamp))]]]
[rn/view {:style style/top-right-buttons}
[rn/touchable-opacity
{:active-opacity 1
:on-press #(share-image messages @index)
:style (merge style/close-container {:margin-right 12})}
{:active-opacity 1
:accessibility-label :share-image
:on-press #(share-image messages @index)
:style (merge style/close-container {:margin-right 12})}
[quo/icon :share {:size 20 :color colors/white}]]
[rn/touchable-opacity
{:active-opacity 1
:on-press #(rf/dispatch [:show-bottom-sheet {:content (fn [] [drawer messages @index])}])
:style style/close-container}
{:active-opacity 1
:accessibility-label :image-options
:on-press #(rf/dispatch [:show-bottom-sheet
{:content (fn [] [drawer messages @index])}])
:style style/close-container}
[quo/icon :options {:size 20 :color colors/white}]]]]))
5 changes: 4 additions & 1 deletion src/status_im2/contexts/chat/messages/list/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@
[{:keys [type value content-type] :as message-data} _ _
{:keys [context keyboard-shown?]}]
;;TODO temporary hide mutual-state-updates https://github.com/status-im/status-mobile/issues/16254
(when (not= content-type constants/content-type-system-mutual-state-update)
(when-not (#{constants/content-type-system-message-mutual-event-sent
constants/content-type-system-message-mutual-event-accepted
constants/content-type-system-message-mutual-event-removed}
content-type)
[rn/view
(add-inverted-y-android {:background-color (colors/theme-colors colors/white colors/neutral-95)})
(cond
Expand Down
2 changes: 1 addition & 1 deletion test/appium/tests/base_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def create_shared_drivers(quantity):
test_suite_data.current_test.testruns[-1].error = "Not all %s drivers are created" % quantity
return drivers, loop
except (MaxRetryError, AttributeError) as e:
test_suite_data.current_test.testruns[-1].error += "%s" % e.reason
test_suite_data.current_test.testruns[-1].error += str(e)
raise e


Expand Down
77 changes: 73 additions & 4 deletions test/appium/tests/critical/chats/test_1_1_public_chats.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ def test_1_1_chat_non_latin_messages_stack_update_profile_photo(self):
messages = ['hello', '¿Cómo estás tu año?', 'ё, доброго вечерочка', '® æ ç ♥']
[self.chat_2.send_message(message) for message in messages]
for message in messages:
if not self.chat_1.chat_element_by_text(message).is_element_displayed():
if not self.chat_1.chat_element_by_text(message).is_element_displayed(10):
self.errors.append("Message with text '%s' was not received" % message)

self.chat_2.just_fyi("Checking updated member photo, timestamp and username on message")
Expand Down Expand Up @@ -1206,6 +1206,67 @@ def test_1_1_chat_edit_message(self):
self.errors.append("Message reaction is not shown for the sender")
self.errors.verify_no_errors()

@marks.testrail_id(703391)
def test_1_1_chat_send_image_save_and_share(self):
if not self.chat_2.chat_message_input.is_element_displayed():
self.chat_2.jump_to_card_by_text(self.username_1)
if not self.chat_1.chat_message_input.is_element_displayed():
self.chat_1.jump_to_card_by_text(self.username_2)

self.chat_1.just_fyi("Device 1 sends an image")
image_description = "test image"
self.chat_1.send_images_with_description(description=image_description, indexes=[2])

self.chat_2.just_fyi("Device 2 checks image message")
if not self.chat_2.chat_element_by_text(image_description).is_element_displayed(30):
self.chat_2.hide_keyboard_if_shown()
self.chat_2.chat_element_by_text(image_description).wait_for_visibility_of_element(30)
if not self.chat_2.chat_element_by_text(
image_description).image_in_message.is_element_image_similar_to_template('saucelabs_sauce_chat.png'):
self.errors.append("Not expected image is shown to the receiver.")

for chat in self.chat_1, self.chat_2:
chat.just_fyi("Open the image and share it")
if not chat.chat_element_by_text(image_description).image_in_message.is_element_displayed():
chat.hide_keyboard_if_shown()
chat.chat_element_by_text(image_description).image_in_message.click()
chat.share_image_icon_button.click()
chat.element_starts_with_text("Gmail").click()
try:
chat.wait_for_current_package_to_be('com.google.android.gm')
except TimeoutException:
self.errors.append(
"%s can't share an image via Gmail." % ("Sender" if chat is self.chat_1 else "Receiver"))
chat.click_system_back_button_until_element_is_shown(element="chat")

for chat in self.chat_1, self.chat_2:
chat.just_fyi("Open the image and save it")
device_name = "sender" if chat is self.chat_1 else "receiver"
chat.chat_element_by_text(image_description).image_in_message.click()
chat.view_image_options_button.click()
chat.save_image_icon_button.click()
toast_element = chat.toast_content_element
if toast_element.is_element_displayed():
toast_element_text = toast_element.text
if toast_element_text != chat.get_translation_by_key("photo-saved"):
self.errors.append(
"Shown message '%s' doesn't match expected '%s' after saving an image for %s." % (
toast_element_text, chat.get_translation_by_key("photo-saved"), device_name))
else:
self.errors.append("Message about saving a photo is not shown for %s." % device_name)
chat.click_system_back_button_until_element_is_shown(element="chat")

for chat in self.chat_1, self.chat_2:
chat.just_fyi("Check that image is saved in gallery")
chat.show_images_button.click()
chat.allow_button.click_if_shown()
if not chat.get_image_by_index(0).is_element_image_similar_to_template("saucelabs_sauce_gallery.png"):
self.errors.append(
"Image is not saved to gallery for %s." % ("sender" if chat is self.chat_1 else "receiver"))
chat.click_system_back_button()

self.errors.verify_no_errors()

@marks.testrail_id(702733)
def test_1_1_chat_text_message_delete_push_disappear(self):
if not self.chat_2.chat_message_input.is_element_displayed():
Expand Down Expand Up @@ -1272,7 +1333,11 @@ def test_1_1_chat_is_shown_message_sent_delivered_from_offline(self):
self.chat_2.jump_to_card_by_text(self.username_1)
self.chat_1.jump_to_card_by_text(self.username_2)
self.home_1.just_fyi('Turn on airplane mode and check that offline status is shown on home view')
[home.toggle_airplane_mode() for home in self.homes]
for home in self.homes:
home.toggle_airplane_mode()
if not home.chats_tab.is_element_displayed() and not home.chat_floating_screen.is_element_displayed():
home.driver.launch_app()
SignInView(home.driver).sign_in()

# Not implemented yet
# self.home_1.connection_offline_icon.wait_and_click(20)
Expand All @@ -1285,6 +1350,9 @@ def test_1_1_chat_is_shown_message_sent_delivered_from_offline(self):
message_1 = 'test message'

self.home_2.just_fyi('Device2 checks "Sending" status when sending message from offline')
if not self.chat_2.chat_message_input.is_element_displayed():
self.home_2.chats_tab.click()
self.home_2.get_chat(self.username_1).click()
self.chat_2.send_message(message_1)
status = self.chat_2.chat_element_by_text(message_1).status
if not (status == 'Sending' or status == 'Sent'):
Expand All @@ -1293,8 +1361,9 @@ def test_1_1_chat_is_shown_message_sent_delivered_from_offline(self):
self.home_2.just_fyi('Device2 goes back online and checks that status of the message is changed to "delivered"')
for i, home in enumerate(self.homes):
home.toggle_airplane_mode()
if "im.status.ethereum" not in home.driver.current_activity:
home.click_system_back_button_until_element_is_shown()
if not home.chats_tab.is_element_displayed() and not home.chat_floating_screen.is_element_displayed():
home.driver.launch_app()
SignInView(home.driver).sign_in()
home.chats_tab.click()
home.get_chat(self.username_2 if i == 0 else self.username_1).click()

Expand Down
Loading

0 comments on commit 57728d5

Please sign in to comment.