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

Add tests for dashboard's new namespace-focused navigation #3646

Merged
merged 1 commit into from Dec 3, 2019

Conversation

@scottcarol
Copy link
Member

scottcarol commented Oct 28, 2019

This PR adds two tests to test the dashboard's new navigation and routing patterns:
/web/app/integration/specs/url-routing.js
/web/app/integration/specs/namespace-select.js

It deletes the now-obsolete logo-redirect.js test.

To make testing easier, this PR adds an id to some of the elements rendered in the browser.

It also updates the webdriverio packages we rely on and adds the chai assertion library.

You must have a working version of the dashboard running on localhost:7777 (this opens with bin/web dev). The location of the dashboard can be changed in wdio.conf.js

This PR does not change any functionality of the dashboard.

Note Our SauceLabs tunnel connection documented in TEST.md is not working (bin/web integration cloud), I'm making a separate ticket for this. At this time, these tests should be run with bin/web integration local

To test:
You need to have Chrome installed, no specific version. From /linkerd2:

$ bin/web setup # download updated dependencies
$ bin/web dev # start the dashboard
$ bin/web integration local # webdriverio will open Chrome and click through the tests.
@admc

This comment has been minimized.

Copy link
Contributor

admc commented Nov 1, 2019

Delivered @scottcarol some feedback about trying to avoid using ID's as lookup selectors (as it's hard to be sure that only one copy of a component exists in the DOM), and to try to use waitFor type commands instead of pauses when possible.

@admc
admc approved these changes Nov 1, 2019
Copy link
Contributor

admc left a comment

Runs and passes for me in chrome locally!

@scottcarol

This comment has been minimized.

Copy link
Member Author

scottcarol commented Nov 3, 2019

Got great feedback from @admc on improving tests, once I incorporate the changes I will push the updated branch and it will be ready for review again.

@scottcarol scottcarol force-pushed the cscott/test-routing branch from c7d1b79 to a9e8828 Dec 2, 2019
@scottcarol

This comment has been minimized.

Copy link
Member Author

scottcarol commented Dec 2, 2019

Just pushed the updated branch which uses the react$$ API instead of ID selectors and waitUntil() instead of browser pauses. Ready for review.

Copy link
Member

dadjeibaah left a comment

This all works! I am not well versed in QA testing enough to give any useful suggestions but from a JS point of view this looks good to me. I left one comment.

@scottcarol scottcarol merged commit 66a74b2 into master Dec 3, 2019
28 checks passed
28 checks passed
Checkout source
Details
Validate go deps
Details
Go unit tests
Details
Go lint
Details
Go Format
Details
JS unit tests
Details
Docker pull
Details
Docker build
Details
Cluster setup (deep)
Details
Cluster setup (upgrade)
Details
Cluster setup (helm)
Details
Cluster setup (custom_domain)
Details
Cluster setup (external_issuer)
Details
Integration tests (deep)
Details
Integration tests (upgrade)
Details
Integration tests (helm)
Details
Integration tests (custom_domain)
Details
Integration tests (external_issuer)
Details
Cluster cleanup (deep)
Details
Cluster cleanup (upgrade)
Details
Cluster cleanup (helm)
Details
Cluster cleanup (custom_domain)
Details
Cluster cleanup (external_issuer)
Details
Docker deploy
Details
Cloud integration tests
Details
Cloud cleanup
Details
Helm chart deploy
Details
DCO DCO
Details
@scottcarol scottcarol deleted the cscott/test-routing branch Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.