Commit Graph
243 Commits
Author SHA1 Message Date
guerler 33eb15b63c Fix import order and style 2017-11-18 15:44:16 -05:00
guerler 6e2285d3f2 Merge branch 'dev' into remove_unused_workflow_endpoint 2017-11-16 11:24:41 -05:00
guerler ef0e253058 Fix selenium test attempt
Fix
2017-11-16 11:06:53 -05:00
John Chilton 9273d7a1c7 Add screenshots for TDT Selenium tests. 2017-11-14 21:54:58 -05:00
John Chilton cecef90915 Merge remote-tracking branch 'jmchilton/dev' into tdt_tests 2017-11-14 21:49:15 -05:00
John Chilton c52ebfca26 Improvements for tour generator Selenium tests.
- Replace test using Cut1 with two tests each using framework test tools loaded with Selenium tests by default.
- Create a symbolic link so that tour generator is configured with default test webhooks.
- Establish and use components and navigates_galaxy.py abstractions for tour generation and navigation.
- In one of the tool tests actually walk the tour (previously we only verified the initial tour popover).
2017-11-14 21:41:09 -05:00
Nicola Soranzo 2cd95c48f6 Fix import order everywhere
- Add flake8-import-order to flake8 Pipfile and remove py27-lint-imports
  and py27-lint-imports-include-list tox envs
- Fix most E201 and E202 errors reported by flake8-import-order v0.15,
  but pin flake8-import-order to v0.14.3 until
  https://github.com/PyCQA/flake8-import-order/issues/123
  is fixed

This let us drop 2 jobs on Travis per each job.
2017-11-14 19:42:39 +00:00
Martin Cech 7857b152cd Merge pull request #4972 from jmchilton/flakey
Add @flakey test annotation and "skip" them if the fail on Jenkins.
2017-11-10 12:18:38 -05:00
John Chilton 875fb3641f Add @flakey test annotation and "skip" them if the fail on Jenkins.
Use it to skip the Juypter test that keeps randomly failing builds if there are problems.
2017-11-09 16:27:38 -05:00
John Chilton 2f63d8bd70 Capture a bunch of labelled screenshots of Galaxy durings tests.
During pull requests reviews this allows easy visual inspection of various components to augment the automated testing.
2017-11-09 15:15:24 -05:00
John Chilton a7b32a772d Enable galaxy logging during Selenium tests.
- Use localStorage to enable the logs at the start of new connections during tests.
- Add new flatten console logging options in the client to hack around problem recovering multiple argument style logging the client uses with only getting back first argument when using Selenium API (at least with Chrome).
- Break out the browser log into a sort of default and verbose mode (only the latter includes DEBUG and INFO messages).
- Use json.dump with the indent call to get more visually parsable logging messages in the Selenium test failure dump.
2017-11-05 14:37:37 -05:00
John Chilton 3a1ca26339 Fix published histories grid test. 2017-11-03 19:33:20 -04:00
Evgeny Anatskiy f419c85955 add test for TDT 2017-11-01 15:21:25 +01:00
Evgeny Anatskiy 323e1ad64e Merge branch 'dev' into tdt_tests
# Conflicts:
#	client/galaxy/scripts/mvc/tool/tool-form-base.js
#	static/maps/mvc/tool/tool-form-base.js.map
#	static/scripts/bundled/analysis.bundled.js
#	static/scripts/bundled/analysis.bundled.js.map
#	static/scripts/bundled/libs.bundled.js.map
#	static/scripts/mvc/tool/tool-form-base.js
2017-11-01 15:05:22 +01:00
Evgeny Anatskiy 9d646c605c improve the test 2017-11-01 14:51:35 +01:00
Evgeny Anatskiy b097339164 test successful tour generation 2017-10-17 19:37:20 +02:00
Evgeny Anatskiy 6c32edebc1 start writing tests for TDT 2017-10-17 19:23:36 +02:00
John Chilton cc5f44bccc Comment out test that doesn't work on Jenkins.
I don't know why it doesn't work - I'll revisit later but Jenkins is currently broken.
2017-10-04 14:02:12 -04:00
John Chilton 225ad7fb45 Continue push toward smarter component based Selenium testing.
This continues a thread started in 0650978a91 and #4732 of switching to smarter selectors from a more structured YAML description of the Galaxy DOM. This continues that by:

- Eliminating any use of the old navigation YAML file (navigation-data.yml).
- Replace href selectors with other things since they break when testing Galaxy with a proxy-prefix.
- Extending the raw selectors to allow concept of nesting selectors.
- Building even smarter "components" that wrap these raw selectors generated from the YAML directly in a way that allows them to utilize the actual Selenium session and helper class.

So the old ``self.navigation_data`` is gone, ``self.navigation`` still yields the raw selectors, and ``self.components`` yields the smarter variant. Hopefully all will agree the code that uses ``self.components`` is more compact and readable.

The following a very basic example of this:

```diff
     def click_masthead_user(self):
-        self.wait_for_and_click(self.navigation.masthead.selectors.user)
+        self.components.masthead.user.wait_for_and_click()

```

Here is an example of combining it with the new child selector syntax:

```diff
     def assert_item_dbkey_displayed_as(self, hid, dbkey):
-        item_body_selector = self.history_panel_item_body_selector(hid=hid, wait=True)
-        dbkey_selector = item_body_selector + ' ' + self.test_data["historyPanel"]["selectors"]["hda"]["dbkey"]
-        dbkey_element = self.wait_for_selector_visible(dbkey_selector)
-        assert dbkey in dbkey_element.text
+        item_body = self.history_panel_item_component(hid=hid)
+        dbkey_text = item_body.dbkey.wait_for_text()
+        assert dbkey in dbkey_text

```
2017-10-04 12:53:34 -04:00
John Chilton 3c64167788 Initial work on selenium testing for libraries.
- Test importing datasets from histories.
- Test basic importing of a dataset from a path.
- Test creating a folder.
- Test create library, renaming a library, filtering libraries by name, and sorting of libraries.
- Test various buttons (e.g. details, help).
2017-10-03 11:59:39 -04:00
John Chilton 0650978a91 Switch to a new more structured YAML format for navigation data.
Break everything into components.
2017-10-02 11:54:59 -04:00
John Chilton 2d521ff927 Capture screenshots and such for setUp problems in Selenium tests as well. 2017-10-02 09:50:37 -04:00
John Chilton bff364753a Add Selenium test case for testing bits of navigates_galaxy.py. 2017-10-02 09:50:37 -04:00
John Chilton cc3c3a9b92 Implement outline of Jupyter testing. 2017-10-02 09:50:37 -04:00
John Chilton 395eefcbb2 Selenium - implement managed_history decorator for tests.
Creates and deletes a history for tests - good for tests meant to aim at production servers that need to have useful metadata and need to be cleaned up.
2017-10-02 09:50:37 -04:00
John Chilton 14d4367cc4 Allow forcing a particular user for some Selenium tests. 2017-10-02 09:50:37 -04:00
John Chilton c9915fc7e6 Switch to configurable, scaling approach to Selenium timeouts.
Implement different "WAIT_TYPES" and try to sleep for different amounts of time based on what is being waited for.

Replace sleep statements in addition to Selenium wait on statements.
2017-10-02 09:50:37 -04:00
John Chilton afaea964cf Selenium - cleanup duplication of DEFAULT_PASSWORD variable. 2017-10-02 09:50:37 -04:00
John Chilton 28c8644f02 More history panel abstractions in NavigatesGalaxy. 2017-10-02 09:50:37 -04:00
John Chilton cce59aeb55 Remove deprecated method click_hda_title in navigates_galaxy. 2017-10-02 09:50:37 -04:00
John Chilton 2e3c6e8941 Selenium - bug fix for checking workflow names on workflow index page.
xref https://jenkins.galaxyproject.org/job/selenium/654/artifact/654-test-errors/test_rename2017092708331506515637/
2017-09-29 15:06:26 -04:00
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