From 95a86616a22cb53c405a0735aaf970191a9ff57f Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Mon, 12 Jul 2021 15:10:17 +0530 Subject: [PATCH] Fixed msg composer UI/Fixed import error in buildozer spec file --- kivy-requirements.txt | 2 +- src/bitmessagekivy/baseclass/msg_composer.py | 3 +- src/bitmessagekivy/kv/common_widgets.kv | 1 + src/bitmessagekivy/kv/msg_composer.kv | 62 ++++++++++++++----- src/bitmessagekivy/kv/network.kv | 14 +++++ src/bitmessagekivy/kv/popup.kv | 4 +- src/bitmessagekivy/tests/test_addressbook.py | 9 +-- .../tests/test_allmail_message.py | 2 +- .../tests/test_draft_message.py | 5 +- .../tests/test_myaddress_screen.py | 35 ++++++++++- .../tests/test_network_screen.py | 4 +- .../tests/test_payment_subscription.py | 4 +- src/bitmessagekivy/tests/test_sent_message.py | 10 +-- .../tests/test_setting_screen.py | 2 +- .../tests/test_trash_message.py | 35 ++++++----- src/buildozer.spec | 5 +- 16 files changed, 143 insertions(+), 54 deletions(-) diff --git a/kivy-requirements.txt b/kivy-requirements.txt index 632404a5..8f9cffe5 100644 --- a/kivy-requirements.txt +++ b/kivy-requirements.txt @@ -16,7 +16,7 @@ kivy-garden.qrcode==2021.314 Mako==1.1.4 MarkupSafe==1.1.1 more-itertools==8.7.0 -numpy==1.20.1 +numpy opencv-python==4.5.1.48 Pillow==8.1.2 portend==2.7.1 diff --git a/src/bitmessagekivy/baseclass/msg_composer.py b/src/bitmessagekivy/baseclass/msg_composer.py index 6ad1cef6..18e06999 100644 --- a/src/bitmessagekivy/baseclass/msg_composer.py +++ b/src/bitmessagekivy/baseclass/msg_composer.py @@ -31,6 +31,7 @@ from addresses import decodeAddress, addBMIfNotPresent from bitmessagekivy.baseclass.common import ( toast, showLimitedCnt ) +from kivymd.uix.textfield import MDTextField class Create(Screen): @@ -238,7 +239,7 @@ class DropDownWidget(BoxLayout): toast(text_item) -class MyTextInput(TextInput): +class MyTextInput(MDTextField): """MyTextInput class for kivy Ui""" txt_input = ObjectProperty() diff --git a/src/bitmessagekivy/kv/common_widgets.kv b/src/bitmessagekivy/kv/common_widgets.kv index d69e648c..792fef1e 100644 --- a/src/bitmessagekivy/kv/common_widgets.kv +++ b/src/bitmessagekivy/kv/common_widgets.kv @@ -44,6 +44,7 @@ on_press: app.clear_composer() + : size_hint: None, None size: dp(36), dp(48) diff --git a/src/bitmessagekivy/kv/msg_composer.kv b/src/bitmessagekivy/kv/msg_composer.kv index 558f6d0c..917feb01 100644 --- a/src/bitmessagekivy/kv/msg_composer.kv +++ b/src/bitmessagekivy/kv/msg_composer.kv @@ -9,24 +9,29 @@ BoxLayout: orientation: 'vertical' size_hint_y: None - height: self.minimum_height + 3 * self.parent.height/4 + height: self.minimum_height + 3 * self.parent.height/5 padding: dp(20) spacing: 15 BoxLayout: orientation: 'vertical' - MyMDTextField: + MDTextField: id: ti - hint_text: 'type or select sender address' size_hint_y: None - height: 100 - font_size: dp(15) + hint_text: 'Type or Select sender address' + icon_right: 'account' + icon_right_color: app.theme_cls.primary_light + font_size: '15sp' multiline: False required: True + # height: self.parent.height/2 + height: 100 + current_hint_text_color: 0,0,0,0.5 helper_text_mode: "on_error" canvas.before: Color: rgba: (0,0,0,1) + BoxLayout: size_hint_y: None height: dp(40) @@ -44,7 +49,8 @@ font_size: '13.5sp' ArrowImg: - BoxLayout: + + RelativeLayout: orientation: 'horizontal' BoxLayout: orientation: 'vertical' @@ -55,13 +61,23 @@ id: txt_input size_hint_y: None font_size: '15sp' - height: self.parent.height/2 - hint_text: app.tr._('type, select or scan QR code for recipients address') + color: color_font + required: True + # height: self.parent.height/2 + current_hint_text_color: 0,0,0,0.5 + height: 100 + hint_text: app.tr._('Type or Scan QR code for recipients address') + helper_text_mode: "on_focus" + + canvas.before: + Color: + rgba: (0,0,0,1) + RV: id: rv MDIconButton: icon: 'qrcode-scan' - pos_hint: {'center_x': 0, 'center_y': .8} + pos_hint: {'center_x': 0.95, 'y': 0.6} on_release: if root.is_camara_attached(): app.root.ids.scr_mngr.current = 'scanscreen' else: root.camera_alert() @@ -70,13 +86,17 @@ MyMDTextField: id: subject - hint_text: 'subject' - required: True + hint_text: 'Subject' height: 100 font_size: '15sp' + icon_right: 'text-subject' + icon_right_color: app.theme_cls.primary_light + current_hint_text_color: 0,0,0,0.5 + font_color_normal: 0, 0, 0, 1 size_hint_y: None + required: True multiline: False - helper_text_mode: "on_error" + helper_text_mode: "on_focus" canvas.before: Color: rgba: (0,0,0,1) @@ -94,12 +114,20 @@ # rgba: (0,0,0,1) ScrollView: id: scrlv - TextInput: + MDTextField: id: body - # text: 'srggdfsfhgfg' - hint_text: 'body' - size_hint: 1, None + hint_text: 'Body' + mode: "fill" + fill_color: 1/255, 144/255, 254/255, 0.1 + multiline: True + font_color_normal: 0, 0, 0, .4 + icon_right: 'grease-pencil' + icon_right_color: app.theme_cls.primary_light + size_hint: 1, 1 height: app.window_size[1]/4 + canvas.before: + Color: + rgba: 125/255, 125/255, 125/255, 1 BoxLayout: spacing:50 @@ -124,7 +152,7 @@ rgba: 0,0,0,.2 Line: - rectangle: self.x +1 , self.y, self.width - 2, self.height -2 + rectangle: self.x +1 , self.y, self.width - 2, self.height -2 bar_width: 10 scroll_type:['bars'] viewclass: 'SelectableLabel' diff --git a/src/bitmessagekivy/kv/network.kv b/src/bitmessagekivy/kv/network.kv index b26203c6..b77dea26 100644 --- a/src/bitmessagekivy/kv/network.kv +++ b/src/bitmessagekivy/kv/network.kv @@ -14,11 +14,13 @@ height: dp(200) OneLineListItem: text: app.tr._("Total Connections") + _no_ripple_effect: True BoxLayout: orientation: 'vertical' size_hint_y: None height: dp(58) MDRaisedButton: + _no_ripple_effect: True # size_hint: .6, 0 # height: dp(40) text: app.tr._(root.text_variable_1) @@ -41,11 +43,14 @@ height: dp(500) OneLineListItem: text: app.tr._("person-to-person") + _no_ripple_effect: True + BoxLayout: orientation: 'vertical' size_hint_y: None height: dp(58) MDRaisedButton: + _no_ripple_effect: True # size_hint: .6, 0 # height: dp(40) text: app.tr._(root.text_variable_2) @@ -60,11 +65,14 @@ # halign: 'center' OneLineListItem: text: app.tr._("Brodcast") + _no_ripple_effect: True + BoxLayout: orientation: 'vertical' size_hint_y: None height: dp(58) MDRaisedButton: + _no_ripple_effect: True # size_hint: .6, 0 # height: dp(40) text: app.tr._(root.text_variable_3) @@ -79,11 +87,14 @@ # halign: 'center' OneLineListItem: text: app.tr._("publickeys") + _no_ripple_effect: True + BoxLayout: orientation: 'vertical' size_hint_y: None height: dp(58) MDRaisedButton: + _no_ripple_effect: True # size_hint: .6, 0 # height: dp(40) text: app.tr._(root.text_variable_4) @@ -98,11 +109,14 @@ # halign: 'center' OneLineListItem: text: app.tr._("objects") + _no_ripple_effect: True + BoxLayout: orientation: 'vertical' size_hint_y: None height: dp(58) MDRaisedButton: + _no_ripple_effect: True # size_hint: .6, 0 #height: dp(40) text: app.tr._(root.text_variable_5) diff --git a/src/bitmessagekivy/kv/popup.kv b/src/bitmessagekivy/kv/popup.kv index 2e97b5fe..5abaae1e 100644 --- a/src/bitmessagekivy/kv/popup.kv +++ b/src/bitmessagekivy/kv/popup.kv @@ -95,8 +95,10 @@ : id: myadd_popup size_hint_y: None + height: "130dp" spacing:dp(25) - # height: dp(1.2*(myaddr_label.height)) + + #height: dp(1.5*(myaddr_label.height)) orientation: 'vertical' MDLabel: id: myaddr_label diff --git a/src/bitmessagekivy/tests/test_addressbook.py b/src/bitmessagekivy/tests/test_addressbook.py index a62fd4f7..e0873ae0 100644 --- a/src/bitmessagekivy/tests/test_addressbook.py +++ b/src/bitmessagekivy/tests/test_addressbook.py @@ -14,7 +14,7 @@ class AddressBook(TeleniumTestProcess): def test_save_address(self): """Save Address On Address Book Screen/Window""" print("=====================Test -Save Address In Address Book=====================") - self.cli.sleep(6) + self.cli.sleep(12) self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]') self.cli.sleep(4) self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1) @@ -84,8 +84,9 @@ class AddressBook(TeleniumTestProcess): self.cli.sleep(3) self.cli.click_on( '//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]') - self.cli.sleep(2) - self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]') + self.cli.sleep(5) + # self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]') + self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/RelativeLayout[0]/BoxLayout[0]/MyTextInput') self.cli.sleep(3) self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Second') self.cli.sleep(3) @@ -93,7 +94,7 @@ class AddressBook(TeleniumTestProcess): for char in "Hey This is Message From Address Book": random_label += char self.cli.setattr( - '//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', 'text', random_label) + '//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]', 'text', random_label) self.cli.sleep(0.2) self.cli.click_on('//MDActionTopAppBarButton[2]') self.cli.sleep(4) diff --git a/src/bitmessagekivy/tests/test_allmail_message.py b/src/bitmessagekivy/tests/test_allmail_message.py index 9e0f4371..d7d1d12f 100644 --- a/src/bitmessagekivy/tests/test_allmail_message.py +++ b/src/bitmessagekivy/tests/test_allmail_message.py @@ -9,7 +9,7 @@ class AllMailMessage(TeleniumTestProcess): def test_show_allmail_list(self): """Show All Messages on Mail Screen/Window""" print("=====================Test -Show Messages Of Mail Screen=====================") - self.cli.sleep(5) + self.cli.sleep(10) self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]') self.cli.sleep(4) self.cli.click_on('//NavigationItem[5]') diff --git a/src/bitmessagekivy/tests/test_draft_message.py b/src/bitmessagekivy/tests/test_draft_message.py index 3de659e3..a892e89c 100644 --- a/src/bitmessagekivy/tests/test_draft_message.py +++ b/src/bitmessagekivy/tests/test_draft_message.py @@ -46,9 +46,10 @@ class DraftMessage(TeleniumTestProcess): self.cli.click_on('//MyTextInput[0]') self.cli.sleep(3) # ADD FROM MESSAGE - self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]', + self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/RelativeLayout[0]/BoxLayout[0]/MyTextInput', "text", 'BM-2cSsuH1bUWBski8bvdqnK2DivMqQCeQA1J') self.cli.sleep(4) + # Add SUBJECT random_label = "" for char in "Another Draft message": random_label += char @@ -83,7 +84,7 @@ class DraftMessage(TeleniumTestProcess): random_label = "" for char in "Hey,This is draft Message Body": random_label += char - self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', + self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]', 'text', random_label) self.cli.sleep(0.2) self.cli.sleep(3) diff --git a/src/bitmessagekivy/tests/test_myaddress_screen.py b/src/bitmessagekivy/tests/test_myaddress_screen.py index 4019ca98..e670fff8 100644 --- a/src/bitmessagekivy/tests/test_myaddress_screen.py +++ b/src/bitmessagekivy/tests/test_myaddress_screen.py @@ -14,7 +14,7 @@ class MyAddressScreen(TeleniumTestProcess): def test_select_myaddress_list(self): """Select Address From List of Address""" print("=====================Test -Select Address From List of Address=====================") - self.cli.sleep(4) + self.cli.sleep(12) self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]') self.cli.sleep(3) self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1) @@ -39,6 +39,7 @@ class MyAddressScreen(TeleniumTestProcess): self.cli.sleep(3) self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=2) + @ordered def test_send_message_from(self): """Send Message From Send Message From Button""" @@ -52,7 +53,7 @@ class MyAddressScreen(TeleniumTestProcess): self.assertExists("//Create[@name~=\"create\"]", timeout=2) self.cli.sleep(3) self.cli.setattr( - '//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput', "text", data[1]) + '//DropDownWidget/ScrollView[0]/BoxLayout[0]/RelativeLayout[0]/BoxLayout[0]/MyTextInput', "text", data[1]) self.cli.sleep(3) self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Hey') self.cli.sleep(3) @@ -60,10 +61,38 @@ class MyAddressScreen(TeleniumTestProcess): for char in "Hey,i am sending message directly from MyAddress book": random_label += char self.cli.setattr( - '//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', 'text', random_label) + '//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]', 'text', random_label) self.cli.sleep(0.2) self.cli.sleep(2) self.cli.click_on('//MDActionTopAppBarButton[2]') self.cli.sleep(4) self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=2) + @ordered + def test_disable_address(self): + """Disable Addresses""" + self.cli.sleep(5) + self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]') + self.cli.sleep(3) + self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1) + self.cli.sleep(3) + self.cli.click_on('//NavigationItem[11]') + self.cli.sleep(3) + # ADDRESS DISABLED + self.cli.click_on('//Thumb') + self.cli.sleep(3) + # CLICK ON DISABLE ACCOUNT TO OPEN POPUP + self.cli.click_on('//MyAddress/BoxLayout[0]/FloatLayout[0]/MDScrollViewRefreshLayout[0]/MDList[0]/CustomTwoLineAvatarIconListItem[0]') + self.cli.sleep(3) + self.cli.click_on('//MDFlatButton[@text=\"ok\"]') + self.cli.sleep(3) + self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]') + self.cli.sleep(3) + # ADDRESS ENABLED + self.cli.click_on('//Thumb') + self.cli.sleep(3) + self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=5) + + + + diff --git a/src/bitmessagekivy/tests/test_network_screen.py b/src/bitmessagekivy/tests/test_network_screen.py index 476ad161..a44870a2 100644 --- a/src/bitmessagekivy/tests/test_network_screen.py +++ b/src/bitmessagekivy/tests/test_network_screen.py @@ -6,8 +6,8 @@ class NetwrokStatusScreen(TeleniumTestProcess): def test_network_status(self): """Show NetwrokStatus""" - print("=====================Test -Show NetwrokStatus=====================") - self.cli.sleep(4) + print("=====================Test -Show Network Status=====================") + self.cli.sleep(10) self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]') self.cli.sleep(3) self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1) diff --git a/src/bitmessagekivy/tests/test_payment_subscription.py b/src/bitmessagekivy/tests/test_payment_subscription.py index 36a88bef..b3790799 100644 --- a/src/bitmessagekivy/tests/test_payment_subscription.py +++ b/src/bitmessagekivy/tests/test_payment_subscription.py @@ -6,8 +6,8 @@ class PaymentScreen(TeleniumTestProcess): def test_select_subscripton(self): """Select Subscripton From List of Subscriptons""" - print("=====================Test -Select Subscripton From List of Subscriptons=====================") - self.cli.sleep(4) + print("=====================Test -Select Subscription From List of Subscription=====================") + self.cli.sleep(10) self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]') self.cli.sleep(3) self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1) diff --git a/src/bitmessagekivy/tests/test_sent_message.py b/src/bitmessagekivy/tests/test_sent_message.py index a4227ea1..3bb1b314 100644 --- a/src/bitmessagekivy/tests/test_sent_message.py +++ b/src/bitmessagekivy/tests/test_sent_message.py @@ -27,7 +27,7 @@ class SendMessage(TeleniumTestProcess): self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]') self.assertExists("//Create[@name~=\"create\"]", timeout=2) self.cli.sleep(3) - self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/MyMDTextField[0]') + self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/MDTextField') self.cli.sleep(3) self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/MyTextInput[0]') self.cli.sleep(3) @@ -49,15 +49,17 @@ class SendMessage(TeleniumTestProcess): self.cli.sleep(3) self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]') self.cli.sleep(2) + # ADD SUBJECT self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'heyyyyyy') self.cli.sleep(3) - self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]') + self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]') self.cli.sleep(4) + # ADD BODY random_label = "" for char in "how are you this is message body": random_label += char self.cli.setattr( - '//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', 'text', random_label) + '//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]', 'text', random_label) self.cli.sleep(0.2) self.cli.sleep(3) self.cli.click_on('//MDActionTopAppBarButton[2]') @@ -65,7 +67,7 @@ class SendMessage(TeleniumTestProcess): self.cli.click_on('//MDFlatButton[0]') self.cli.sleep(6) self.cli.setattr( - '//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]', "text", data[0]) + '//DropDownWidget/ScrollView[0]/BoxLayout[0]/RelativeLayout[0]/BoxLayout[0]/MyTextInput[0]', "text", data[0]) self.cli.sleep(3) self.cli.click_on('//MDActionTopAppBarButton[2]') self.cli.sleep(3) diff --git a/src/bitmessagekivy/tests/test_setting_screen.py b/src/bitmessagekivy/tests/test_setting_screen.py index 0ee029b6..b3a25dbb 100644 --- a/src/bitmessagekivy/tests/test_setting_screen.py +++ b/src/bitmessagekivy/tests/test_setting_screen.py @@ -7,7 +7,7 @@ class SettingScreen(TeleniumTestProcess): def test_setting_screen(self): """Show Setting Screen""" print("=====================Test -Show Setting Screen=====================") - self.cli.sleep(3) + self.cli.sleep(10) # self.cli.wait_click("//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]", timeout=20) self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]') self.cli.sleep(3) diff --git a/src/bitmessagekivy/tests/test_trash_message.py b/src/bitmessagekivy/tests/test_trash_message.py index f7021330..52d35432 100644 --- a/src/bitmessagekivy/tests/test_trash_message.py +++ b/src/bitmessagekivy/tests/test_trash_message.py @@ -1,27 +1,34 @@ +from datetime import datetime +from os import wait +from socket import timeout +from time import sleep + +from telenium.mods.telenium_client import selectFirst, kivythread, TeleniumMotionEvent, nextid, telenium_input, run_telenium + from .telenium_process import TeleniumTestProcess class TrashMessage(TeleniumTestProcess): + + def smart_click(self, click_on, sleep): + click_on = self.cli.click_on(click_on) + sleep = self.cli.sleep(sleep) + """Trash Screen Functionality Testing""" def test_delete_trash_message(self): """Delete Trash message permanently from trash message listing""" - print("=====================Test -Delete Message From Trash Message Listing=====================") - self.cli.sleep(4) - self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]') - self.cli.sleep(4) - self.cli.click_on('//NavigationItem[4]') + self.cli.sleep(12) + self.smart_click('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]', 3) + self.smart_click('//NavigationItem[4]', 3) self.assertExists("//Trash[@name~=\"trash\"]", timeout=2) - self.cli.sleep(4) self.cli.drag( '//MDList[0]/CutsomSwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[1]', - '//MDList[0]/CutsomSwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]', 1) - self.cli.click_on('//MDList[0]/CutsomSwipeToDeleteItem[0]') - self.cli.sleep(4) - self.cli.click_on('//MDList[0]/CutsomSwipeToDeleteItem[0]//MDIconButton[0]') - self.cli.sleep(2) - self.cli.click_on('//MDDialog/MDCard[0]/AnchorLayout[0]/MDBoxLayout[0]/MDFlatButton[0]') - # self.cli.click_on('//MDDialog/DialogFakeCard[0]/AnchorLayout[0]/MDBoxLayout[0]/MDFlatButton[0]') - self.cli.sleep(2) + '//MDList[0]/CutsomSwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]',1) + self.cli.sleep(5) + self.smart_click('//MDList[0]/CutsomSwipeToDeleteItem[0]', 3) + self.smart_click('//MDList[0]/CutsomSwipeToDeleteItem[0]//MDIconButton[0]', 3) + self.smart_click('//MDDialog/MDCard[0]/AnchorLayout[0]/MDBoxLayout[0]/MDFlatButton[0]', 3) + self.smart_click('//MDDialog/DialogFakeCard[0]/AnchorLayout[0]/MDBoxLayout[0]/MDFlatButton[0]', 3) total_trash_msgs = len(self.cli.select("//CutsomSwipeToDeleteItem")) self.assertEqual(total_trash_msgs, 1) diff --git a/src/buildozer.spec b/src/buildozer.spec index 797915ad..5e29b52d 100644 --- a/src/buildozer.spec +++ b/src/buildozer.spec @@ -49,7 +49,9 @@ requirements = pyzbar, bitmsghash, git+https://github.com/kivymd/KivyMD#egg=kivymd, + kivy_garden.qrcode, qrcode, + kivy_garden, msgpack # (str) Custom source folders for requirements @@ -57,7 +59,8 @@ requirements = # requirements.source.kivy = ../../kivy # (list) Garden requirements -garden_requirements = qrcode +#requirements = kivy_garden.qrcode +#garden_requirements = qrcode # (str) Presplash of the application #presplash.filename = %(source.dir)s/data/presplash.png