tipsi / tipsi-twitter

React native module for twitter API
MIT License
29 stars 10 forks source link

Android implementation #1

Closed fAns1k closed 7 years ago

isnifer commented 7 years ago

I have successfully authenticated, but... not_authenticated

fAns1k commented 7 years ago

@isnifer, could you do pull. Your screenshot seems like old version of sample.

itsmepetrov commented 7 years ago
Appium is running on: 0.0.0.0:4723
Found next Android device: emulator-5554, version: 6.0

=======================================================================================
Selenium 2.0 / webdriver protocol bindings implementation with helper commands in nodejs.
For a complete list of commands, visit http://webdriver.io/api.html.
=======================================================================================

  Test sample auth with Twitter
    ✔  `Login with Twitter` button should be visible
---------------------------------------------------
SCREEENSHOT URL: http://i.imgur.com/ltRPj8S.png
---------------------------------------------------
---------------------------------------------------
Failed to save source: Invalid devkey
---------------------------------------------------
    ✔  User can click `Login with Twitter` button
    ✖  Error: element (//*/android.view.View[2]/android.widget.EditText[1]) still not visible after 60000ms at failure (/Users/anton/Documents/Projects/tipsi/tipsi-twitter/example/node_modules/tape-async/index.js:44:10)
        { [Error: element (//*/android.view.View[2]/android.widget.EditText[1]) still not visible after 60000ms] message: 'element (//*/android.view.View[2]/android.widget.EditText[1]) still not visible after 60000ms', type: 'WaitUntilTimeoutError' }undefined

passed: 2  failed: 1  of 3 tests  (1m 11.9s)

1 of 3 tests failed.

It looks like the npm run ci command does not run the ./configure script before build.

@fAns1k please take a look

isnifer commented 7 years ago

One more time I want to discuss the name of the module. I think we need to export the same module both on iOS and Android, for example:

import { NativeModules } from 'react-native'

const { TPSTwitterModule } = NativeModules
export default TPSTwitterModule

This little trick will help us contain in src folder only two files - [TPSTwitterModule.js, index.js]

@fAns1k @itsmepetrov @cybergrind what do you think?

itsmepetrov commented 7 years ago

Everything is ok on both Android 5.1.1 and 6.0.0 emulators:

Appium is running on: 0.0.0.0:4723
Found next Android device: emulator-5554, version: 5.1.1

=======================================================================================
Selenium 2.0 / webdriver protocol bindings implementation with helper commands in nodejs.
For a complete list of commands, visit http://webdriver.io/api.html.
=======================================================================================

  Test sample auth with Twitter
    ✔  `Login with Twitter` button should be visible
    ✔  User can click `Login with Twitter` button
    ✔  loginInput should be visible
    ✔  User should be able to write login
    ✔  passwordInput should be visible
    ✔  User should be able to write password
    ✔  okButton should be visible
    ✔  User can click okButton
    ✔  User authenticated successfully

passed: 9  failed: 0  of 9 tests  (23.5s)

All of 9 tests passed!
itsmepetrov commented 7 years ago

@fAns1k please update Tests section in README.md with information about TWITTER_USER and TWITTER_PASS

isnifer commented 7 years ago

LGTM