enable stickers in e2e builds and added accessibility labels
Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
parent
3774a0845a
commit
43ac92b9b0
2
.env.e2e
2
.env.e2e
|
@ -14,6 +14,6 @@ PFS_TOGGLE_VISIBLE=1
|
|||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
RN_BRIDGE_THRESHOLD_WARNINGS=0
|
||||
STICKERS_ENABLED=0
|
||||
STICKERS_ENABLED=1
|
||||
PARTITIONED_TOPIC=0
|
||||
CONTRACT_NODES=1
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
[react/touchable-highlight
|
||||
{:on-press (fn [_]
|
||||
(re-frame/dispatch [:chat.ui/set-chat-ui-props {:show-stickers? (not show-stickers?)}])
|
||||
(js/setTimeout #(react/dismiss-keyboard!) 100))}
|
||||
(js/setTimeout #(react/dismiss-keyboard!) 100))
|
||||
:accessibility-label :show-stickers-icon}
|
||||
[vector-icons/icon :main-icons/stickers {:container-style {:margin 14 :margin-right 6}
|
||||
:color (if show-stickers? colors/blue colors/gray)}]])
|
||||
|
||||
|
@ -43,7 +44,9 @@
|
|||
^{:key uri}
|
||||
[react/touchable-highlight {:style {:height 75 :width 75 :margin 5}
|
||||
:on-press #(re-frame/dispatch [:chat/send-sticker sticker])}
|
||||
[react/image {:style {:resize-mode :cover :width "100%" :height "100%"} :source {:uri uri}}]])]]])
|
||||
[react/image {:style {:resize-mode :cover :width "100%" :height "100%"}
|
||||
:accessibility-label :sticker-icon
|
||||
:source {:uri uri}}]])]]])
|
||||
|
||||
(defview recent-stickers-panel [window-width]
|
||||
(letsubs [stickers [:stickers/recent]]
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
(if pending
|
||||
[components/activity-indicator {:animating true
|
||||
:color colors/white}]
|
||||
[react/text {:style {:color colors/white}}
|
||||
[react/text {:style {:color colors/white}
|
||||
:accessibility-label :sticker-pack-price}
|
||||
(cond (or owned (zero? price))
|
||||
(i18n/label :t/install)
|
||||
:else
|
||||
|
@ -52,8 +53,9 @@
|
|||
[react/view {:height 64 :align-items :center :flex-direction :row}
|
||||
[thumbnail-icon thumbnail 40]
|
||||
[react/view {:padding-horizontal 16 :flex 1}
|
||||
[react/text name]
|
||||
[react/text {:style {:color colors/gray :margin-top 6}} author]]
|
||||
[react/text {:accessibility-label :sticker-pack-name} name]
|
||||
[react/text {:style {:color colors/gray :margin-top 6}
|
||||
:accessibility-label :sticker-pack-author} author]]
|
||||
(if installed
|
||||
[installed-icon]
|
||||
[price-badge price id owned pending])]]])
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import pytest
|
||||
import random
|
||||
import time
|
||||
import string
|
||||
import emoji
|
||||
from support.api.network_api import NetworkApi
|
||||
from datetime import datetime
|
||||
from selenium.common.exceptions import TimeoutException
|
||||
from tests import marks, get_current_time
|
||||
|
@ -636,3 +638,59 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
|
|||
self.errors.append('Wrong fiat value while requesting assets from wallet with user selected currency.')
|
||||
|
||||
self.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(5782)
|
||||
@marks.high
|
||||
def test_install_pack_and_send_sticker(self):
|
||||
user = transaction_recipients['J']
|
||||
sign_in = SignInView(self.driver)
|
||||
home = sign_in.recover_access(user['passphrase'])
|
||||
home.join_public_chat(home.get_public_chat_name())
|
||||
chat = sign_in.get_chat_view()
|
||||
chat.show_stickers_button.click()
|
||||
chat.get_stickers.click()
|
||||
chat.element_by_text('Install').click()
|
||||
transaction_view = chat.get_send_transaction_view()
|
||||
transaction_view.back_button.click()
|
||||
time.sleep(2)
|
||||
chat.swipe_left()
|
||||
chat.sticker_icon.click()
|
||||
chat.chat_item.is_element_displayed()
|
||||
|
||||
@marks.testrail_id(5783)
|
||||
@marks.high
|
||||
def test_purchase_pack_and_send_sticker(self):
|
||||
sign_in_view = SignInView(self.driver)
|
||||
home_view = sign_in_view.create_user()
|
||||
|
||||
status_test_dapp = home_view.open_status_test_dapp()
|
||||
status_test_dapp.assets_button.click()
|
||||
status_test_dapp.request_eth_button.click()
|
||||
status_test_dapp.element_by_text('Faucet request recieved').wait_for_visibility_of_element()
|
||||
status_test_dapp.ok_button.click()
|
||||
status_test_dapp.cross_icon.click()
|
||||
|
||||
wallet_view = sign_in_view.wallet_button.click()
|
||||
wallet_view.set_up_wallet()
|
||||
wallet_view.wait_balance_changed_on_wallet_screen()
|
||||
wallet_view.get_back_to_home_view()
|
||||
|
||||
transaction_view = status_test_dapp.request_stt_button.click()
|
||||
wallet_view.done_button.click()
|
||||
wallet_view.yes_button.click()
|
||||
transaction_view.sign_transaction()
|
||||
|
||||
transaction_view.get_back_to_home()
|
||||
home_view.join_public_chat(home_view.get_public_chat_name())
|
||||
|
||||
chat = sign_in_view.get_chat_view()
|
||||
chat.show_stickers_button.click()
|
||||
chat.get_stickers.click()
|
||||
chat.element_by_accessibility_id('sticker-pack-price').find_elements()[0].click()
|
||||
chat.element_by_text('Install').wait_for_element(120).click()
|
||||
|
||||
transaction_view.back_button.click()
|
||||
time.sleep(2)
|
||||
chat.swipe_left()
|
||||
chat.sticker_icon.click()
|
||||
chat.chat_item.is_element_displayed()
|
||||
|
|
|
@ -303,3 +303,10 @@ transaction_recipients['I']['address'] = "0x4e6c60f344b13d730682f0a6d8ae1255c75e
|
|||
transaction_recipients['I']['public_key'] = "0x049d6fe0c874d11ddd92f72ac75659703a7b58211b934fc22f0c7eae835b71651c8" \
|
||||
"3ae5e4fd688f1c898d39a657ea08a39d05d20a830bbf7eaffb6ccda9bef348f"
|
||||
|
||||
|
||||
transaction_recipients['J'] = dict()
|
||||
transaction_recipients['J']['passphrase'] = "estate add believe wonder riot used brain wing lecture misery order echo"
|
||||
transaction_recipients['J']['username'] = "Powderblue Pertinent Hylaeosaurus"
|
||||
transaction_recipients['J']['address'] = "0xa03a75b7888cac24b35b4d1f5924406f3b491795"
|
||||
transaction_recipients['J']['public_key'] = "0x043f622675f671b171ce136a29c1c5078b7185b38fccd0cc67d19429dbc481b358e" \
|
||||
"e7d3ef534acf263174d6821402bc998bc6baf1791dacf0eb1fc995f6ddb59c8"
|
|
@ -279,7 +279,7 @@ class OpenInStatusButton(BaseButton):
|
|||
|
||||
def click(self):
|
||||
self.wait_for_visibility_of_element()
|
||||
|
||||
|
||||
# 'Open in Status' button already in DOM but need to scroll down so that click action works
|
||||
self.driver.swipe(500, 1000, 500, 100)
|
||||
self.driver.info('Tap on %s' % self.name)
|
||||
|
@ -450,6 +450,9 @@ class BaseView(object):
|
|||
def swipe_down(self):
|
||||
self.driver.swipe(500, 500, 500, 1000)
|
||||
|
||||
def swipe_left(self, y=1700):
|
||||
self.driver.swipe(1000, y, 100, y)
|
||||
|
||||
def get_status_test_dapp_view(self):
|
||||
from views.web_views.status_test_dapp import StatusTestDAppView
|
||||
return StatusTestDAppView(self.driver)
|
||||
|
|
|
@ -181,6 +181,24 @@ class CommandsButton(BaseButton):
|
|||
self.locator = self.Locator.accessibility_id('chat-commands-button')
|
||||
|
||||
|
||||
class ShowStickersButton(BaseButton):
|
||||
def __init__(self, driver):
|
||||
super(ShowStickersButton, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('show-stickers-icon')
|
||||
|
||||
|
||||
class GetStickers(BaseButton):
|
||||
def __init__(self, driver):
|
||||
super(GetStickers, self).__init__(driver)
|
||||
self.locator = self.Locator.xpath_selector('//*[contains(@text, "Get Stickers")]')
|
||||
|
||||
|
||||
class StickerIcon(BaseButton):
|
||||
def __init__(self, driver):
|
||||
super(StickerIcon, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('sticker-icon')
|
||||
|
||||
|
||||
class ViewProfileButton(BaseButton):
|
||||
def __init__(self, driver):
|
||||
super(ViewProfileButton, self).__init__(driver)
|
||||
|
@ -346,6 +364,10 @@ class ChatView(BaseView):
|
|||
self.send_command = SendCommand(self.driver)
|
||||
self.request_command = RequestCommand(self.driver)
|
||||
|
||||
self.show_stickers_button = ShowStickersButton(self.driver)
|
||||
self.get_stickers = GetStickers(self.driver)
|
||||
self.sticker_icon = StickerIcon(self.driver)
|
||||
|
||||
self.chat_options = ChatMenuButton(self.driver)
|
||||
self.members_button = MembersButton(self.driver)
|
||||
self.delete_chat_button = DeleteChatButton(self.driver)
|
||||
|
|
Loading…
Reference in New Issue