Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(mobile): add second safe #4974

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/mobile/e2e/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# config.yaml
flows:
- happypath/*
63 changes: 63 additions & 0 deletions apps/mobile/e2e/happypath/add-second-safe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
appId: global.safe.mobileapp
---
- launchApp:
appId: 'global.safe.mobileapp'
clearState: true
clearKeychain: true
- runFlow:
when:
visible:
text: 'http.*'
commands:
- tapOn: 'http.*'
- runFlow:
when:
visible: 'Continue'
commands:
- tapOn: 'Continue'
- runFlow:
when:
visible: 'Reload'
commands:
- tapOn: 'Reload'
- tapOn:
id: 'e2eOnboardedAccount'
- tapOn:
id: 'opt-in-secondary-button'
- tapOn:
id: 'dropdown-label-view'
index: 0
- tapOn:
id: 'add-existing-account'
- tapOn:
id: 'enter-manually'
- assertVisible:
id: 'safe-input'
- tapOn:
id: 'safe-input'
- assertVisible: 'Continue'
- inputText: '0xF2CeA96575d6b10f51d9aF3b10e3e4E5738aa6bd'
- assertVisible: 'No Safe deployment found for this this address'
- 'eraseText'
- inputText: '0x1230B3D59858296A31053C1b8562ECF89A2f888B'
- assertVisible: 'Invalid address format'
- 'eraseText'
- inputText: 'sep:0x9BFCA75a05175503580D593F4330b5505c594596'
- assertVisible: 'Sepolia'
- assertVisible:
id: 'success-icon'
- tapOn:
id: 'continue-button'
- assertVisible: 'Import your signers to unlock account'
- assertVisible: " Before you import signers... Make sure to import signers from\
\ this list only. Others will not be imported."
- assertVisible:
id: 'signer-0x65F8236309e5A99Ff0d129d04E486EBCE20DC7B0'
- assertVisible:
id: 'signer-0x0D65139Da4B36a8A39BF1b63e950038D42231b2e'
- assertVisible:
id: 'signer-0x8aEf2f5c3F17261F6F1C4dA058D022BE92776af8'
- tapOn:
id: 'continue-button'
- assertVisible: '0x9BFC...4596'
- assertVisible: 'Sepolia'
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
appId: global.safe.mobileapp
---
- launchApp:
appId: 'global.safe.mobileapp'
clearState: true
clearKeychain: true
- runFlow:
when:
visible:
text: 'http.*'
commands:
- tapOn: 'http.*'
- runFlow:
when:
visible: 'Continue'
commands:
- tapOn: 'Continue'
- runFlow:
when:
visible: 'Reload'
commands:
- tapOn: 'Reload'
file: ../shared/clean-app-start.yml
- tapOn:
id: 'e2eOnboardedAccount'
- tapOn:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,7 @@
appId: 'global.safe.mobileapp'
---
- launchApp:
appId: 'global.safe.mobileapp'
clearState: true
clearKeychain: true
- runFlow:
when:
visible:
text: 'http.*'
commands:
- tapOn: 'http.*'
- runFlow:
when:
visible: 'Continue'
commands:
- tapOn: 'Continue'
- runFlow:
when:
visible: 'Reload'
commands:
- tapOn: 'Reload'
- tapOn:
id: 'e2eTestOnboarding'
file: ../shared/clean-app-start.yml
- assertVisible:
id: 'carousel-item-0'
- swipe:
Expand Down
26 changes: 26 additions & 0 deletions apps/mobile/e2e/shared/app-start-with-data.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liliya-soroka you've abstracted the clean app start in a separate file. Can't you import it here and just have the tapOn as new steps in the flow?

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
appId: 'global.safe.mobileapp'
---
- launchApp:
appId: 'global.safe.mobileapp'
clearState: true
clearKeychain: true
- runFlow:
when:
visible:
text: 'http.*'
commands:
- tapOn: 'http.*'
- runFlow:
when:
visible: 'Continue'
commands:
- tapOn: 'Continue'
- runFlow:
when:
visible: 'Reload'
commands:
- tapOn: 'Reload'
- tapOn:
id: 'e2eOnboardedAccount'
- tapOn:
id: 'opt-in-secondary-button'
22 changes: 22 additions & 0 deletions apps/mobile/e2e/shared/clean-app-start.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
appId: 'global.safe.mobileapp'
---
- launchApp:
appId: 'global.safe.mobileapp'
clearState: true
clearKeychain: true
- runFlow:
when:
visible:
text: 'http.*'
commands:
- tapOn: 'http.*'
- runFlow:
when:
visible: 'Continue'
commands:
- tapOn: 'Continue'
- runFlow:
when:
visible: 'Reload'
commands:
- tapOn: 'Reload'
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export function SafeBottomSheet<T>({

return (
<BottomSheet
accessible={false}
enableOverDrag={false}
snapPoints={snapPoints}
enableDynamicSizing={true}
Expand All @@ -85,7 +86,10 @@ export function SafeBottomSheet<T>({
footerComponent={footerComponent}
>
{!isSortable && !!title && <TitleHeader />}
<BottomSheetView style={[styles.contentContainer, !isSortable ? { flex: 1, paddingHorizontal: 20 } : undefined]}>
<BottomSheetView
style={[styles.contentContainer, !isSortable ? { flex: 1, paddingHorizontal: 20 } : undefined]}
accessible={true}
>
{isSortable ? (
<DraggableFlatList<T>
data={items}
Expand Down
Loading