Commit Graph
112 Commits
Author SHA1 Message Date
John Chilton e132521255 Selenium - bug fix for grabbing history name during transition.
xref https://jenkins.galaxyproject.org/job/selenium/654/artifact/654-test-errors/test_history_switch2017092708211506514917/
2017-09-29 15:06:26 -04:00
John Chilton 0dd7f01008 Merge pull request #4681 from guerler/replace_analysis_forms
Remove history renaming mako
2017-09-26 09:42:10 -04:00
John Chilton afe1ea7f20 Fix test_saved_histories.py for #4681. 2017-09-26 09:40:23 -04:00
Nicola Soranzo 9b1832abb1 Fix import order for cron/, scripts/ and test/ 2017-09-25 23:44:39 +01:00
John Chilton 9f5309688e Import order fix. 2017-09-24 17:13:36 -04:00
John Chilton 9d3ed321be Selenium - fix transient history in test_saved_histories related to fetching history names.
xref https://jenkins.galaxyproject.org/job/selenium/588/artifact/588-test-errors/test_delete_and_undelete_history2017092415231506281014/stacktrace.txt
2017-09-24 17:00:59 -04:00
John Chilton 97cf3b94d1 Selenium - fix transiently failing test caused by not waiting on anonymous history loading.
After logging out - may need to a wait a second to give the UI and backend a chance to create a new history for the now anoymous user. Pause and let that happen.

xref https://jenkins.galaxyproject.org/job/selenium/585/artifact/585-test-errors/test_clean_anon_history_after_logout2017092412041506269041/
2017-09-24 17:00:53 -04:00
John Chilton c90a84e1c2 Selenium - fix transient error in history switching test.
History sometimes takes longer than that second to switch in the GUI, so start a retry cycle on that assertion after a half a second.

xref https://jenkins.galaxyproject.org/job/selenium/586/artifact/586-test-errors/test_history_switch2017092413201506273602/stacktrace.txt
2017-09-24 17:00:43 -04:00
John Chilton 6168e243b2 Selenium - fix rerunning test errors for test_custom_builds.
Fixed similar problem for saved histories tests with 341667437a. Should fix this problem https://jenkins.galaxyproject.org/job/selenium/568/artifact/568-test-errors/test_build_delete2017092319091506208182/stacktrace.txt.
2017-09-24 17:00:43 -04:00
John Chilton 76fe60180a Selenium - fix bug where snapshots might be used in tests before it is setup. 2017-09-24 17:00:38 -04:00
John Chilton aa825d22aa Selenium - fix transient issue with saved histories test. 2017-09-24 16:59:19 -04:00
Martin Cech 3014b1068b remove unused import 2017-09-22 14:44:59 -04:00
John Chilton 341667437a Fix selenium test retrying of tests in test_saved_histories.
The automatic retrying of tests only runs for methods - not for the full test case (if that makes sense) - so setUp() isn't rerun. By refactoring the login action out of the setUp method and into the test function for these cases - when the test is retried the user should be logged back in again as well.
2017-09-22 09:24:32 -04:00
John Chilton cf037fcc0c Selenium - more robust modal checking in test_workflow_editor.
During this transient failure:

https://jenkins.galaxyproject.org/job/selenium/519/artifact/519-test-errors/test_missing_tools2017092118271506032874/stacktrace.txt

the workflow was still loading when an assertion about the resulting modal text was issued. Avoiding the arbitrary sleep and instead just retrying the assertion until it holds true or times out is more robust and should prevent that.
2017-09-22 09:10:08 -04:00
John Chilton 17348a62fe Selenium - more robust inline searching for published histories grid.
Refactor recent search improvement for workflow management into a method that can be shared with published histories grid. Should address the transient failure test here:

https://jenkins.galaxyproject.org/job/selenium/521/artifact/521-test-errors/test_history_grid_search_standard2017092120151506039303/stacktrace.txt
2017-09-22 08:57:20 -04:00
John Chilton 77b61ba82d Selenium - attempted fix for transiently failing history options test.
Comments inline about this - but the target failure I'm hoping this fixes is:

