Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

[TEST] Test for Gateways functionality (RT-1906) #1766

Merged
merged 3 commits into from
Nov 10, 2014

Conversation

darkdarkdragon
Copy link
Contributor

No description provided.

@vhpoet
Copy link
Contributor

vhpoet commented Nov 5, 2014

@darkdarkdragon I really like the direction you're taking on writing e2e tests, can you please check out Protractor Page Objects, and let me know what do you think about it?

@darkdarkdragon
Copy link
Contributor Author

I'm used Page Objects pattern, at least that's what I think about it :)
In fact, I'm based my code on this http://www.thoughtworks.com/insights/blog/using-page-objects-overcome-protractors-shortcomings as a template.
Do you think I something can be improved in code that I wrote?

BTW, for testing we are using "grunt-mocha-protractor". But it has very olde protractor in dependency.
I think we must do something about it while there is not too much tests written.

@vhpoet
Copy link
Contributor

vhpoet commented Nov 6, 2014

@darkdarkdragon I was thinking if we can simplify this.

Protractor example is
this.nameInput = element(by.model('yourName'));
Our code is
nameInput: { get: function () { return element(by.model('yourName')) }},

What do you think?

P.S. Yea, looks like our protractor version is very old. I'll work on it.

@darkdarkdragon
Copy link
Contributor Author

I just choose template with getters because I didn't know if element can be created before even page isn't available.
But as I see now in documentation, it's ok to create them early.
So yes, this can be simplified.

vhpoet added a commit to vhpoet/ripple-client that referenced this pull request Nov 6, 2014
vhpoet added a commit to vhpoet/ripple-client that referenced this pull request Nov 6, 2014
@vhpoet
Copy link
Contributor

vhpoet commented Nov 6, 2014

@darkdarkdragon awesome, don't even know why is this guy doing it in a hard way.. maybe it's an outdated article, donno.

advancedPage.showAdvancedOptionsInput.click().
then(advancedPage.saveAdvancedSettingsButton.click).
then(helperBrowser.waitForElementToDisplay.bind(this, advancedPage.advancedSettingsShowHolder)).
then(function() { done(); });
Copy link
Contributor

Choose a reason for hiding this comment

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

then(function() { done(); }) this could be simplified to then(done)

@vhpoet
Copy link
Contributor

vhpoet commented Nov 10, 2014

LGTM

@vhpoet
Copy link
Contributor

vhpoet commented Nov 10, 2014

@darkdarkdragon ok, good for now.

@mrajvanshy
Copy link
Contributor

LGTM

@ripplebot
Copy link

Ready to merge: Travis build checks out, most recent commit looks good to mrajvanshy, vhpoet.

mrajvanshy added a commit that referenced this pull request Nov 10, 2014
[TEST] Test for Gateways functionality (RT-1906)
@mrajvanshy mrajvanshy merged commit 7b315c9 into ripple:develop Nov 10, 2014
@darkdarkdragon darkdarkdragon deleted the develop-RT-1906 branch November 11, 2014 19:54
@vhpoet
Copy link
Contributor

vhpoet commented Dec 2, 2014

@darkdarkdragon gateway tests are broken, can you please check?

@darkdarkdragon
Copy link
Contributor Author

@vhpoet one fix is here #1871

@darkdarkdragon
Copy link
Contributor Author

@vhpoet second fix #1872

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants