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

Feat: basic ui tests #136

Closed
wants to merge 87 commits into from
Closed

Feat: basic ui tests #136

wants to merge 87 commits into from

Conversation

mykeels
Copy link

@mykeels mykeels commented Aug 28, 2018

fixes #41

6 Tests Written

  • Going to the user settings, adding an ethereum account and looking at its balance
  • Adding a token and seeing that tokens get updated
  • Adding a bitcoin account and seeing that the balance is there
  • Adding a fiat balance and see that it's properly updated
  • Add an exchange and see that the API key is succesfully accepted
  • Change the currency to EUR and that the currency changes everywhere in the UI

Pending

  • Change each one of the settings and see that the change has been applied

The pending test case is unclear ... Could you give examples of each setting you expect to the tested, and what effect the change is to make?

@CLAassistant
Copy link

CLAassistant commented Aug 28, 2018

CLA assistant check
All committers have signed the CLA.

@gitcoinbot gitcoinbot mentioned this pull request Aug 28, 2018
7 tasks
@mykeels
Copy link
Author

mykeels commented Aug 28, 2018

@LefterisJP what version of node is used in travis-ci?

@mykeels
Copy link
Author

mykeels commented Sep 2, 2018

  • @LefterisJP perhaps adding pauses between the statements would help make sure the .jconfirm box goes away before the next action is performed.

  • Also, I see you have added the .env file to source control. Is there a reason you don't wish to use Travis's and AppVeyor's Environment Variable setting functionality?

@LefterisJP
Copy link
Member

LefterisJP commented Sep 2, 2018

Also, I see you have added the .env file to source control. Is there a reason you don't wish to use Travis's and AppVeyor's Environment Variable setting functionality?

Which functionality do you mean? Is it this one: https://docs.travis-ci.com/user/environment-variables/

If yes I have also added them as environment variables there but I realized now that it's superfluous. What are the pros/cons? All these are test variables so nothing sensitive.

EDIT: It also seems that OSX is still failing with the same error as before.

await this.app.client.execute(function () {
$('.jconfirm').remove()
})
// wait for the other modal popup, then close it
await this.app.client.waitForExist('.jconfirm-box.jconfirm-hilight-shake.jconfirm-type-animated.jconfirm-type-green', 5000)
Copy link
Member

Choose a reason for hiding this comment

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

I may be wrong, but I put the full class path for a reason. The order with which these popups appear is not guaranteed and I needed a unique way to address each one. So I think the full class path should be there.

Also @mykeels do you know of any way to abstract this functionality which we use in every tests somehow? Would normal functions work here?

@cryptomental cryptomental mentioned this pull request Sep 3, 2018
3 tasks
@mykeels
Copy link
Author

mykeels commented Sep 4, 2018

I was referring to this @LefterisJP because it does contain Bittrex API Key and Secret

@LefterisJP
Copy link
Member

@mykeels I know it's an empty account I created just for testing. Has nothing in there.

@mykeels
Copy link
Author

mykeels commented Sep 5, 2018

@LefterisJP what could make the backend app crash immediately it is started? I keep getting

CREATED PYPROCESS
python subprocess killed with signal null and code 1

@LefterisJP
Copy link
Member

Where do you get it? Running it locally? Have you properly made the python environment as described in the source installation docs?

A way to test this is to run the backend alone. Assuming you have everything setup properly run python -m rotkehlchen and see what happens.

@mykeels
Copy link
Author

mykeels commented Sep 16, 2018

You're right, I'd forgotten to run source ./bin/activate to make sure python3 was the default python version. Is there some similar setting we have to do on travis to ensure python3 is used as the default? @LefterisJP

@LefterisJP
Copy link
Member

Is there some similar setting we have to do on travis to ensure python3 is used as the default? @LefterisJP

Travis uses python3 for rotkehlchen. It's in travis.yml

@mykeels
Copy link
Author

mykeels commented Sep 16, 2018

@LefterisJP travis is building successfully. Is it possible to re-run the AppVeyor build without pushing changes?

@LefterisJP
Copy link
Member

@mykeels I can do it as many times as you need, yes.

But it still looks like a flaky test:

 Adding a token and seeing that tokens get updated:
     Error: stale element reference: element is not attached to the page document
      at new RuntimeError (node_modules\webdriverio\build\lib\utils\ErrorHandler.js:143:12)
      at Request._callback (node_modules\webdriverio\build\lib\utils\RequestHandler.js:316:39)
      at Request.self.callback (node_modules\request\request.js:185:22)
      at Request.<anonymous> (node_modules\request\request.js:1161:10)
      at IncomingMessage.<anonymous> (node_modules\request\request.js:1083:12)
      at endReadableNT (_stream_readable.js:1064:12)
      at _combinedTickCallback (internal/process/next_tick.js:138:11)
      at process._tickDomainCallback (internal/process/next_tick.js:218:9)

@LefterisJP
Copy link
Member

Closing since this was already implemented by: #207

@LefterisJP LefterisJP closed this Dec 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write the basic front-end UI tests
3 participants