-
Notifications
You must be signed in to change notification settings - Fork 81
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
Adding integration tests for nodes page #1707
Adding integration tests for nodes page #1707
Conversation
mlunoe
commented
Dec 27, 2016
This repo has @mesosphere-mergebot integration. You can interact with the following commands.
|
ping @Poltergeist |
Works well! 🚢 |
Unfortunately I can't run the integration tests to verify the PR |
b95f614
to
84cb114
Compare
Rebased with integration test fixes |
Run unit tests |
2 similar comments
Run unit tests |
Run unit tests |
84cb114
to
bee8e64
Compare
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 wanted to show some improvements I made to the tests you wrote and why I made the changes.
}); | ||
cy.visitUrl({url: '/nodes'}); | ||
}); | ||
|
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.
Moved this code under the Filters nodes table
context because in the Nodes grid
context we are doing a different call to visitUrl
we should do a best-effort to only call visitUrl
once per test as this is expensive and time consuming and can easily cause each test to take an extra couple seconds to run.
cy.get('@hostnames') | ||
.should('contain', 'dcos-01') | ||
.should('contain', '167.114.218.155') | ||
.should('contain', '167.114.218.156'); |
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.
A more efficient way of running these assertions. All of the should
calls run against the last filter call, in this case the call to get
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.
Right on!
cy.get('@filterBar').contains('Filter by Service').click(); | ||
cy.get('.dropdown-menu').contains('cassandra-unhealthy').click(); | ||
cy.get('@filterBar').contains('Healthy').click(); | ||
context('Filters nodes grid', function () { |
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.
Putting the rest of the tests for the Nodes grid in their own context so that we don't call visitUrl
more than once.
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.
Cool! Yeah, I guess this isn't an actual issue, but just more efficient, right?
cy.configureCluster({ | ||
mesos: '1-for-each-health', | ||
nodeHealth: true | ||
}); |
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.
Adding this down here now, because we moved the beforeEach
from the code above into the context above.
run integration tests damn EOF |