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

MOB-295: Add iOS tooling scripts for UI testings #56

Merged
merged 25 commits into from
Mar 8, 2024
Merged

Conversation

ruixhuang
Copy link
Contributor

@ruixhuang ruixhuang commented Jan 17, 2024

Screenshot testings can be performed via BrowserStack service. In general, we will need to upload the app binary and test suites to BrowserStack, and trigger the build via their API. Tooling scripts have been built to make this easier.

To work with BrowserStack, you will need there user_id and api_key. They can be find in the “percy_test.sh” script in [1password](https://dydxprotocol.1password.com/)’s BrowserStack API Info vault

The easiest way to trigger the screenshot testing is to run the related Bitrise workflow:

[iOS Build Workflow](https://app.bitrise.io/app/8928e527-e209-449a-95e7-5705b5370333/workflow_editor#!/workflows?workflow_id=percy_screenshot_tests)

This PR contains the tooling scripts for iOS:

percy_upload_ipa.sh: This script uploads the given IPA to Percy. If successful, the script writes the app_url returned by BrowserStack API as PERCY_BUILD_URL env var.

percy_create_test_runner.sh: This script runs the xcodebuild command to create the test runner and copy it over to /tmp/dydxV4UITests.zip. The script is intended to run from your local dev machine, and not from CD/CI.

percy_extract_test_runner.sh: This script extracts the test runner from the test bundle file created by CD/CI.

percy_upload_test_runner.sh: This script uploads the test runner to Percy. If successful, the script writes the test_suit_url returned by BrowserStack API as PERCY_TEST_SUITE_URL env var.

percy_run_build.sh: This scripts calls the BrowserStack API to trigger a screenshot comparison build. You will need to pass in the output from other scripts. See the script for detail.

@ruixhuang ruixhuang changed the title WIP UI Tests WIP Jan 17, 2024

cd /tmp

curl -u "ruihuang_ry52wv:HXRCy79y5SDuDvvQw6Qw" \
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think 'ruihuang' should appear in the repo.

Copy link
Contributor Author

@ruixhuang ruixhuang Jan 23, 2024

Choose a reason for hiding this comment

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

Sorry.. it's not intended to land... Needed to create a PR to test their github integration.

The whole thing is not working yet... I am having a conference call with their Support to sort it out.

@ruixhuang ruixhuang changed the title UI Tests WIP [DO NOT LAND} UI Tests WIP Jan 23, 2024
@ruixhuang ruixhuang changed the base branch from main to develop February 29, 2024 21:19
@ruixhuang ruixhuang changed the title [DO NOT LAND} UI Tests WIP MOB-295: Add iOS tooling scripts for UI testings Feb 29, 2024
Copy link

linear bot commented Feb 29, 2024

MOB-295 iOS Tooling

# Conflicts:
#	dydxV4/dydxV4.xcodeproj/xcshareddata/xcschemes/dydxV4.xcscheme
@ruixhuang ruixhuang requested a review from mike-dydx March 7, 2024 22:24
@johnqh johnqh merged commit 70ec871 into develop Mar 8, 2024
2 checks passed
@johnqh johnqh deleted the features/ui_tests branch March 8, 2024 16:42
mike-dydx added a commit that referenced this pull request Apr 23, 2024
* MOB-88 : Scrolling Trades and then Tapping Orders Breaks Scroll (#81)

* maintain scroll position

* remove debug stuff

* update bitrise config (#82)

* remove unnecessary release 1.0.0 -> develop merge

* add dsyms upload

* Update branching_strategy.md

* MOB-181 : Tap Orderbook Price to Set Limit Price (#83)

* enable tapping row to update limit price

* publish delegate property

* do not update limit price unless order type requires it

* Revert "publish delegate property"

This reverts commit 94988f8.

* MOB-95 : Improve draft hide/show animation (#84)

* add weak to delegates

* improve receipt view sizing and animation

* MOB-94 : match signed number formatting to web (#86)

* display mkt value / qty

* add back long/short prefix

* match web for signed amounts

* change usage of `signOnly`

* remove hardcoded values

* use token denom from config file

* move like 0.00 logic to signed amount view model

* move like 0.00 logic to signed amount view model

* add formatter tests

* clean up

* address @rui's comment

* clean up

* move convenience inits to dydxViews, clean up

* Add color preference settings (#85)

* MOB-73 : Trading Rewards hook in real data pt 1 (non-chaos labs data) (#87)

* Add v4-web and template installation to bootstrap.sh (#88)

* bump abacus (#90)

* bump abacus to 1.4.10 (#91)

* update abacus protocol implementation to fix compilation (#93)

* Update config.yml (#89)

* SDWebImageSVGKitPlugin -> SDWebImageSVGCoder (#95)

* MOB-250 : Add metric to track screenshot taken (#96)

* MOB-240 : Trading Rewards hook in real data pt 2 (launch incentives) (#94)

* hook in new launch incentive properties

* temp

* integrate new abacus launch incentives fields

* add background texture

* use incentive points

* fix trading rewards background image (#97)

* remove background image

* support for image theming

* MOB-252 : Add link to share app on profile screen (#98)

* add in-line share action

* use app url instead of website

* add analytics event

* collect feedback from settings menu (#99)

* Update license (#100)

* MOB-299 : update `connectWallet` parameters to support memo field (#103)

* Update v4-native-client.js

* bump abacus

* MOB-297: Fix total dydx amount not populated from Profile tab (#101)

* MOB-297: Fix total dydx amount not populated from Profile tab

* Address feedback

* MOB-242 : implement logic to display pre-prompt and then ask for app rating (#102)

* initial rating logic implement (todo: integration)

* add tests and integrations

* interim commit

* support popup presentation

* support custom fade transition

* disable always show

* disable rating

* support disable prompting

* support later action

* disable rating

* address comments

* change default behavior to not enable app rating unless feature flag is explicitly set

* update app review pre-prompt to match design (#104)

* update pre-prompt to match design

* remove redundant event

* Update dydxRateAppView.swift

* Update README.md (#105)

Add a link to LICENSE and app icon

* add `screen_view` event for better firebase analytics integration (#106)

* MOB-309 : add additional logic to rate app flow where `requestReview` API is called without pre-prompt IF the pre-prompt has been answer "yes" in the past (#107)

* disable pre-prompt for subsequent app review requests

* Update dydxPointsRating.swift

* MOB-295: Add iOS tooling scripts for UI testings (#56)

* WIP

* WIP

* TESt

* WIP

* Testing

* WIP

* Build runner

* WIP

* BITRISE_TEST_BUNDLE_ZIP_PATH

* Pod

* WIP

* extract_test_runner

* WIP

* Revert Fullstory change

* Remove percy_test.sh

* Revert dydxV4/dydxV4.xcodeproj/xcshareddata/xcschemes

* Clean up

* Revert "Revert dydxV4/dydxV4.xcodeproj/xcshareddata/xcschemes"

This reverts commit 36cd40a.

* Revert to older version of Percy

* Remove the scheme script

* Use temp folder

* Merge from develop

* Package.resolved

* MOB-308: iOS: Handle deposit flow when user onboarded via Desktop Scan (#108)

* update satoshi fonts to go from regular to medium (#109)

* MOB-326 : update resources to use satoshi-medium instead of satoshi-regular [cont] (#110)

* update satoshi fonts to go from regular to medium

* add back satoshi regular

* update with minus/base/plus

* update theme files

* update theme files

* update font names in all files

* medium -> base

* clean up, remove weight as a configurable value

* MOB-328 Correlate x-request-id to correlate route requests from Squid transactions (#111)

* MOB-316 : Display markets list when market title is tapped on trade page (#112)

* add new ui for market selector

* resolve merge conflicts

* display market search/selector when market selector is tapped

* add extra inset to display selector

* remove unnecessary weak self capture

* bump abacus (#113)

* MOB-346 : pre-select last selected market for trade input if no market is specified (#114)

* trade button navigates to last selected market

* update where last selected is set

* MOB-333 Withdrawal error message "insufficient balance" but it seems like there is sufficient balance based on values displayed (#115)

* update classname to fix routing (#116)

* abacus 1.6.5 -> 1.6.6 (#117)

* add privacy info file per apple (#118)

* Bump Abacus and link to system status (#119)

* MOB-386 Fix Subaccount transfer for France (#121)

* Add logging

* Fix formatting issue when locale is set to France

* Updated formatter and add UTs

* Revert rounded

* Address review comment

* Clean up

* Cleanup

* Cleanup

* Fix typo

* Fix typo and lint

* Feature/mob 353 abacus update (#120)

* Use AsyncAbacusStateManagerV2

* update abacus

* Update with protocols

* Implement feature flag

* remove testing files

* MOB-409 Onboarding and transfer analytics (#122)

* Onboarding and transfer analytics

* Cleanup

* Address code review comments

* Send the subaccountNumber from Abacus state

* Update dydx/dydxPresenters/dydxPresenters/_v4/Onboarding/Connect/dydxOnboardConnectViewBuilder.swift

Co-authored-by: mike-dydx <[email protected]>

* Clean up

---------

Co-authored-by: mike-dydx <[email protected]>

* MOB-417 : add settings control to turn in-app notifications on/off completely (#124)

* add new notifications key to settings store which determins if notifications are shown

* fix pre-fill value

* display on/off in settings

* refactor SettingsStore extension

* bump to 1.6.23 (#125)

* add tp/sl button and screen stub (#126)

* MOB-102 : iOS: Update Withdraw Dialog for withdrawal limits (#123)

* read and display transfer input hyperlink

* Update v4-native-client.js

* update v4-client

* update pods

* update abacus

* add hyperlink to receipt view

* bump abacus

* Update project.pbxproj

* add entry price and oracle price receipt area (#127)

* MOB-433 Remove FullStory (#128)

* WIP

* Remove FullStory

* bump abacus to 1.6.28 (#130)

* bump abacus to 1.6.28

* update client

* MOB-427 : add TL/SL inputs to price triggers panel screen (#129)

* some ui

* add label accessory to platform input, split out input views into view models

* update advanced font

* touch up UI

* clean up

* hook up abacus, add clear button

* clean

* MOB-437 : add TL/SL inputs to price triggers panel screen (multiple order exist) (#131)

* some ui

* add label accessory to platform input, split out input views into view models

* update advanced font

* touch up UI

* clean up

* add multiple orders view when more than one tp/sl exists

* Fix wrong localization key (#132)

* Update settings.json (#133)

* initialize settings dict with values (#135)

* Update v4-native-client.js (#136)

* v1.3.0

* Allow null ethereamAddress when starting up Abacus at launch. (#142)

* v1.3.1

Revert "v1.3.1"

This reverts commit df6756b.

v1.3.1

---------

Co-authored-by: Rui <[email protected]>
Co-authored-by: John Huang <[email protected]>
mike-dydx pushed a commit that referenced this pull request Aug 20, 2024
* WIP

* WIP

* TESt

* WIP

* Testing

* WIP

* Build runner

* WIP

* BITRISE_TEST_BUNDLE_ZIP_PATH

* Pod

* WIP

* extract_test_runner

* WIP

* Revert Fullstory change

* Remove percy_test.sh

* Revert dydxV4/dydxV4.xcodeproj/xcshareddata/xcschemes

* Clean up

* Revert "Revert dydxV4/dydxV4.xcodeproj/xcshareddata/xcschemes"

This reverts commit 36cd40a.

* Revert to older version of Percy

* Remove the scheme script

* Use temp folder

* Merge from develop

* Package.resolved
mike-dydx pushed a commit that referenced this pull request Aug 21, 2024
* WIP

* WIP

* TESt

* WIP

* Testing

* WIP

* Build runner

* WIP

* BITRISE_TEST_BUNDLE_ZIP_PATH

* Pod

* WIP

* extract_test_runner

* WIP

* Revert Fullstory change

* Remove percy_test.sh

* Revert dydxV4/dydxV4.xcodeproj/xcshareddata/xcschemes

* Clean up

* Revert "Revert dydxV4/dydxV4.xcodeproj/xcshareddata/xcschemes"

This reverts commit 36cd40a.

* Revert to older version of Percy

* Remove the scheme script

* Use temp folder

* Merge from develop

* Package.resolved
mike-dydx pushed a commit that referenced this pull request Aug 21, 2024
* WIP

* WIP

* TESt

* WIP

* Testing

* WIP

* Build runner

* WIP

* BITRISE_TEST_BUNDLE_ZIP_PATH

* Pod

* WIP

* extract_test_runner

* WIP

* Revert Fullstory change

* Remove percy_test.sh

* Revert dydxV4/dydxV4.xcodeproj/xcshareddata/xcschemes

* Clean up

* Revert "Revert dydxV4/dydxV4.xcodeproj/xcshareddata/xcschemes"

This reverts commit 36cd40a.

* Revert to older version of Percy

* Remove the scheme script

* Use temp folder

* Merge from develop

* Package.resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants