Commit Graph
2814 Commits
Author SHA1 Message Date
Dannon Baker 9468bef057 Merge pull request #4592 from jmchilton/workflow_click_fix
Small improvements to workflow editor Selenium tests.
2017-09-12 12:17:13 -04:00
John Chilton 7efe561867 Rework invocation state tracking in API tests.
At the insistence of @nsoranzo, be more explicit about waiting for workflow test in API tests. While I was in there I also setup new abstractions for waiting on state and updated various workflow cancelling tests to use test_history context for better error reporting.
2017-09-11 16:08:29 -04:00
John Chilton 5da62ca264 Cancel workflow invocations when histories are deleted.
With test case, rebased with spelling fixes thanks to @nsoranzo.

xref #3555 (third point)
2017-09-11 16:07:37 -04:00
John Chilton 79a37830bb Small improvements to workflow editor Selenium tests.
I saw a failed test earlier that would have been fixed by a switch to wait_for_and_click in workflow_editor_click_options. This makes that switch and moves some of these workflow editor helper functions into navigates_galaxy.py for reuse by other test cases and by library users.
2017-09-11 11:30:36 -04:00
Dannon Baker a190903bd0 Merge pull request #4588 from jmchilton/selenium_fixes_25
Make history sharing Selenium tests more robust and informative.
2017-09-11 11:21:14 -04:00
John Chilton 31f2168c3d Merge pull request #4587 from anatskiy/saved_histories_tests
Add Selenium tests for the Saved Histories
2017-09-11 11:20:57 -04:00
Evgeny Anatskiy 5146455164 generate random history names for the published history grid tests 2017-09-11 16:45:34 +02:00
Evgeny Anatskiy dcc18134e7 generate random history names 2017-09-11 15:30:09 +02:00
John Chilton dcbe30515f More robust rename for histories.
I think the wait_for_and_click_selector method will prevent errors like this one https://jenkins.galaxyproject.org/job/selenium/249/testReport/selenium_tests.test_published_histories_grid/HistoryGridTestCase/test_history_grid_histories/.
2017-09-10 19:44:16 -04:00
John Chilton 1e832733db Improve error reporting in Selenium tests when `wait_for_logged_in` fails.
Previously just a notification about waiting for ``a.loggedin-only`` failed would show up. This doesn't indicate if the login failed completely or the masthead just failed to update. I suspect the login failed completely, but just in case I've updated the error handling to actually ping the API and check and print a better error message with this information.

New messages look like:

```
TimeoutException: Message: Failed waiting for masthead to update for login, but user API response indicates [test0ol61vs8fo] is logged in. This seems to be a bug in Galaxy. API response was [{u'username': u'test0ol61vs8fo', u'quota_percent': None, u'preferences': {}, u'total_disk_usage': 0.0, u'deleted': False, u'id': u'adb5f5c93f827949', u'nice_total_disk_usage': u'0 bytes', u'quota': None, u'email': u'test0ol61vs8fo@test.test', u'is_admin': False, u'tags_used': [], u'purged': False}].Timeout waiting on CSS selector [a.loggedin-only-x] to become visible.
```

and

```
TimeoutException: Message: Failed waiting for masthead to update for login, API indicates no user is logged in - there is a problem with this test. API response was [{u'quota_percent': None, u'nice_total_disk_usage': u'0 bytes', u'total_disk_usage': 0}]. Timeout waiting on CSS selector [a.loggedin-only] to become visible.
```
2017-09-10 19:24:16 -04:00
John Chilton e2730ca714 Reduce duplication, increase robustness in Selenium history tests.
- set_tags() appeared in both published and saved history tests, refactored into navigates_galaxy with function name history_panel_add_tags
- is_displayed() appeared in both published and saved history tests, refactored into has_driver as selector_is_displayed
- Introduced history_panel_rename to reduce duplication across history panel tests and newer published and saved history tests.
- Removed custom history click option helper in saved and published history tests and just used the variant in navigates_galaxy.
- use wait_for_and_click a couple more places...
2017-09-10 17:58:10 -04:00
John Chilton b61ca47c99 Make history sharing tests more robust and informative.
- Be sure when sharing a history with a user we wait to actually see that user's e-mail address appear in the history's sharing list after submission.
- Print something for the failed history sharing assertions (I'm pretty sure they are 403 errors because some aspect of the sharing or login didn't work - but might as well verify).
2017-09-10 17:02:33 -04:00
Evgeny Anatskiy 8533c71787 use the wait_for_and_click_selector function 2017-09-10 18:44:42 +02:00
Evgeny Anatskiy d78e60186b Merge branch 'dev' into saved_histories_tests 2017-09-10 18:22:19 +02:00
Evgeny Anatskiy ca59aaeda0 add the tags test 2017-09-10 17:16:26 +02:00
John Chilton b9cff7ad91 Fix another issue with sorting by owner for published histories Selenium test.
Locally this never happens, but remotely sometimes when sorting by owner the histories are sorted by owner but not in the same order as the test was asserting. I would assume this is likely a postgres vs. sqlite difference - perhaps the former doesn't sort the rows by the order they were created within equal sort classifications (i.e. same owner) but the latter does. I've fixed this - the test should not have been asserting such a strong condition I don't think.
2017-09-09 08:28:01 -04:00
John Chilton 900699037d Retry failed clicks more aggressively for Selenium tests.
Would have prevented from this (https://jenkins.galaxyproject.org/job/selenium/238/testReport/junit/selenium_tests.test_history_panel/HistoryPanelTestCase/test_refresh_preserves_state/) failure in retrospect. Also refactor that common pattern into a helper and use throughout. Add missing @selenium_test decorator on that test also - it would have retried if this had been there and we would have a screenshot.
2017-09-09 08:18:36 -04:00
Martin Cech 28fd37be40 Merge pull request #4576 from jmchilton/selenium_fixes_21
Make submitting logins for Selenium tests a bit more robust.
2017-09-08 15:00:44 -04:00
John Chilton 5e179df2a8 Fix logic error in new published histories sort by owner test.
I switched to randomly generated usernames without actually ensure the random usernames would be generated in the same lexiographic order - that wasn't super bright of me. That sort by owner test should pass as frequently as the other tests in that test case class now.
2017-09-07 16:35:44 -04:00
John Chilton 46b799dfbb Make submitting logins for Selenium tests a bit more robust.
There are a few different transiently failing tests on Jenkins that seem to fail because the test thinks Galaxy is logged in but it is not. So now after we click the login button in Selenium - we will wait for to see the "Register or Login" button turn into the "User" button.

This is a similar problem and fix to what was done in #4562 - which seemed to help.
2017-09-07 15:51:38 -04:00
E Rasche e8ea1104a7 add a test expecting failure 2017-09-07 16:31:32 +02:00
Evgeny Anatskiy 316eb330bb add permanently delete history test 2017-09-07 16:30:04 +02:00
Evgeny Anatskiy 90f0dfc8bc add advanced search test 2017-09-07 16:07:56 +02:00
Evgeny Anatskiy e6ebc9e022 add standard search test 2017-09-07 15:51:50 +02:00
Evgeny Anatskiy 5dedd39771 add sort by name test 2017-09-07 15:35:49 +02:00
Evgeny Anatskiy 29ed1bec66 add multiple histories delete/undelete test 2017-09-07 15:21:47 +02:00
Evgeny Anatskiy ff769da928 add history publish test 2017-09-07 14:30:24 +02:00
Evgeny Anatskiy da42c16ae7 add history view test 2017-09-07 13:47:40 +02:00
Evgeny Anatskiy bca6dfefb6 add history switch test 2017-09-07 13:41:02 +02:00
Dannon Baker 8f7d2374ca Merge pull request #4564 from jmchilton/selenium_fixes_20
Increase the robustness of Selenium workflow management tests.
2017-09-06 16:50:30 -04:00
Evgeny Anatskiy 7824fdab6b add delete/undelete test 2017-09-06 17:25:20 +02:00
Evgeny Anatskiy c57b993b45 quick fix 2017-09-06 16:06:38 +02:00
John Chilton 49eadb682a Increase the robustness of Selenium workflow management tests.
Next Selenium build encountered a few different problems with importing workflows from URL:

- https://jenkins.galaxyproject.org/job/selenium/213/artifact/213-test-errors/test_rename2017090515241504639495/stacktrace.txt
- https://jenkins.galaxyproject.org/job/selenium/213/artifact/213-test-errors/test_view2017090515251504639548/
- https://jenkins.galaxyproject.org/job/selenium/213/artifact/213-test-errors/test_build_workflow2017090515191504639167/stacktrace.txt

On full test retry, only one of these actually caused a test error but we shouldn't have to depend on the test re-running stuff.
2017-09-05 22:49:01 -04:00
Evgeny Anatskiy 29622bba69 add history rename test 2017-09-05 23:12:38 +02:00
John Chilton 580811d740 Potential fix for transiently failing Selenium published histories test.
The the [latest Selenium test execution](https://jenkins.galaxyproject.org/job/selenium/212/testReport/) most of the published histories tests failed. It looks like this is because of the three histories that were supposed to be published, only 2 were actually published. My best guess for what happeend was that the click of the button to publish the history occurred but the next Selenium command happened so quickly that the page had not gotten a chance to respond to the click. This tweaked approach to publishing histories ensures we stay on the page until the "unpublish" link appears - this will either fix the problem or rule this theory out as the explanation.
2017-09-05 14:48:30 -04:00
mvdbeek 2541928855 Revert "Remove Selenium test that is broken because Galaxy is broken."
This reverts commit a91c03d440.
2017-09-05 18:46:13 +02:00
Björn Grüning 3962ba94d7 Merge pull request #4549 from jmchilton/selenium_fixes_18
Assorted Selenium test fixes
2017-09-05 18:42:16 +02:00
John Chilton 1e3bd2d4e8 Merge pull request #4489 from arbernard/LMOD_Dependency_resolver
New Dependency resolver for the LMOD environment modules system
2017-09-05 09:29:07 -04:00
Dannon Baker 6e6845b498 Merge pull request #4534 from jmchilton/collection_import_export_test_case
Refactor history import/export tests to allow collection testing.
2017-09-05 08:59:04 -04:00
John Chilton a91c03d440 Remove Selenium test that is broken because Galaxy is broken.
See (https://github.com/galaxyproject/galaxy/issues/4548) for more information on the underlying issue.
2017-09-04 21:30:00 -04:00
John Chilton ebcb4aa623 Possible fix for a transient failure in the published histories grid tests.
See failure here (https://jenkins.galaxyproject.org/job/selenium/210/testReport/selenium_tests.test_published_histories_grid/HistoryGridTestCase/test_history_grid_sort_by_owner/).

Uses technique to retry atomic assertions that may not be immediately true but will settle as the DOM is updated in response to changes to be true (added in https://github.com/galaxyproject/galaxy/commit/d0df3886fa7acaa3d5f63360e2af78aab2deaaaa).
2017-09-04 21:21:20 -04:00
Martin Cech 9b4cd096e1 Merge pull request #4505 from jmchilton/composite_upload_refine
Tests and clarifications for composite uploads.
2017-09-04 21:02:40 -04:00
John Chilton 3d9809a50d Merge pull request #4512 from martenson/improving-datalibraries
A round of data libraries improvements.
2017-09-04 00:21:51 -04:00
Björn Grüning b2ceef5b6c Merge pull request #4536 from jmchilton/test_refactoring
Refactor test modules toward cleaner dependencies
2017-09-03 21:41:32 +02:00
Evgeny Anatskiy a1e79b13e1 add the first test 2017-09-03 19:04:33 +02:00
Björn Grüning ea9f5f7eb2 Merge pull request #4524 from jmchilton/selenium_fixes_16
Fix workflow run Selenium test and make it more robust.
2017-09-03 16:25:35 +02:00
Martin Cech 5358db5823 fix lint order 2017-09-01 15:34:28 -04:00
John Chilton aba726a89f Move twilltestcase from `base to functional` module.
This way nothing in ``base`` has any dependencies on Twill anymore.
2017-09-01 12:30:18 -04:00
John Chilton 7343463dac Rework hack to inject database contexts into Tool Shed tests.
Rather than depend on something in ``functional`` test module from ``base.driver_util``, just set these global hacks up in ``driver_util`` itself. This eliminates a dependency of ``functional`` on ``base`` - ideally ``base`` would not depend on any other test modules.
2017-09-01 12:30:18 -04:00
John Chilton 6d7c8b3136 Cleanup sys.path hacking in test/base/tool_shed_util.py. 2017-09-01 12:30:14 -04:00