parent
de2d4f405d
commit
210d5ca2eb
|
@ -27,8 +27,8 @@ def verify_text_matching(objName: str, text: str):
|
||||||
def verify_text_matching_insensitive(obj, text: str):
|
def verify_text_matching_insensitive(obj, text: str):
|
||||||
test.verify(is_text_matching_insensitive(obj, text), "text does not match")
|
test.verify(is_text_matching_insensitive(obj, text), "text does not match")
|
||||||
|
|
||||||
def verify_equal(result: object, expected: object):
|
def verify_equal(result: object, expected: object, msg: str = "objects are not equal"):
|
||||||
test.verify(result == expected, "objects are not equal")
|
test.verify(result == expected, msg)
|
||||||
|
|
||||||
def verify(result: bool, msg: str):
|
def verify(result: bool, msg: str):
|
||||||
test.verify(result, msg)
|
test.verify(result, msg)
|
||||||
|
|
|
@ -16,6 +16,7 @@ class MainWalletScreen(Enum):
|
||||||
SEND_BUTTON_FOOTER: str = "mainWallet_Footer_Send_Button"
|
SEND_BUTTON_FOOTER: str = "mainWallet_Footer_Send_Button"
|
||||||
SAVED_ADDRESSES_BUTTON: str = "mainWallet_Saved_Addresses_Button"
|
SAVED_ADDRESSES_BUTTON: str = "mainWallet_Saved_Addresses_Button"
|
||||||
NETWORK_SELECTOR_BUTTON: str = "mainWallet_Network_Selector_Button"
|
NETWORK_SELECTOR_BUTTON: str = "mainWallet_Network_Selector_Button"
|
||||||
|
RIGHT_SIDE_TABBAR: str = "mainWallet_Right_Side_Tab_Bar"
|
||||||
|
|
||||||
class AssetView(Enum):
|
class AssetView(Enum):
|
||||||
LIST: str = "mainWallet_Assets_View_List"
|
LIST: str = "mainWallet_Assets_View_List"
|
||||||
|
@ -59,6 +60,15 @@ class AddAccountPopup(Enum):
|
||||||
ADD_ACCOUNT_BUTTON: str = "mainWallet_Add_Account_Popup_Footer_Add_Account"
|
ADD_ACCOUNT_BUTTON: str = "mainWallet_Add_Account_Popup_Footer_Add_Account"
|
||||||
SEED_PHRASE_INPUT_TEMPLATE: str = "mainWindow_Add_Account_Popup_Seed_Phrase_"
|
SEED_PHRASE_INPUT_TEMPLATE: str = "mainWindow_Add_Account_Popup_Seed_Phrase_"
|
||||||
|
|
||||||
|
class CollectiblesView(Enum):
|
||||||
|
COLLECTIONS_REPEATER: str = "mainWallet_Collections_Repeater"
|
||||||
|
COLLECTIBLES_REPEATER: str = "mainWallet_Collectibles_Repeater"
|
||||||
|
|
||||||
|
class WalletTabBar(Enum):
|
||||||
|
ASSET_TAB = 0
|
||||||
|
COLLECTION_TAB = 1
|
||||||
|
ACTIVITY_TAB = 2
|
||||||
|
|
||||||
class StatusWalletScreen:
|
class StatusWalletScreen:
|
||||||
|
|
||||||
def accept_signing_phrase(self):
|
def accept_signing_phrase(self):
|
||||||
|
@ -248,3 +258,12 @@ class StatusWalletScreen:
|
||||||
|
|
||||||
def verify_transaction(self):
|
def verify_transaction(self):
|
||||||
print("TODO: fix notification and ensure there is one")
|
print("TODO: fix notification and ensure there is one")
|
||||||
|
|
||||||
|
def verify_collectibles_exist(self, account_name: str):
|
||||||
|
tabbar = get_obj(MainWalletScreen.RIGHT_SIDE_TABBAR.value)
|
||||||
|
click_obj(tabbar.itemAt(WalletTabBar.COLLECTION_TAB.value))
|
||||||
|
collectionsRepeater = get_obj(CollectiblesView.COLLECTIONS_REPEATER.value)
|
||||||
|
if(collectionsRepeater.count > 0):
|
||||||
|
collectionsRepeater.itemAt(0).expanded = True
|
||||||
|
collectiblesRepeater = get_obj(CollectiblesView.COLLECTIBLES_REPEATER.value)
|
||||||
|
verify(collectiblesRepeater.count > 0, "Collectibles not retrieved for the account")
|
||||||
|
|
|
@ -9,6 +9,7 @@ mainWallet_Add_Account = {"container": statusDesktop_mainWindow, "text": "Add ac
|
||||||
signPhrase_Ok_Button = {"container": statusDesktop_mainWindow, "type": "StatusFlatButton", "objectName": "signPhraseModalOkButton", "visible": True}
|
signPhrase_Ok_Button = {"container": statusDesktop_mainWindow, "type": "StatusFlatButton", "objectName": "signPhraseModalOkButton", "visible": True}
|
||||||
mainWallet_Saved_Addresses_Button = {"container": statusDesktop_mainWindow, "objectName": "savedAddressesBtn", "type": "StatusButton"}
|
mainWallet_Saved_Addresses_Button = {"container": statusDesktop_mainWindow, "objectName": "savedAddressesBtn", "type": "StatusButton"}
|
||||||
mainWallet_Network_Selector_Button = {"container": statusDesktop_mainWindow, "objectName": "networkSelectorButton", "type": "StatusListItem"}
|
mainWallet_Network_Selector_Button = {"container": statusDesktop_mainWindow, "objectName": "networkSelectorButton", "type": "StatusListItem"}
|
||||||
|
mainWallet_Right_Side_Tab_Bar = {"container": statusDesktop_mainWindow, "objectName": "rightSideWalletTabBar", "type": "StatusTabBar"}
|
||||||
|
|
||||||
# Assets view:
|
# Assets view:
|
||||||
mainWallet_Assets_View_List = {"container": statusDesktop_mainWindow, "objectName": "assetViewStatusListView", "type": "StatusListView"}
|
mainWallet_Assets_View_List = {"container": statusDesktop_mainWindow, "objectName": "assetViewStatusListView", "type": "StatusListView"}
|
||||||
|
@ -65,3 +66,7 @@ mainWallet_Saved_Addreses_More_Confirm_Delete = {"container": statusDesktop_main
|
||||||
mainWallet_Saved_Addreses_Popup_Name_Input = {"container": statusDesktop_mainWindow, "objectName": "savedAddressNameInput", "type": "TextEdit"}
|
mainWallet_Saved_Addreses_Popup_Name_Input = {"container": statusDesktop_mainWindow, "objectName": "savedAddressNameInput", "type": "TextEdit"}
|
||||||
mainWallet_Saved_Addreses_Popup_Address_Input = {"container": statusDesktop_mainWindow, "objectName": "savedAddressAddressInput", "type": "StyledTextField"}
|
mainWallet_Saved_Addreses_Popup_Address_Input = {"container": statusDesktop_mainWindow, "objectName": "savedAddressAddressInput", "type": "StyledTextField"}
|
||||||
mainWallet_Saved_Addreses_Popup_Address_Add_Button = {"container": statusDesktop_mainWindow, "objectName": "addSavedAddress", "type": "StatusButton"}
|
mainWallet_Saved_Addreses_Popup_Address_Add_Button = {"container": statusDesktop_mainWindow, "objectName": "addSavedAddress", "type": "StatusButton"}
|
||||||
|
|
||||||
|
# Collectibles view
|
||||||
|
mainWallet_Collections_Repeater = {"container": statusDesktop_mainWindow, "objectName": "collectionsRepeater", "type": "Repeater"}
|
||||||
|
mainWallet_Collectibles_Repeater = {"container": statusDesktop_mainWindow, "objectName": "collectiblesRepeater", "type": "Repeater"}
|
||||||
|
|
|
@ -66,3 +66,7 @@ def step(context, name: str):
|
||||||
@Then("the name |any| is not in the list of saved addresses")
|
@Then("the name |any| is not in the list of saved addresses")
|
||||||
def step(context, name: str):
|
def step(context, name: str):
|
||||||
_walletScreen.verify_saved_address_doesnt_exist(name)
|
_walletScreen.verify_saved_address_doesnt_exist(name)
|
||||||
|
|
||||||
|
@Then("the collectibles are listed for the |any|")
|
||||||
|
def step(context, account_name: str):
|
||||||
|
_walletScreen.verify_collectibles_exist(account_name)
|
|
@ -100,3 +100,11 @@ Feature: Status Desktop Wallet
|
||||||
Examples:
|
Examples:
|
||||||
| new_name | new_color |
|
| new_name | new_color |
|
||||||
| Default | #FFCA0F |
|
| Default | #FFCA0F |
|
||||||
|
|
||||||
|
Scenario Outline: Can see collectibles for an account
|
||||||
|
When the user adds watch only account with <account_name> and <address>
|
||||||
|
Then the collectibles are listed for the <account_name>
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
| account_name | address |
|
||||||
|
| YugaLabs | 0xA858DDc0445d8131daC4d1DE01f834ffcbA52Ef1 |
|
||||||
|
|
|
@ -55,6 +55,7 @@ Item {
|
||||||
width: root.width
|
width: root.width
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
objectName: "collectionsRepeater"
|
||||||
id: collectionsRepeater
|
id: collectionsRepeater
|
||||||
model: RootStore.collectionList
|
model: RootStore.collectionList
|
||||||
delegate: StatusExpandableItem {
|
delegate: StatusExpandableItem {
|
||||||
|
|
|
@ -39,6 +39,7 @@ Item {
|
||||||
}
|
}
|
||||||
StatusTabBar {
|
StatusTabBar {
|
||||||
id: walletTabBar
|
id: walletTabBar
|
||||||
|
objectName: "rightSideWalletTabBar"
|
||||||
horizontalPadding: Style.current.padding
|
horizontalPadding: Style.current.padding
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Style.current.padding
|
Layout.topMargin: Style.current.padding
|
||||||
|
|
|
@ -87,6 +87,7 @@ Item {
|
||||||
spacing: 24
|
spacing: 24
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
objectName: "collectiblesRepeater"
|
||||||
model: RootStore.getCollectionCollectiblesList(root.slug)
|
model: RootStore.getCollectionCollectiblesList(root.slug)
|
||||||
StatusRoundedImage {
|
StatusRoundedImage {
|
||||||
id: image
|
id: image
|
||||||
|
|
Loading…
Reference in New Issue