odaridavid / Clean-MVVM-ArchComponents

👽 Built with MVVM pattern, Koin , Coroutines + Flows ,Architecture Components, Data Binding , Firebase , Unit/UI Tests ,Motion Layout
https://play.google.com/store/apps/details?id=com.k0d4black.theforce
Apache License 2.0
690 stars 112 forks source link

Replace SystemClock.sleep with Idling Resource for UI Tests #97

Closed zcelaloglu closed 4 years ago

zcelaloglu commented 4 years ago

I've tried 2 ways for Idling resources but all of them cause fails for Dashboard activity tests.

welcome your thoughts and advice

closes #75

odaridavid commented 4 years ago

The build is currently failing due to missing signing config secrets, you can check on the prerequisite section on the Readme how to go around that and generate the encrypted files for your build. From there I'll be able to see the errors occurring in the tests.

odaridavid commented 4 years ago

I will add a link to the Travis CLI installation on the README for future reference. For the meantime here it is https://github.com/travis-ci/travis.rb#installation

zcelaloglu commented 4 years ago

I`ll install it and try to submit all changes today later thanks!

zcelaloglu commented 4 years ago

I just installed ruby and travis, before I perform travis command I logined into travis CI(via both website and travis login --pro command) and then performed below command but it doesnt recognize my forked project

C:\Users\tczcelaloglu\Desktop\github\Clean-MVVM-ArchComponents>travis encrypt-file --pro secrets.tar --add
repository not known to https://api.travis-ci.com/: zfrc/Clean-MVVM-ArchComponents-
odaridavid commented 4 years ago

It probably has to do with renaming the repository by removing the little hyphen in the end. You can check this out here https://stackoverflow.com/questions/54239160/travis-ci-not-recognizing-renamed-repository

zcelaloglu commented 4 years ago

it is super weird that all forked projects end with hyphen, it should be able to distinguish through username by default

zcelaloglu commented 4 years ago

I changed repository name first and then changed remote url of the project in AS and lastly I rerun all steps starting from creating keystore and jks files but it still gives same error I guess it takes some time to reflect new repository name. I`ll try to run these all steps later

zcelaloglu commented 4 years ago

I recloned project from github and then added new google-services.json, keystore files and then tried to run necessary commands but it still gives repository not found error

C:\Users\tczcelaloglu\Documents\clean-mvvm-arch-components>travis encrypt-file --pro secrets.tar --add
Detected repository as zfrc/Clean-MVVM-ArchComponents, is this correct? |yes| yes
repository not known to https://api.travis-ci.com/: zfrc/Clean-MVVM-ArchComponents
zcelaloglu commented 4 years ago

and lastly my travis git config like below travis.slug=zfrc/Clean-MVVM-ArchComponents

odaridavid commented 4 years ago

and lastly my travis git config like below travis.slug=zfrc/Clean-MVVM-ArchComponents

Hmm. I believe it's supposed to have this kind of format

[travis]
   slug = zfrc/Clean-MVVM-ArchComponents

Also, try --com in place of --pro and see if it works

zcelaloglu commented 4 years ago

yeah I wrote like in above format, I`ll try with --com right now

zcelaloglu commented 4 years ago

still same result 😞

odaridavid commented 4 years ago

The only other reason I could think of is enabling Travis on your end for the repository from the travis dashboard

zcelaloglu commented 4 years ago

enabling project on travis dashboard solved all problems

odaridavid commented 4 years ago

There's a conflict with the google JSON file

zcelaloglu commented 4 years ago

it keeps failing although I applied all steps successfully 😞

The command "openssl aes-256-cbc -K $encrypted_5880cf525281_key -iv $encrypted_5880cf525281_iv -in secrets.tar.enc -out secrets.tar -d" failed and exited with 1 during .

odaridavid commented 4 years ago

Try running travis endpoint where does it point to?

zcelaloglu commented 4 years ago

it points https://api.travis-ci.org/

odaridavid commented 4 years ago

Seems Travis doesn't decrypt on external PRs https://github.com/travis-ci/travis-ci/issues/7247#issuecomment-276671168

A way around this will be to configure scripts to run on pull requests and this seems to be getting out of hand.Ill remove the release build prerequisites and configs from the repo then you can pull changes and retry.

odaridavid commented 4 years ago

You can pull the changes,no release configurations needed.

zcelaloglu commented 4 years ago

Hi, I’ll focus on this PR today night in order to fix failing test

odaridavid commented 4 years ago

Alright no pressure

On Thu, Jun 18, 2020, 7:01 PM Zafer Celaloglu notifications@github.com wrote:

Hi, I’ll focus on this PR today night in order to fix failing test

— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/odaridavid/Clean-MVVM-ArchComponents/pull/97#issuecomment-646123752, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3FUHANCVWGCNW2TUHYYRTRXI253ANCNFSM4NXOBQCQ .

zcelaloglu commented 4 years ago

@odaridavid there is still one failing test left, we may require to split favorite operations to make them easy in DashboardActivityIntegrationTest please take a look for this case, you may have a suggestion or solution :)

odaridavid commented 4 years ago

I also didn't like how that test is as it was a quick fix to check that everything is working , Ideally, it can just be converted to unit tests and test the favorites in isolation. That can be done in a separate issue, otherwise, it seems everything is working and looking pretty good. Great work on this pr.

odaridavid commented 4 years ago

Something really weird happened when merging, I can see the commits in the develop branch but this pr is still open with conflicts.

zcelaloglu commented 4 years ago

Interesting, what was the conflict file? I remember that I touched keystore.properties and some other files for travis CI configuration so it could be the reason for this conflict

odaridavid commented 4 years ago

It isn't highlighting any files, in particular,feels like a GitHub bug of some sorts because that doesn't make any sense

zcelaloglu commented 4 years ago

Got approve mail just now :)

odaridavid commented 4 years ago

It all looks good, Github is making this confusing though because I already got it merged.