https://jenkins.galaxyproject.org/job/selenium/528/artifact/528-test-errors/test_options2017092203081506064101/stacktrace.txt
2017-09-22 08:57:18 -04:00
John Chilton 9e6e340adc Selenium - handle potentially stale search box on workflow index page.
https://jenkins.galaxyproject.org/job/selenium/530/artifact/530-test-errors/test_index_search2017092205301506072611/stacktrace.txt
2017-09-22 08:56:36 -04:00
John Chilton 4ee18019e0 Fix Selenium tests outright broken in #4669.
Way to go @jmchilton.
2017-09-21 15:55:35 -04:00
Martin Cech 00677fc0f6 Merge pull request #4653 from jmchilton/selenium_fixes_28
Improve robustness of published workflow display test case.
2017-09-21 12:55:41 -04:00
Martin Cech 35cd933945 Merge pull request #4655 from jmchilton/selenium_fixes_29
Aggressively retry buggy submit_login() function in Selenium tests.
2017-09-21 12:55:20 -04:00
John Chilton a45e7e196b Fix transiently failing saved histories due to success message disappearing. 2017-09-21 11:13:03 -04:00
John Chilton 095307b678 Selenium fixes for publishing histories button.
Fixes https://jenkins.galaxyproject.org/job/selenium/488/testReport/junit/selenium_tests.test_published_histories_grid/HistoryGridTestCase/test_history_grid_histories/.

It looks like a Toastr popup sometimes intercepts the click, this should solve that I believe.
2017-09-20 13:35:02 -04:00
John Chilton 01eb5f04e6 Aggressively retry buggy submit_login() function in Selenium tests.
I don't get why when we click submit the user does not actually get logged in, but based on the last round of improved error messages this seems to be the case. You might think there is some callback in the login form that doesn't get registered by the time Selenium clicks the submit button - but this doesn't seem to be the case - I don't see any jquery magic happening in login.mako.

Should fix failures like this:

https://jenkins.galaxyproject.org/job/selenium/482/testReport/junit/selenium_tests.test_saved_histories/SavedHistoriesTestCase/test_history_publish/

I'd say at this point this is the most common problem in the Selenium tests.

This also introduces a framework for taking state snapshots of the Galaxy interface during tests that will only get written out if the tests fail. We now take screenshots before and after submitting the login form but this is a general purpose debugging mechanism that could be used other places.
2017-09-20 10:28:41 -04:00
John Chilton aa68d38735 Improve robustness of published workflow display test case.
Failed twice in different ways here https://jenkins.galaxyproject.org/job/selenium/484/ - this should address both cases.
2017-09-20 08:29:25 -04:00
John Chilton 87bb576c39 Improved state handling for @anatskiy-style Selenium tests.
These tests aren't idealized unittest.TestCase because they initialize class level data in instance level methods. While this isn't ideal, it is seems an entirely fair workaround given that SeleniumTestCase setups up the Selenium connection itself in an instance method - so class-level initializers would not be able to setup Galaxy data. Since I think we will continue using this pattern then, probably best to formalize it a bit and improve error handling.

This provides a formal super class for these test cases that provides a uniform method for setting up the class level data and tracks whether this is successful or not. This serves a couple purposes beyond simple uniformity. First, it tracks if the state has actually been setup or not and will skip subsequent tests if it hasn't. Some of these tests aren't passing very consistently on Jenkins and so we get a bunch of extra noise for tests that are attempting to run without their preconditions met - this will fix that and make the original errors much more clear. Moving the "hacky" part of this into the framework itself also means the tests themselves don't have to repeat hacks like seeing if variables are set with ``getattr`` and such - I always prefer one framework hack to a dozen application hacks.
2017-09-19 10:33:26 -04:00
Evgeny Anatskiy e01b57da58 small improvement 2017-09-18 22:28:04 +02:00
Evgeny Anatskiy db67d254ed don't test the uploading of fasta files 2017-09-18 21:17:00 +02:00
Evgeny Anatskiy 2c128b097a add custom builds tests 2017-09-14 18:30:41 +02: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
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 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
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