-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Implement a bash script needed to configure simulators for App development #29061
Implement a bash script needed to configure simulators for App development #29061
Conversation
@mananjadhav Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@shubham1206agra Can you clarify what you mean by this? Let's highlight the impact if any. And is it not required or not recommended? |
@shubham1206agra I don't see any screencasts in the author list? |
Idk |
setup_ios() | ||
{ | ||
select_device_ios | ||
sleep 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 5 seconds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to give time to start the device
Since this is a script |
declare -r BLUE=$'\e[1;34m' | ||
declare -r TITLE=$'\e[1;4;34m' | ||
declare -r RESET=$'\e[0m' | ||
# Check if GREEN has already been defined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cause this is causing errors
scripts/shellUtils.sh: line 3: declare: GREEN: readonly variable
if [ "$platform" = "ios" ] || [ "$platform" = "all" ]; then | ||
setup_ios || { | ||
error "Failed to setup iOS simulator" | ||
exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why exit if ios fails? especially if $platform == 'all'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that the user knows immediately that the flow failed. Instead of thinking that the flow passed.
sleep 2 | ||
adb disable-verity | ||
adb reboot | ||
sleep 30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do we come up with these numbers like 2 seconds, 30 seconds? Is there a way to avoid so many sleep
commands?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope
You can't reduce the number of sleep command unfortunately
@@ -8,6 +8,7 @@ | |||
"private": true, | |||
"scripts": { | |||
"configure-mapbox": "scripts/setup-mapbox-sdk-walkthrough.sh", | |||
"setupNewDotWebForEmulators": "scripts/setup-newdot-web-emulators.sh", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these supposed to be a part of prebuild? or atleast added to the README? @hayata-suenaga ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think README.md will be updated here
#28422
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shubham1206agra can you check the current README change in that PR and put a comment in that PR on additional instruction we need to add because of these new scripts if there are any?
Once the setup is done, to verify the setup works as expected. Basically running the apps on the emulators. |
Can't test this as this requires another PR to be merged and maybe some setup @hayata-suenaga please tell me what I should do here? |
@shubham1206agra for the PR that adds the setup for @mananjadhav please do the same I know this process is very cumbersome, but we have to ensure that this works before merging 🙇 |
@shubham1206agra as @mananjadhav suggested, please edit README file to add instructions for running the script before accessing the dev App on browsers on emulators. |
I will send the updated instruction to https://github.com/Expensify/App/pull/28422/files. I think if we should put this there only |
How to do this? |
BTW https://new.expensify.com.dev:8082/ not working |
Use |
@shubham1206agra thank you for the explanation 😄 So did you make necessary changes to the PR so that Android works now? Is this good for testing? |
npm has a |
@hayata-suenaga @mananjadhav You can start the review now |
@shubham1206agra I get the following error when trying to run the iOS flow after selecting the simulator:
|
@shubham1206agra Apologies for the false alarm. Looks like I had to run the steps from the other PR first. I thought only merging the PR was required. I don't have any more errors. |
My observations after testing. Scripts iOS Android
@shubham1206agra Could you please confirm that this is the expected behaviour and then I'll start working on the reviewer checklist? Thanks. |
For Android point 1 please use |
Ok, that makes sense. Confirming that both https://127.0.0.1:8082 and https://10.0.2.2:8082 work as expected. |
@shubham1206agra Could you please add screenshots to the OP? This is a requirement for all contributor PRs. You can simply take screenshots of the login screen for all platforms. Thanks. |
Not required for all platforms. Only mweb is required for which screenshot has been updated. |
Reviewer Checklist
Screenshots/Videos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Tests well.
This PR adds a bash script. This PR can be deployed before the |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.3.84-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.84-10 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.84-10 🚀
|
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.3.85-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.85-4 🚀
|
Details
Fixed Issues
$ #28910
PROPOSAL: #28910 (comment)
Tests
Note -
Pre-requisite for Android flow
adb push "$(mkcert -CAROOT)/rootCA.pem" /storage/emulated/0/Download/
to push certificate to install in Download folder.Note - If you want to run app on
https://127.0.0.1:8082
, then just install the certificate and useadb reverse tcp:8082 tcp:8082
on every startup.Android Flow
npm run setupNewDotWebForEmulators android
🎉 Done!
.Note - If you want to run app on
https://new.expensify.com.dev:8082
, then just do the Android flow and usenpm run startAndroidEmulator
to start the Android Emulator every time (It will configure the emulator).Possible Scenario:
adbd cannot run as root in production builds
, then it will point to https://stackoverflow.com/a/45668555 in the console.iOS Flow
npm run setupNewDotWebForEmulators ios
🎉 Done!
.All Flow
npm run setupNewDotWebForEmulators all
ornpm run setupNewDotWebForEmulators
🎉 Done!
.QA Steps
NO QA
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android